liquid.soulder wrote: ↑Wed Dec 11, 2019 3:09 pm
We are also discussing the SWO functionality here:
https://github.com/sparkfun/SparkFun_Ap ... /issues/19
The solution we settle on there will trickle down to Arduino at some point
Thanks for linking those posts - I had not been aware of them before and they look helpful!
Thanks, that issue #19 discussion filled in most of the missing details I needed to get this working. I can now use am_util_debug_printf() over the SWO pin on the debug connector to the SEGGER JLinkSWOViewer on my Artemis Redboard. My assumption that the SWO pin was configured when I used am_bsp_debug_printf_enable() was part of the problem. To get this working I had to configure the SWO on pad 33. Then, I used am_bsp_itm_printf_enable() rather than am_bsp_debug_printf_enable(). Since am_bsp_debug_printf_enable() depends on g_ui32PrintInterface being set properly before internally calling am_bsp_itm_printf_enable(), I chose to call am_bsp_itm_printf_enable() explicitly. Note that am_bsp_itm_printf_enable() sets g_ui32PrintInterface = AM_BSP_PRINT_INFC_SWO. The existing BSP logic for setting up the SWO is a bit confusing, but I won't get into that.
It would be nice if the SFE Artemis Hookup Guide include some documentation on setting up the SWO. On thing that could be updated to show that pad 33 is available for SWO is
RedboardArtemis Datasheet. Ditto for all the other Artemis boards.
Thanks again for the good info.