public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Problems with RedBoot and serial port debugging
@ 2004-05-25 20:52 Øyvind Harboe
  0 siblings, 0 replies; 2+ messages in thread
From: Øyvind Harboe @ 2004-05-25 20:52 UTC (permalink / raw)
  To: ecos-discuss

Blush!

Sometimes I have to give up before I see the solution.

I had not built RedBoot ROM correctly. It should have been:

ecosconfig new eb40a redboot
ecosconfig import xxx/hal/arm/at91/eb40a/current/misc/redboot_ROM.ecm
ecosconfig tree
make

My mistake was to use "ecosconfig new eb40a default", which apparently builds 
a RedBoot that works well enough to lead me astray when hunting down the problem.


-- 
Ø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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ECOS] Problems with RedBoot and serial port debugging
@ 2004-05-25 19:44 Øyvind Harboe
  0 siblings, 0 replies; 2+ messages in thread
From: Øyvind Harboe @ 2004-05-25 19:44 UTC (permalink / raw)
  To: ecos-discuss

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-25 20:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-25 20:52 [ECOS] Problems with RedBoot and serial port debugging Øyvind Harboe
  -- strict thread matches above, loose matches on Subject: below --
2004-05-25 19:44 Øyvind Harboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).