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

Pico-SDK not initializing #1273

Closed
PhilippMolitor opened this issue Mar 5, 2023 · 3 comments
Closed

Pico-SDK not initializing #1273

PhilippMolitor opened this issue Mar 5, 2023 · 3 comments

Comments

@PhilippMolitor
Copy link
Contributor

I just tried to get some timer stuff running and noticed that the documentation has no such thing in it (something like Timer1/2/3 in Arduino).

When using #include <pico/stdlib.h> and stdio_init_all() to start a timer using the pico-sdk, the following compilation error shows up:

/Users/phil/.platformio/packages/toolchain-rp2040-earlephilhower/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: .pio/build/debug/src/main.cpp.o: in function `setup':
/Users/phil/Projects/truncated/src/main.cpp:117: undefined reference to `stdio_init_all'

I am using the most recent version with PlatformIO.

@earlephilhower
Copy link
Owner

The Pico SDK stdio is not supported since the USB and UART ports are owned by the Arduino Serial/1/2 ports.

The Arduino way is Serial.printf()/etc. You can also use printf() if you set the Tools->Debug port to the desired output.

@PhilippMolitor
Copy link
Contributor Author

Is there any way to interact with the timers without accessing the raw timer registers?

@earlephilhower
Copy link
Owner

There's the alarm portion of the SDK you can look at. It's got a higher level API than register-level twiddling.

earlephilhower added a commit that referenced this issue May 23, 2023
Warn the user that the Pico SDK STDIO calls (stdio_init_all, stdio_usb_init,
stdio_uart_init) are not supported or needed at compile time.  See multiple
issues #1433 #1347 #1273 #1251 and others.
earlephilhower added a commit that referenced this issue May 23, 2023
Warn the user that the Pico SDK STDIO calls (stdio_init_all, stdio_usb_init,
stdio_uart_init) are not supported or needed at compile time.  See multiple
issues #1433 #1347 #1273 #1251 and others.
earlephilhower added a commit that referenced this issue May 24, 2023
Warn the user that the Pico SDK STDIO calls (stdio_init_all, stdio_usb_init,
stdio_uart_init) are not supported or needed at compile time.  See multiple
issues #1433 #1347 #1273 #1251 and others.
earlephilhower added a commit that referenced this issue May 24, 2023
Warn the user that the Pico SDK STDIO calls (stdio_init_all, stdio_usb_init,
stdio_uart_init) are not supported or needed at compile time.  See multiple
issues #1433 #1347 #1273 #1251 and others.
earlephilhower added a commit that referenced this issue May 24, 2023
Warn the user that the Pico SDK STDIO calls (stdio_init_all, stdio_usb_init,
stdio_uart_init) are not supported or needed at compile time.  See multiple
issues #1433 #1347 #1273 #1251 and others.
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