2024-12-04 04:59 AM
/* USER CODE BEGIN 0 */
uint32_t DDDEBUG = 0;
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
// ... (code generated by CubeIDE) ...
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
DDDEBUG++;
for (char* ptr = "test\n"; *ptr; ptr++)
ITM_SendChar(*ptr);
HAL_Delay(1000);
}
/* USER CODE END 3 */
}
2024-12-04 05:01 AM - edited 2024-12-04 05:02 AM
PS: I attached many screenshots of the configuration, including the ITM registers which look correct (but I'm no expert about these). See also the OpenOCD and GDB commands here:
C:\ST\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.openocd.win32_2.4.0.202409170845\tools\bin\openocd.exe "-f" "stm32mp157D_DK1_TEST_CM4.cfg" "-s" "C:/Users/Administrator/STM32CubeIDE/workspace_1.17.0/stm32mp157D_DK1_TEST/CM4" "-s" "C:/ST/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.3.0.202411041438/resources/openocd/st_scripts" "-s" "C:/ST/STM32CubeIDE_1.17.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mpu.debug.openocd_2.2.0.202409171044/resources/openocd/st_scripts" "-c" "gdb_report_data_abort enable" "-c" "gdb_port 3333" "-c" "tcl_port 6666" "-c" "telnet_port 4444"
C:\ST\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_2.2.0.202409170845\tools\bin\ST-LINK_gdbserver.exe -p 61234 -l 1 -d -z 61235 -s -cp C:\ST\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.2.0.202409170845\tools\bin -m 2 -g
I am using CubeIDE 1.17.0, and the firmware on the ST Link is updated to the newest available. The STM32MP1 firmware package is also the latest.
ITM SWT and CoreDebug Registers:
2024-12-16 12:37 AM
Any thoughts anyone?