Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 5 months ago.
How to make printf work with the STM32F429I-DISCO Board
I have been able to get printf to work on the STM32F429!-DISCO version of the board using the STM32-Cube software to build a runtime library that I use with EmBitz v1.11 (which uses GCC). Here's what I did:
Maybe you can make it work in mbed? Here's what I did:
In file STM32Cube_FW_F4_V1.16.0\Utilities\Log\lcd_log.c:
- Find the function whose function header is a macro named: LCD_LOG_PUTCHAR
- Replace the macro name (the entire line) with: int Put1Char(int ch)
- Add the following function to the same file:
int _write(int file, char *ptr, int len) { int i; for (i = 0; i < len; i++) Put1Char(*ptr++) ; return len ; }
That's all it took!
Dan Lewis dlewis@scu.edu
Question relating to:
2 Answers
7 years, 2 months ago.
STM32F429I-DISCO Board does NOT support printf, STM32F429I-DISC1 Board supports printf.