Raspberry pi pico w - identifier "CYW43_WL_GPIO_LED_PIN" is undefined #1792
Closed
merinkumar
started this conversation in
General
Replies: 1 comment 1 reply
-
If you're using the Arduino framework, both of the things you are trying to do are not legal. If you're trying to use the raw SDK then you need to change the framework. Use |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Am trying the picow blink on a vscode/platformio setup. But getting below error.
Compiling .pio/build/rpipicow/FrameworkArduino/libb64/cencode.cpp.o src/main.cpp: In function 'int main()': src/main.cpp:11:29: error: 'CYW43_WL_GPIO_LED_PIN' was not declared in this scope 11 | cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, 1); | ^~~~~~~~~~~~~~~~~~~~~ *** [.pio/build/rpipicow/src/main.cpp.o] Error 1
Code:
`#include "pico/stdlib.h"
#include "pico/cyw43_arch.h"
int main() {
stdio_init_all();
if (cyw43_arch_init()) {
printf("Wi-Fi init failed");
return -1;
}
while (true) {
cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, 1);
sleep_ms(250);
cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, 0);
sleep_ms(250);
}
}`
platform.io:
`[env]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
framework = arduino
board_build.core = earlephilhower
board_build.filesystem_size = 0.5m
[env:rpipicow]
board = rpipicow
build_type = release`
If i just replace the constant with 0, that error is gone and a new error for stdio_init_all appears. If I comment stdio_init_all the complie is successful.
Linking .pio/build/rpipicow/firmware.elf /home/merin/.platformio/packages/toolchain-rp2040-earlephilhower/bin/../lib/gcc/arm-none-eabi/12.3.0/../../../../arm-none-eabi/bin/ld: .pio/build/rpipicow/src/main.cpp.o: in function
main':main.cpp:(.text.startup.main+0x2): undefined reference to
stdio_init_all' collect2: error: ld returned 1 exit status *** [.pio/build/rpipicow/firmware.elf] Error 1
So not sure why its not able to find CYW43_WL_GPIO_LED_PIN which is defined in pico_w.h .Please help !
Beta Was this translation helpful? Give feedback.
All reactions