Having trouble building MicroPython for RP2350 #18044
-
Hello all. I am attempting to build MicroPython from source for my Sparkfun ThingPlus RP2350 dev board, so that I can freeze several of my MP modules into the firmware. My build environment is a Raspbian virtual machine running on VMware. It's a clean install of the latest version, and then from there I followed this guide: https://www.reddit.com/r/raspberrypipico/comments/1endjfd/quick_tutorialinstructions_on_how_to_freeze/ The basic build process I am following: git clone https://github.com/micropython/micropython.git Every step is going fine except for the final make process. Initially it was crashing out with a "target CPU does not support ARMv8-M Security Extensions". That led me to the following thread that claimed this error was due to an outdated version of the Arm GNU toolchain (8.3.1), and that updating to a newer version was the solution... https://forums.raspberrypi.com/viewtopic.php?t=376809 So, after updating the Arm GNU toolchain to a newer version, the error above is gone, however now I'm crashing at what appears to be some syntax error(s) in my Makefile(s), seemingly toward the very end of the make process. I've tried to track down what's going in on the files referenced by the error messages and I'm not having any luck. Admittedly at this point I'm way over my head trying to troubleshoot what's going wrong here. (FYI - I initially updated the toolchain all the way to 14.3, but have since also tried 10.2 and 10.3. They all produce the same syntax errors and crash at the same point.) Could someone please have a look at the errors below and attached files and help me determine what my next troubleshooting steps would be? Happy to provide more info as directed. Thanks in advance! build-SPARKFUN_THINGPLUS_RP2350/CMakeFiles/firmware.dir/build.make build.make [ 4%] Building C object CMakeFiles/firmware.dir/home/admin/pico/micropython/py/modsys.c.o
[ 5%] Building C object CMakeFiles/firmware.dir/home/admin/pico/micropython/extmod/modos.c.o
[ 5%] Building C object CMakeFiles/firmware.dir/home/admin/pico/micropython/shared/runtime/pyexec.c.o
[ 5%] Building C object CMakeFiles/firmware.dir/machine_pin.c.o
[ 5%] Building C object CMakeFiles/firmware.dir/home/admin/pico/micropython/extmod/modplatform.c.o
[ 5%] Building C object CMakeFiles/firmware.dir/main.c.o
[ 5%] Building C object CMakeFiles/firmware.dir/rp2_pio.c.o
[ 5%] Building C object CMakeFiles/firmware.dir/machine_pin_cyw43.c.o
[ 5%] Building C object CMakeFiles/firmware.dir/pins_SPARKFUN_THINGPLUS_RP2350.c.o
[ 6%] Linking CXX executable firmware.elf
/opt/arm/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld:--defsym:2: ignoring invalid character `(' in expression
/opt/arm/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld:--defsym:2: ignoring invalid character ` ' in expression
/opt/arm/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld:--defsym:2: ignoring invalid character `*' in expression
/opt/arm/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld:--defsym:2: ignoring invalid character ` ' in expression
/opt/arm/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld:--defsym:2: syntax error
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/firmware.dir/build.make:8513: firmware.elf] Error 1
make[3]: Leaving directory '/home/admin/pico/micropython/ports/rp2/build-SPARKFUN_THINGPLUS_RP2350'
make[2]: *** [CMakeFiles/Makefile2:2217: CMakeFiles/firmware.dir/all] Error 2
make[2]: Leaving directory '/home/admin/pico/micropython/ports/rp2/build-SPARKFUN_THINGPLUS_RP2350'
make[1]: *** [Makefile:103: all] Error 2
make[1]: Leaving directory '/home/admin/pico/micropython/ports/rp2/build-SPARKFUN_THINGPLUS_RP2350'
-e See https://github.com/micropython/micropython/wiki/Build-Troubleshooting
make: *** [Makefile:65: all] Error 1
admin@raspberry:~/pico/micropython/ports/rp2 $ |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
You can use GitHub Flavored Markdown to format your posts. In particular use 'triple backtick' Also in most cases it is much more effective if you copy&paste the text from your error, rather than share a screenshot of said text. Also see the section https://github.com/orgs/micropython/discussions/9111 |
Beta Was this translation helpful? Give feedback.
-
A suggestion to avoid needing to debug the toolchain setup on your workstation, is to use Mpbuild. it uses docker images to run the build, while the source, and resulting images reside on your filesystem, same as your current setup. |
Beta Was this translation helpful? Give feedback.
-
That may be your problem. Raspberry Pi Desktop for x86 was abandoned in 2022 and is based on the obsolete Debian Bullseye distribution. If you have to run Linux in a VM to build MicroPython, Debian 13 is current |
Beta Was this translation helpful? Give feedback.
That may be your problem. Raspberry Pi Desktop for x86 was abandoned in 2022 and is based on the obsolete Debian Bullseye distribution. If you have to run Linux in a VM to build MicroPython, Debian 13 is current