AnsweredAssumed Answered

Baremetal debug imx8

Question asked by Eddie Vazquez on Jan 16, 2019
Latest reply on Jan 17, 2019 by igorpadykov

Hello everyone,


I am trying to baremetal debug the I.MX8M, specifically the Cortex A53 core; using JTAG, OpenOCD and GBD for aarch64, however I bumped into a couple of questions. I hope you can help me out. I went through all IMX8M section and I did not find anything that could help me.


I managed to communicate with the Cortex A53 using OpenOCD to my host computer, however I am not sure I can really debug the code I want. I compiled both a basic assembly and c code with the intention of modifying the processor registers (w0,w1…etc.)and run it using GBD, however all registers stay the same all the time only the PC changes accordingly which makes me think the code is not actually running on the processor. So, does the imx8m accept code via JTAG and GBD or do I have to load  in the NAND or eMMC, or SD card beforehand?  Sorry if this stupid question.


I am not interested in running linux at all I just want to run a basic COMPLETELY BAREMETAL code namely a basic C driver or just a basic assembly code (ie. Adding two numbers). How can I accomplish this? Do I have to program the code in one of the memories the processor normally uses to boot? If, so is there any guide or starting template you can provide me with ? I found several document but they all refer to linux baremetal or to the Cortex M core which I am not interested in.


  • Specifically, how can I run a simple single baremetal C code on the Cortex A53 of the IMX8M ?
  • How or what tools could I use to program the available memories to run such code?
  • Is there something I am not considering?
  • Is this even possible for this processor?


Any help will be welcomed


Thank you