-
Notifications
You must be signed in to change notification settings - Fork 384
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
print (stdio) linker errors. #1433
Comments
You can't use |
"or standard library printf" Thanks - but this just doesnt seem to work unfortunately.
However when I call "stdio_init_all();" it works - Serial over UART and Pin 1&2. However - the header is present - but the c files are not. Adding the .c files - Then it all works. I am following a Course from Cornell Uni - and they do not use Arduino - only r-pi pico SDK calls Issue is fixed however by including the above files from official SDK. This library/tool is the only one I found that does all 4 of: So thanks very much for this great addition to platformio and thanks very much for replying :) |
You need to set the debug port in the Under P.IO use |
Hi - I am having linker errors - reduced to its most basic - the code below fails to compile in both Platformio and Arduino 2.0 IDE
Using latest version from git: Arduino boards manager reports it as V3.2.0
#include <stdio.h>
#include "pico/stdlib.h"
int main() {
stdio_init_all(); //compiles if this is omitted - but then pico will not actually send anything over usb/uart
printf("Hello") ;
}
Error: sketch_may9a/sketch_may9a.ino:5: undefined reference to 'stdio_init_all' collect2.exe: error: ld returned 1 exit status
I hack/fixed the issue for myself by including these missing? files from Pico SDK 1.5 in my src folder... Im not sure if there is other code or libs missing - but this allows the above to compile and run and print to Terminal from the pico.
files: stdio_uart.h, stdio_usb.h, stdio.c, stdio_uart.c, stdio_usb.c, stdlib.c
I need to use pico sdk - not arduino equivalents.
ps. Thanks for a great library.
The text was updated successfully, but these errors were encountered: