Debugging Cortex M4 application (in iMX7) on a host system

Hi,

In the getting started guide of iMX7/colibri eval board, a hello-world and RPMsg application examples are provided for the Cortex-M4, where a firmware has to be built and sent to the Cortex M4 through u-boot.
However it’s not clear whether it is possible to debug a Cortex-M4 application online and directly from a host system, just like debugging a Cortex A9 application.
So is there any direct debugging way for Cortex-M4 using eclipse or other software?
Thanks in Advance.

Best regards,
Majd

Hi @majd.m!

You can refer to this post about importing the FreeRTOS examples to Eclipse. You just have to use the correct linker script. You can use the Segger-provided script using a J-Link connected to JTAG to debug the applications through Eclipse.

Hi @gustavo.tx,

Could you please recommend me a J-Link model to use it on the M4 processor for both SoMs: iMX7 and iMX8QM. Is there a model that is tested on the boards of these SoMs?

Hi @majd.m!

I’ve had success using a J-Link BASE we have here in the office. I assume any J-Link model that supports Cortex-M cores should work.

Note that I’ve only tested this with the Colibri iMX7. I still haven’t tested the M4 capabilities on the new iMX8 SoMs.

Hi @gustavo.tx,
Thank you for your answers. Can I connect the cable which comes with the J-Link directly to the J-Tag port auf dem Colibri eval Board or do i need any adapter that are listed in the J-Link webpage?

@majd.m,

You can connect the default 20-pin JTAG cable which comes with J-Link to the 20-pin JTAG connector on the Colibri Evaluation Board.

Dear @majd.m
We found that sometimes the JTAG connection through the spring-loaded contacts is not reliable enough. In such cases it helps to put some electrically isolated weight onto the module to fix connection issues.

Regards, Andy

Hello.

Is it possible to debug M4-core of VF61 which is installed on Viola board?
I mean debugging via UART.

Or maybe it is possible to make JTAG on Viola?

If yes, please could you explain how.

Hi @Volodymyr !

Proper M4 debugging is available only via JTAG.

Unfortunately the Viola Carrier Board does not feature a JTAG connector nor the JTAG pins. You may want to get an Aster Carrier Board or a Colibri Evaluation Board for that.