The updated Simplicity Studio has separate icon for SWO Terminal (before is embedded in eA Commander).
The printf message can't display to SWO Terminal anymore after this update, what is the problem?
And it will have "Fatal Error - Connection with device lost..." if the reset key of STK is pressed. It doesn't have such problem on previous SWO Terminal software.
I couldn't get this to work either. I'll check with the software team.
In the meantime, you can install the old eA Commander tool by adding the optional legacy package. See the following KB article for more information:
I reported the fatal error when resetting the MCU to our software team (reference: MCUAB-1722).
I was able to get the SWO terminal and debug console window to output ascii characters when using the recommended instructions (displayed when you first launch SWO Terminal):
*** This is a Serial Wire Output based console.***
To use it you must do two things:
1. Set up the Serial Wire Output in your application.
You can use the function below for this.
NOTE: This funtion is different than the one used
in the profiler!
2. To print a single character use the CMSIS function
/* Enable GPIO clock. */
CMU->HFPERCLKEN0 |= CMU_HFPERCLKEN0_GPIO;
/* Enable Serial wire output pin */
GPIO->ROUTE |= GPIO_ROUTE_SWOPEN;
#if defined(_EFM32_GIANT_FAMILY) || defined(_EFM32_LEOPARD_FAMILY) || defined(_EFM32_WONDER_FAMILY)
/* Set location 0 */
GPIO->ROUTE = (GPIO->ROUTE & ~(_GPIO_ROUTE_SWLOCATION_MASK)) | GPIO_ROUTE_SWLOCATION_LOC0;
/* Enable output on pin - GPIO Port F, Pin 2 */
GPIO->P.MODEL &= ~(_GPIO_P_MODEL_MODE2_MASK);
GPIO->P.MODEL |= GPIO_P_MODEL_MODE2_PUSHPULL;
/* Set location 1 */
GPIO->ROUTE = (GPIO->ROUTE & ~(_GPIO_ROUTE_SWLOCATION_MASK)) |GPIO_ROUTE_SWLOCATION_LOC1;
/* Enable output on pin */
GPIO->P.MODEH &= ~(_GPIO_P_MODEH_MODE15_MASK);
GPIO->P.MODEH |= GPIO_P_MODEH_MODE15_PUSHPULL;
/* Enable debug clock AUXHFRCO */
CMU->OSCENCMD = CMU_OSCENCMD_AUXHFRCOEN;
/* Wait until clock is ready */
while (!(CMU->STATUS & CMU_STATUS_AUXHFRCORDY));
/* Enable trace in core debug */
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
ITM->LAR = 0xC5ACCE55;
ITM->TER = 0x0;
ITM->TCR = 0x0;
TPI->SPPR = 2;
TPI->ACPR = 0xf;
ITM->TPR = 0x0;
DWT->CTRL = 0x400003FE;
ITM->TCR = 0x0001000D;
TPI->FFCR = 0x00000100;
ITM->TER = 0x1;