Instrumentation Trace Macrocell (ITM): fast output over dedicated SWO pin, but it’s only available on Cortex-M3+ parts (i.e.Virtual COM Port (VCP): fast, but you need USB hardware ( see my previous post for setting this up).Serial (UART): fast, but you need extra pins and hardware (such as a USB to Serial converter board).Semihosting: should be built in to every ARM chip, but slow.If you need printf-style debugging (because you can’t or don’t want to do step-through debugging), here are your options on STM32 parts: This post on the Embedded in Rust blog shows how printing a simple sentence over semihosting can take over 100 ms! The upside is every ARM controller should have semihosting available, which can be a lifesaver if that’s all you have. Note that we’ll be doing this over the Serial Wire Debug (SWD) port.īefore I show you how to enable semihosting with STM32CubeIDE, note that the downside of semihosting is that it is resource intensive and very slow. Specifically, it allows you to use printf() debugging to output strings to your IDE’s console while running code on the microcontroller. It allows you to use input and output functions on a host computer that get forwarded to your microcontroller over a hardware debugging tool (e.g. Semihosting is a debugging tool that is built in to most ARM-based microcontrollers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |