This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems with RedBoot and serial port debugging


Normally, I use a JTAG debugger, but for basic eCos demonstration
purposes, I'd like to use RedBoot GDB support and serial debugging.

However, I can't get breakpoitns to work properly...

Here is what I did:

- I've built and flashed a RedBoot to EB40a
- I've built a hello world app which has entry point at 0x10000. It runs
out of RAM.
- Debug session:

--------
(gdb) set remotebaud 38400
(gdb) target remote /dev/ttyS4
Remote debugging using /dev/ttyS4
0x01004958 in ?? ()
(gdb) load
Loading section .rom_vectors, size 0x40 lma 0x10000
Loading section .text, size 0xa360 lma 0x10040
Loading section .rodata, size 0x294 lma 0x1a3a0
Loading section .data, size 0x2e4 lma 0x1a634
Start address 0x10040, load size 43288
Transfer rate: 28858 bits/sec, 300 bytes/write.
(gdb) break main
Breakpoint 1 at 0x10564: file hello.cpp, line 5.
(gdb) 
(gdb) c
Continuing.

=============> would have expected debugger to break @ main


Interrupted while waiting for the program.
Give up (and stop debugging it)? (y or n) y
(gdb) Quit
----------------

- I fire up HyperTerminal to see if I can figure out whats going on.
- I find RedBoot alive and well ??
- Just for the heck of it, I start my app
- Now it hits the breakpoint!
------------------
RedBoot> go 0x10040
$T05thread:00000001;0f:64050100;0d:ace50100;#ea
------------------

- Continuing in GDB session

-------------------
(gdb) target remote /dev/ttyS4
Remote debugging using /dev/ttyS4
main () at hello.cpp:5
5         printf("Hello world\n");
(gdb) 
--------------------

-- 
Øyvind Harboe
http://www.zylin.com



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]