Baremetal debug imx8

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Baremetal debug imx8

2,860 Views
eddie_vazquez_h
Contributor II

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

0 Kudos
4 Replies

1,995 Views
igorpadykov
NXP Employee
NXP Employee

Hi Eddie

one can check

Debugging the i.MX 8M SOM Using ARM DS-5 

DS-5 5.29 brings latest IP support, debug improvements - Software Tools blog - Software Tools - Arm ... 

I am afraid nxp does not support baremetal examples on the Cortex A53 i.MX8M.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,995 Views
eddie_vazquez_h
Contributor II

Sorry also I forgot is there any detailed information on how does the CortexA53 boots on the evaluation boards.

Thanks

0 Kudos

1,995 Views
igorpadykov
NXP Employee
NXP Employee

Hi Eddie

boot is described in sect.6.1 System Boot i.MX8MDQ Reference Manual
https://www.nxp.com/docs/en/reference-manual/IMX8MDQLQRM.pdf

ROM does not prevent from running baremetal code.

Best regards
igor

0 Kudos

1,995 Views
eddie_vazquez_h
Contributor II

thanks a lot for your info. very helpful

I did not quite understand tho. So can a GDB send and run code via JTAG to the I.MX8M and debug?

Regarding the baremetal on COrtex A53. Does the ROM prevent then from running baremetal code?

Thanks  Igor,

0 Kudos