cancel
Showing results for 
Search instead for 
Did you mean: 

[BUG]Unable to run SWV on STM32F746 Nucleo board

GShch.1
Associate

Use STM32CubeIDE 1.4.2

STM32CubeMX 6.0.1

Windows 10 1903

First of all generated ioc for truestudio 9.3.

0693W0000059jflQAA.png 

0693W0000059jgZQAQ.pngIn main implement new _write function:

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

 /* Implement your write code here, this is used by puts and printf for example */

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

   ITM_SendChar((*ptr++));

 return len;

}

add #define "stdio.h" in the beginning of the main.c in /* USER CODE BEGIN Includes */

in while call printf func:

 /* Infinite loop */

 /* USER CODE BEGIN WHILE */

 while (1)

 {

    printf("THIS_IS_NOT_WORKING");

    HAL_Delay(250);

   /* USER CODE END WHILE */

   /* USER CODE BEGIN 3 */

 }

 /* USER CODE END 3 */

Enable SWV in debug configuration. Set Core clock as a HCLK in ioc file(216MHz)

And run debug. In debug open SWV ITM Data Console and enable port 0 and start trace.

(this screen from cubeide)

0693W0000059jkbQAA.png In truestudio everything works fine. Do the same steps in Stm32CubeIDE 1.4.2(Also generate files from zero from new ioc, because if i opened the same ioc i generated for truestudio and regenerate it for stm32cubeide, i can not build it because of errors in syscalls about reimplementation of some functions) and see nothing in SWV ITM Data Console. What am i missing???

0 REPLIES 0