I'm learning bootloader (u-boot) and want to perform live debug u-boot with raspberry PI. My doubt is, is it possible to debug bootloader in raspberry pi?. If yes, how can i do setup to perform live debug.

I have u-boot code and compiled it and also imported in eclipse IDE. I want to know steps to do flashing the u-boot.bin into raspberry pi / SD card and then debugging with eclipse + GDB.


Debugging a running Linux kernel is possible. You will need a J-Link debug probe and you will have to enable JTAG functions on your GPIO pins. It is recommended to use an RPi 1 for this, for which there is a nice tutorial. I suppose it's possible to do the same on RPi 3, since the RPi foundation claims the SoC architecture is mostly identical, but you're on your own here (tl;dr: Broadcom BCM2837 datasheet is not available).

Note that this requires to set a non-default mode for GPIO pins, so it won't work in early boot stages. If you need to debug the bootloader or the early kernel booting steps, you'll have to use an emulator.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.