ErichStyger / mcuoneclipse

McuOnEclipse Processor Expert components and example projects
Other
731 stars 1.29k forks source link

McuSWO.c - SWO_PrintChar - The character is always sent to Stimulus port 0. #49

Closed rogerdbenson closed 1 year ago

rogerdbenson commented 1 year ago

In McuSWO.c, in SWO_PrintChar, the port number is provided as a parameter, the the code always sends the character to port 0.

while (ITM->PORT[0].u32 == 0) { / Wait until STIMx is ready, then send data / timeout--; if (timeout==0) { return; / not able to send / } } ITM->PORT[0].u8 = c;

ErichStyger commented 1 year ago

Thank you for reporting this, good catch! I always have just used port 0 :-( Fixed and committed: https://github.com/ErichStyger/McuOnEclipseLibrary/commit/1401065e2979140349d1884006907dd7d2716423