raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.66k stars 911 forks source link

Wrong compiler selected (cc instead of arm-none-eabi-gcc) #1652

Closed arminveres closed 7 months ago

arminveres commented 7 months ago

I have been having this issue on and off, where /usr/bin/cc is selected, instead of /opt/gcc-arm-none-eabi/bin which I even provide through PICO_TOOLCHAIN_PATH. I honestly do not understand why this could be a problem. The toolchain is on the path in any case. Further, I also tried setting CMAKE_CXX_COMPILER but then I get the error, seen in #1597 .

Isn't there a cleaner or simpler way to make it work? image

lurch commented 7 months ago

What platform / OS / version are you building on? Are you following the instructions in https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf ?

arminveres commented 7 months ago

I am running Arm GNU toolchain directly downloaded from Arm. OS is Fedora WS 39 and I have tried running on master and 1.5.1.

I found out I wasn't including it always before the Project, as I am running multiple libraries that are linking against it, so it was an oversight on my part.