Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


You are viewing a reply to sw4stm32 printf not working  

sw4stm32 printf not working

printf() & scanf() redirection is supported by the library (independent of the IDE).

The library defines a “weak” function called _write() to output the formatted string. If you create an AC6 project, it will include the file syscalls.c that redefines _write() to interate over the string and call __io_putchar(). CubeMX does not create a _write() function so nothing is output (the comments surrounding PUTCHAR_PRTOTYPE are misleading).

Since printf() passes a string to _write() and the HAL accepts a string, I suggest you create a version of _write() that passes the string to the HAL and eliminate the __io_putchar() routine.

Alex