Low Level JTAG debugging of the NXP i.MX 8M evaluation kit (MCIMX8M-EVK)
Starting with our VM from earlier we download and install Java!
Time to get Eclipse installed (I’m using the Eclipse 2018-09 R Package Eclipse IDE for C/C++ Developers)
Let’s add the needed plugins.
Click on the menu Help->Eclipse Marketplace…
I got a warning screen… sigh. I just installed anyway since it is on a VM
Lastly, I restarted Eclipse.
Setup u-boot build environment for the MCIMX8M-EVK board
Next, I need to get u-boot over and map it into our project. For this I get the vendor’s u-boot from their git and check out the branch for our board:
Test build u-boot
Time to test our build! I like doing this from the command line to isolate any issues that might come up. It would be more difficult later to debug this from Eclipse. Since we are cross-building we need to set up our environment.
Setup u-boot project in Eclipse
It works on the command line, so now it is time for us to get it into Eclipse so we can take advantage of all the features that it has.
Setup OpenOCD JTAG in Eclipse
Ok, u-boot is imported into Eclipse, now we need to setup JTAG debugging. First thing we should do is setup the udev rule so that when the JTAG is connected we don’t need to use sudo to connect. I would never recommend running Eclipse as root. One small mistake can make a quite a mess!
To create the udev rule use your favorite editor to add the file /etc/udev/rules.d/10-openocd.rules
Test this by seeing if you can connect to the JTAG from the command line without sudo:
Let’s finish up in Eclipse!