Question
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 possible. I am following the lab mentioned here http://www.keil.com/appnotes/files/apnt_230.pdf Page 15 Section 19.
Board : STM32F407 Discovery boardKeil 5.15 MDK /*---------------------------------------------------------------------------- * CMSIS-RTOS 'main' function template *---------------------------------------------------------------------------*/&sharpdefine osObjectsPublic // define objects in main module&sharpinclude ''osObjects.h'' // RTOS object definitions&sharpdefine ITM_Port8(n) (*((volatile unsigned char *)(0xE0000000+4*n)))/* * main: initialize and start the system */int main (void) { int value = 1; osKernelInitialize (); // initialize CMSIS-RTOS // initialize peripherals here // create 'thread' functions that start executing, // example: tid_name = osThreadCreate (osThread(name), NULL); ITM_Port8(0) = value ; while(ITM_Port8(0) == 0); ITM_Port8(0) = 0x0D; while(ITM_Port8(0) == 0); ITM_Port8(0) = 0x0A; osKernelStart (); // start thread execution } I know the settings for the core clock speed are important so i set it correctly to 168MHz . Here is the snapshot to be sure. http://imgur.com/jSiUY2a,bqdc5c9&sharp1What am i missing here ? Seems my debug view gets nothing . Any help for me ? #stm32f-printf