board_android-IoT/STM32F 2023. 11. 18. 11:36

CubeIDE , Keil have different requirement for Serial Wire Viewer

 

- CubeIDE :

> _write() redefinition is required

//in CubeIDE, redefinition of _write is ncessary

int _write(int file, char *ptr, int len)

{

for(int i = 0; i < len; i++)

{

ITM_SendChar(*ptr++);

}

return len;

}

https://embedblog.eu/?p=673

 

Using Serial Wire Trace with CubeIDE (aka a new level of debugging) – EmbedBlog

I’ve been developing for STM32’s for a couple of years now, and I did a lot of different projects – from large powersupplies to small headlamps – but on 95 % of them, I used two connectors: SWD (Serial Wire Debug), used to program and debug the chi

embedblog.eu

 

- Keil : 

> fputc() redefinition is required

int fputc(int ch, FILE *f)
{
ITM_SendChar(ch);
return(ch);
}

https://community.st.com/t5/stm32-mcus-products/getting-printf-on-stm32f407-discovery-board/td-p/438840

 

Getting printf on STM32F407 Discovery board

Posted on June 11, 2015 at 13:14 Hi i am new to embedded system programming and stumbled upon this basic problem of re-directing output to the ITM Port0. I read multiple posts on the same but sadly I cant get it to work. I shall try to be as descriptive as

community.st.com

- Tutorial for Keil, serial wire viewer

https://www.keil.com/appnotes/files/discovery_m4_lab.pdf

 

posted by cskimair
: