[eresi-dev] KEDBG-JTAG meeting #2 follow up
Julien Vanegue
jvanegue at gmail.com
Fri Apr 24 08:41:53 UTC 2009
Here is what has been done during the meeting #2 for the ERESI JTAG debugger
implementation:
The goals for this milestone were:
(1) Add a new state in kedbg to have the new EMBEDDED debugging mode -
already commited by Eric (rev 1341)
(2) Implement kedbg_file_is_embedded() function and modify kedbg_main() to
make use of it at line ~305
(3) Modify the kedbg_biosmap_load() function to be reusable for the EMBEDDED
target (add parameters ?) at kedbg_main() at line ~320
(4) Write a new libgdbwrap API function to handle $qXreq:memory-map:(...)
gdb packet format, as used for the MEMORYMAP request.
(5) Write a minimalistic gdbwrap_memorymap_read() function for the MEMORYMAP
data sent by server JTAG debugger on initialization.
Results:
- Jeez implemented (1), (2), (4), (5)
- (3) is on hold due the the discovered complexity of that function.
Multiple PHDR must be inserted in the ELF map file (one for flash, RAM, and
ROM). We currently need the ELF map to be provided to kedbg. This is not a
blocker.
- The ERESI JTAG debugger manages to connect to OPENOCD but sometimes needs
multiple try (see below)
During the meeting, we also tested the following:
- D/X commands on various sections of the (ARM) ELF map (.vectors,
.vectors_ram, .data, etc) as well on some fixed addresses (0x0, 0x40000000,
etc).
=> segfault all the time in static or dynamic mode in kedbg.
=> works in elfsh
We are still unsure why this problem arises, but I can see the following
reasons, in decreasing likehood order:
- GDB requests for readmemory are misunderstood by OPENOCD. To verify that
readmem requests actually succed.
- The requested addresses are invalid. Maybe a base address needs to be
assigned to the ARM map (file->rhdr->base) if the memory and the ELF file
hasnt been mapped at address 0 in the board's memory.
- Too many (or too big/small) requests are performed. The size of our
request was determined by testing vmware and qemu.. it could be that openocd
requires reqsize adjustment in libstderesi/cmd/disasm.c
Which gives us the following new urgent TODO for KEDBG-JTAG before starting
millestone #2:
(A) Bug #122: D/X commands fails in static or dynamic mode.
(B) Finish step (3) by calling the regular libelfsh API for injecting 2
additional program headers (see elfsh_insert_phdr() function, and its
example uses in libelfsh)
(C) Patch the bug when kedbg fails to connect to openocd (trace sent on the
eresi crew ml.. please next time open a bug with an attachement).
We will then able to prepare millestone #2 (as defined in the meeting #1)
Julien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.einherjar.de/pipermail/eresi-dev/attachments/20090424/8e02ceb3/attachment.html>
More information about the eresi-dev
mailing list