I’m developing M4 application on my iMX8-MM SoM. freeRTOS scheduler deals with lot of tasks and I would like to enable Segger real time terminal for debugging purposes. This is my current setup:
int main(void)
{
/* Initialize standard SDK demo application pins */
/* Application specific */
BOARD_RdcInit();
BOARD_InitBootPins();
BOARD_BootClockRUN();
BOARD_InitDebugConsole();
BOARD_InitMemory();
copyResourceTable();
SPI_Init();
/* Segger stuff */
SEGGER_RTT_Init();
SEGGER_RTT_printf(0, "RTT is working\n");
PRINTF("Hello \n");
...
I successfully built the code above and flash it to Verdin M4 (i paused uboot before Linux boot), J-Link RTT Viewer attaches to J-Link connection, but program doesn’t sends anything to RTT when gets to SEGGER_RTT_printf line.
My Verdin SoM is connected to Verdin development board and Im using Segger JLink 11.0 version for debugging.
I never tried SEGGER RTT with the M4 on our SoCs but I would start by trying some of their sample code on SEGGER`s documentation. I don’t think that’ll immediately solve your issues but perhaps starting by using their API calls and that only will output something useful.
Are you also starting the regular J-Link debugger here (JLinkExe)? Which product name/part number are you using on the J-Link configuration?
we decided to give up M4 approach for our application, sorry for late reply.
Im using VScode and Cortex-Debug extension for development and debugging.
Device Im using is MIMX8MM1_M4. I think Im allowed to, at least share my launch.json: