2

first off i am on macbook. I am trying to create a uf2 file for my raspberry pi pico. This is for a swarm robot that i am working on and i get the following error: arm-none-eabi-gcc: fatal error: cannot read spec file 'nosys.specs': No such file or directory I have been countlessly researching for hours to find a solution with no luck. Here is some background info off everything that has been setup.

  1. First i installed the SDK: git clone -b master --recurse-submodules https://github.com/raspberrypi/pico-sdk.git

  2. Then I installed the toolchain:

 1. brew install cmake 
 2. brew tap ArmMbed/homebrew-formulae 
 3. brew install arm-none-eabi-gcc
  1. I added the following export lines to my .zshrc file:
 1. export PICO_SDK_PATH="$HOME/pico-sdk"
 2. export PATH="/usr/local/Cellar/arm-none-eabi-gcc/13.2.0/bin/:$PATH"
  1. Next, I went back into my project folder and ran the following line: 1. mkdir build && cd build

  2. I built using cmake:

 1. cmake -DCMAKE_BUILD_TYPE=Debug ..

 2. Here is part of the output i got:

Defaulting PICO_PLATFORM to rp2040 since not specified.
Defaulting PICO platform compiler to pico_arm_gcc since not specified.
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
PICO compiler is pico_arm_gcc
-- Check for working C compiler: /usr/local/Cellar/arm-none-eabi-gcc/13.2.0/bin/arm-none-eabi-gcc - skipped
-- Check for working CXX compiler: /usr/local/Cellar/arm-none-eabi-gcc/13.2.0/bin/arm-none-eabi-g++ - skipped
-- Found assembler: /usr/local/Cellar/arm-none-eabi-gcc/13.2.0/bin/arm-none-eabi-gcc
-- Configuring done (2.6s)
-- Generating done (0.3s)
-- Build files have been written to: /Users/myname/SwarmCapstone/build
  1. Finally all of the files in the /build generated: CMakeCache.txt Makefile elf2uf2 generated pioasm CMakeFiles cmake_install.cmake freertos pico-sdk swarm_capstone

  2. when i ran: make, this is where i got the error:

[  0%] Building ASM object pico-sdk/src/rp2_common/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.obj
[  1%] Linking ASM executable bs2_default.elf
arm-none-eabi-gcc: fatal error: cannot read spec file 'nosys.specs': No such file or directory
compilation terminated.
make[2]: *** [pico-sdk/src/rp2_common/boot_stage2/bs2_default.elf] Error 1
make[1]: *** [pico-sdk/src/rp2_common/boot_stage2/CMakeFiles/bs2_default.dir/all] Error 2
make: *** [all] Error 2

I believe that I am on the right track to generating it, and for more info about this, I actually inherited this project from a student who graduated. he was able to generate the uf2 and load it on the pico, but i made some changes and need to update it. any and all help would be greatly appreciated!!

I have tried everything that i mentioned above. I attempted to reinstall the toolchain but I had no luck. I am using version 13.2.0 which should be completely fine to use.

Neil Patel
  • 21
  • 1

1 Answers1

0

I had this trouble as well...

Following advice from https://www.reddit.com/r/embedded/comments/v0ghcs/pi_pico_how_can_i_set_up_an_enviroment_to_program/ , I installed the official Arm pkg file and then did:

PATH=$PATH:/Applications/ArmGNUToolchain/12.3.rel1/arm-none-eabi/bin
export CROSS_COMPILE=/Applications/ArmGNUToolchain/12.3.rel1/arm-none-eabi/bin/arm-none-eabi 
export ARCH=arm

then I deleted the whole of the build directory, recreated and reran cmake .. - then I was able to successfully run make on the example code and generate an elf output.

Martin Thompson
  • 16,395
  • 1
  • 38
  • 56