2025-06-24 11:59 PM - last edited on 2025-06-25 1:57 AM by mƎALLEm
Hi All,
I am using STM32H747IDISCO kit.
I make a new project on STM32CubeIDE(Vewsion 1.18.1), following these steps below.
1.Start STM32CubeIDE(Vewsion 1.18.1), and click [Start new STM32 Project] button on STM32CubeIDE Home.
2.Input "STM32H747I-DISCO" in Commercial Part Number Box on Boad Selector tab.
3.Click Boads list 1 item displayed on right side, and click [Next] button.
4.Input "TestPrj" in Project Name Box in STM32 Project daialog, and click finish button.
After a while, TestPrj.ioc is opened, then click Project -> Generate code.
C/C++ perspective is opened.
I add some processes in CM4 main function that turn on LED1 like the following.
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* added proccess start */
{
/* Configure the GPIO_LED pin */
GPIO_InitTypeDef GPIO_InitStruct;
__HAL_RCC_GPIOI_CLK_ENABLE();
GPIO_InitStruct.Pin = GPIO_PIN_12;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
HAL_GPIO_Init(GPIOI, &GPIO_InitStruct);
/* turn on LED */
HAL_GPIO_WritePin (GPIOI, (uint16_t)GPIO_PIN_12, GPIO_PIN_RESET);
printf("Hello World!!\r\n");
}
/* added proccess end */
/* USER CODE BEGIN Init */
/* USER CODE END Init */
I execute build all, and load the code to board following the next guide.
I set a breakpoint HAL_GPIO_WritePin (GPIOI, (uint16_t)GPIO_PIN_12, GPIO_PIN_RESET); line, and start debug, but it does not break.
LED1 is turned on, so it is clear that the breakpoint set above is proccessed.
And "Hello world!!" is not displayed on SWV ITM Data Console.
To display printf output in SWV ITM Data Console, I reffered to related website.
As mentioned above, I can’t debug(break, printf output to console, etc) on CM4 side.
Please teach me how to debug(break, printf output to console, etc) on CM4 side software on STM32H747.
2025-07-06 6:25 PM
Hello,
I tried with STLINK GDB server, but it didn't break on CM4 code.
By the way, I noticed the following.
When main in CM4 was selected and I started debuging, it broke on CM4, as shown in image below.
It is the case that breakpoint is set at "HAL_Init();" line in CM4 main function.
But, when main in CM7 was selected and I started debuging, it didn't break on CM4, as shown in image below.
In this case, LED1 didn't turn on. LED1 turning on proccess is in CM4.
I think that after reset, CM7 and CM7 is started at the same time. But one cpu only starts, mentioned above.
Could you tell me the way how both cpu is started at the same time on debugger?
Thank you.
2025-07-10 1:36 AM
Hello @Paco,
Could you please explain why you accepted as solution this reply?
2025-07-10 3:36 PM
Hello mƎALLEm.
I'm sorry but I may click by mistake.
This matter remains unresolved.