-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
trying to build mpy with dynamic libs for esp32 with xtensa-gcc #4916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I guess you are referring to #1627 ? That PR is quite dated and pretty much superseded by #4535, which was merged. Eventually (hopefully soon) there will be support to build .mpy files from C code, of which there is a simple example in #4535 (those bits were not merged). |
thx 👍 , just noticed that from PR list, the old version finally builds, and it crashed when imported, I will try this one instead. |
Tried with the latest code, after compile and import native_ex I got "ValueError: incompatible .mpy file", any ways to debug on failures like this? I've noticed some quite interesting codes in native_ex.c
But xtensa looks like using xtensa-l32 which is different with esp32. Currently I built with xtensa setting and it showed like this ValueError: incompatible .mpy arch Looks more likely to be this header's problem? |
Did you also rebuild mpy-cross? |
yes, I did finally get it built but failed to work. |
Hi,
I'm trying to adapt micropython dynamic lib for esp32 xtensa specific ports, everything went well except for when I trying to create the modx.elf file.
I'm getting a error like this
modx.o: In function `init':
modx.c:(.mpytext+0x5): dangerous relocation: l32r: literal placed after use: .mpytext.literal
modx.c:(.mpytext+0x24): dangerous relocation: l32r: literal placed after use: (.mpytext.literal+0x4)
modx.c:(.mpytext+0x38): dangerous relocation: l32r: literal placed after use: (.mpytext.literal+0x8)
modx.c:(.mpytext+0x55): dangerous relocation: l32r: literal placed after use: (.mpytext.literal+0xc)
Makefile:52: recipe for target 'modx.elf' failed
make: *** [modx.elf] Error 1
Any hints on what might be the cause of the problem? looks like the error is strongly related to mpextern.ld, if I do remove -T mpextern.ld it links but ofcourse objcopy will create nothing to output here. May I know what's behind the scene to create the mpy file?
The text was updated successfully, but these errors were encountered: