Question About Debugging A Direct Boot Application over JTAG #481
-
Hello! I'm just getting started with this amazing project and am having a little trouble getting the JTAG working. My application is using "Direct Boot" and in that section it mentions
However in the JTAG section it states
Does this mean that I can't debug applications over JTAG if I'm using Direct Boot? Or is it only speaking to the ability to upload code through gdb, and breakpoint debugging is still supported in Direct Boot mode? Are there any caveats besides code upload when JTAG debugging in Direct Boot mode? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Hi Meric,
Does this mean that I can't debug applications over JTAG if I'm using
Direct Boot? Or is it only speaking to the ability to upload code through
gdb, and breakpoint debugging is still supported in Direct Boot mode? Are
there any caveats besides code upload when JTAG debugging in Direct Boot
mode?
In order for debugging to work, you will need to have *write access* to the
location from where the program code is fetched. So, the program that you
want to debug should reside in RAM for the locations to be writable. In
general, you'd have a ROM section labeled 'bootloader', and an application
that resides in RAM. This could either be IMEM or external DRAM, or
whatever.
Debugging code in ROM requires hardware breakpoints. This requires extra
logic cells to match the program counter with a whole list of breakpoint
addresses. For this reason, such an approach offers a limited number of
breakpoints. AFAIK, NeoRV does not implement hardware breakpoints at this
point.
Message ID: ***@***.***>
… |
Beta Was this translation helpful? Give feedback.
-
Hey @mericozturk!
You can also debug applications when using the direct boot setup. The problem here is that the debugger cannot insert arbitrary breakpoints. When using a RAM-based setup, the debugger temporarily (and transparently for the user) replaces instructions by "break" instructions for triggering the actual breakpoints. Obviously, this is not possible when running code from ROM. However, the NEORV32 implements the RISC-V trigger module that implements a single hardware breakpoint. This allows to implement a breakpoint even when running code from ROM. You can find some more information about this in the NEORV32 online documentation:
|
Beta Was this translation helpful? Give feedback.
Hey @mericozturk!
You can also debug applications when using the direct boot setup. The problem here is that the debugger cannot insert arbitrary breakpoints. When using a RAM-based setup, the debugger temporarily (and transparently for the user) replaces instructions by "break" instructions for triggering the actual breakpoints. Obviously, this is not possible when running code from ROM.
Howeve…