"Fast" debugging on STM32CubeIDE for Cortex M0+ ? (OpenOCD / semihosting is too slow)
Hi All,
I've managed to successfully set up OpenOCD (semihosting) debugging after following the advice here: https://community.st.com/s/question/0D50X0000B5HQMG/how-to-get-arm-semihosting-to-work-on-stm32cubeide and in this youtube video: Lecture 8: Testing printf using semihosting and OpenOCD
However, it seems that OpenOCD creates a lot of performance overhead and my code runs too slow for the application. I know this because I have a timer interrupt set up to trigger every ~1ms and when running in debug mode via OpenOCD, this interrupt gets triggered before the main program has finished executing some code, whereas when I run it in release mode (no OpenOCD), the main program code gets executed before the timer interrupt.
Is there any alternative (faster) way to do printf debugging for my STM32L053C8T6 (Cortex M0+)?
Alternatively, is there a fast way I could get clues as to how my code getting executed as it jumps in and out of interrupts?
Notes:
- I am aware of this document: https://www.st.com/resource/en/application_note/dm00354244-stm32-microcontroller-debug-toolbox-stmicroelectronics.pdf but it doesn't have any details for STM32CubeIDE
- USART1 and USART2 are in use by the main application, so I can't use them.
Thank you.