Skip to content
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

Unable to use hardware/flash.h from pico-sdk #38

Open
kk7ds opened this issue Sep 15, 2022 · 1 comment
Open

Unable to use hardware/flash.h from pico-sdk #38

kk7ds opened this issue Sep 15, 2022 · 1 comment

Comments

@kk7ds
Copy link

kk7ds commented Sep 15, 2022

I hope this is the right place to open this issue.

When building something that uses functions from hardware/flash.h I get the following unresolved symbol:

.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: .pio/build/rp2040/src/main.cpp.o: in function `save()':
main.cpp:(.text._Z4savev+0x12): undefined reference to `flash_range_erase(unsigned long, unsigned int)'
.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: main.cpp:(.text._Z4savev+0x1e): undefined reference to `flash_range_program(unsigned long, unsigned char const*, unsigned int)'
collect2: error: ld returned 1 exit status
*** [.pio/build/rp2040/firmware.elf] Error 1

This same code works fine in the Arduino IDE (1.0) and arduino-cli. The two symbols referenced are calls I'm making of course.

Is there some build_flags= that I need to set in order to link against the proper library? I have tried the released version of platform-raspberrypi as well as pointing it directly at this github repo and the behavior is the same.

@sergiomiracco
Copy link

I have the same issue using platformio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants