2020-09-15 08:12 AM
Hi,
i'm working on a STM32H755II MCU, I followed this guide and setup two debug configurations one for CM7 (that downloads both codes) and one for CM4. I added on the CM7 project the common implementation for printf:
int printf_swo(char *ptr)
{
uint32_t len = sprintf(ptr, ptr);
uint32_t i = len;
/* Implement your write code here, this is used by puts and printf for example */
for (; i > 0; i--)
{
ITM_SendChar((*ptr++));
}
return len;
}
I correctly see debug logs in the SWV ITM Data Console from port 0. I'd like to do the same thing with CM4 (prints should be enabled alternatively on the cores). So, i disabled the SWV Trace in the CM7 configuration and enable it in the CM4. I moved printf function to CM4 project, then i launched the configurations but on the console i don't see any log from the cm4 core.
Registers seem configured correctly to me:
(int *) 0x5C004000 = 0x302 [SWTF_CTRL]
ITM->TER = 1
ITM->TCR = 65551
Can you help me?