I got it to work several times already using STM32Cube IDE (obviously I don't like it, which is why I'm here) with a blank project, default settings and this definition only. On a setup using stm32pio, this does not work. The HAL_UART_Transmit function works fine.
NOTE: I am not able to choose the "Other toolchain" option that I get warnings about. If I understand correctly, it might be that my relatively new board does not support it.
What I tried already
using board_build.stm32cube.custom_dsp_library = yes
using board_build.stm32cube.disable_embedded_libs = yes
a combination of the two above
using the __attribute__((optimize(0))) attribute and several variations of it
making the project from the scratch again with slightly different MX settings
Fixed this by adding the _write function which normally gets defined in syscalls.c, which is missing in a stm32pio project. Leaving this be in case someone comes across a similar issue...
First and foremost, thanks for contributing to a project like this. I'm very happy it exists.
Description
I'm following a course for STM32 Nucleo L476RG. The course instructs me to override
__io_putchar
to be able to useprintf
like so:I got it to work several times already using STM32Cube IDE (obviously I don't like it, which is why I'm here) with a blank project, default settings and this definition only. On a setup using
stm32pio
, this does not work. TheHAL_UART_Transmit
function works fine.NOTE: I am not able to choose the "Other toolchain" option that I get warnings about. If I understand correctly, it might be that my relatively new board does not support it.
What I tried already
board_build.stm32cube.custom_dsp_library = yes
board_build.stm32cube.disable_embedded_libs = yes
__attribute__((optimize(0)))
attribute and several variations of itMore details
Debian 12 Python 3.11.2
My
stm32pio.ini
file:My project tree (after "Full Clean"):