[En-Nut-Discussion] Debug in ROM

duane ellis ethernut at duaneellis.com
Sat May 17 22:50:21 CEST 2008


ml wrote:
> Nice to hear Alain,
>
> so i must find out what's the problem in my environment.  What commands you
> are using for eclipse to debug and what Verison of cdt/eclipse/openocd ? I
> tried many versions but no one works. It allways beginns at pc=0 to debug,
> jumps to 34 and then it stops with the message "can´t find the boundarys of
> function. "
> It would be great help it debugging in flash works.
>
> Martin
>   

I'm debugging in rom right now - using:

(1) olimex - sam7-ex256

(2) arm-tool chain (i build it myself from scratch)
     gcc-4.2.2, binutils 2.18, and insight 6.8, my own 'stdc-library', I
am not using newlib.
    I'm using ethernut-4.5.3 from the tar.gz file.

(3) jtag - atmel sam-ice (segger) using gdb server.

Development host is linux box (fedora) workstation is pc - dual screen
win-xp.

I use cygwin-X to connect to the fedora box (noisy, it is in my
basement, office is 2nd floor of house)

step 1) I first use the atmel flash tool  SAM-PROG -to flash the device
with a BIN file.

    if program is RAM - I can skip this step.

step 2) start segger j-link gdb server.

step 3) start insight on my linux box.

step 4) chose FILE - OPEN - find my elf file.

step 5) - target remote:   192.168.0.14 - port 2331
       (that happens to be my PC at my desk, and the matching port
jlink gdb server uses)

Step 6) - I have to *LIE* to GDB - and tell it to download the program.

    Otherwise - it does not pretend to reset the CPU.
    JLINK - ignores this - situation - cause program is already present
in flash.
    if program was in RAM - it would have been downloaded.
   (Jlink will not erase/flash the board - I use the SAM PROG instead)

Step 7 - I am at the reset vector click step step step... and away I go.

PROBLEM/ISSUE - only occurs in FLASH based debug.

ARM7TDMI - ice only has 2 hw breakpoints.

GDB needs one - for its internal use (step over, step into, etc)

You get the other one for your breakpoints.

Works for me.

====

What I cannot get to work is that stupid "LUA" GUI front end for this 
thing. GRR... LUA yet another language I really do not want to know or 
learn. Although my son wants me to learn it - (he plays world of 
warcraft, the gui uses it) So - I disable all of that sort of stuff.

-Duane.








More information about the En-Nut-Discussion mailing list