It might be those warning you got, It's doing something different that the compilers I've tried.It seems gcc 13.2.1 does not compile your code right.
From board.h
The PICO_DEFAULT_UART_ are already defined in board.h so you don't need themFYI, I tried to add this to CMakeLists.txt:And this to simple_start.c:Code:
pico_enable_stdio_uart(${BINARY} 1)target_compile_definitions(${BINARY} PUBLIC PICO_DEFAULT_UART_TX_PIN=20 PICO_DEFAULT_UART_RX_PIN=21)# Serial GPIO means SD card is 1 bit (4 bits otherwise)set(PICO_SD_DAT_PIN_COUNT 1)
These statements work in my projects.Code:
sleep_ms(250); stdio_init_all(); sleep_ms(250); printf("*** PT52! ***\n");
set(PICO_SD_DAT_PIN_COUNT 1) has no effect the SD driver I use only works in SPI mode
To get output from UART you need to do something like
On the SD card create a file named autoexec and set the system flag
Code:
uses("uart")uart.init(9600)uart.send("*** PT52! ***\n")uart.close()
Code:
// OVERRIDE STDOUT FUNCTIONS WITH INTERNAL VERSIONS#undef printf#define printf Printf#undef putchar#define putchar Decode_Character#undef puts#define puts Puts
Statistics: Posted by DarkElvenAngel — Sat Dec 07, 2024 2:29 pm