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]

Re: Evaluator 7t - Reboot and gdb difficulties (with some progress!)


Greetings all,

I am progressing, Thanks Mark, that makes a lot of sense...
>
> This tells you that the app you are downloading is being written to
> 0x8000 - 0x1087F which is overwriting RedBoot data.
>
> --Mark

Okay, so I changed the link script to move the .text section out to 0xc000 
and I was able to download the entire program to the development board as 
follows below...

However when I want to start running my program I get SIGTRAP at 0x0000c008.
With the Angel Debug Monitor the program still works fine at the new offset.

The code clearly calls SWI:
0xc000 <start>: mov     r0, #22 ; 0x16
0xc004 <start+4>:       add     r1, pc, #196    ; 0xc4
0xc008 <start+8>:       swi     0x00123456
0xc00c <start+12>:      ldr     r0, [pc, #188]  ; 0xc0d0 <start+208>
0xc010 <start+16>:      ldr     sp, [r0, #8]

I have another question:

1. Is RedBoot...
A) A bootloader that contains flashutilities and access via ethernet or 
serial for GDB debug of ANY program that can execute on the target?

OR

B) A bootloader AND eCos operating system core that allows GDB to debug 
program executing under the eCos OS.

OR

C) Something else...


Why the program contains the SWI, I do not know... But I am guessing that 
RedBoot has setup a vector to handle this and it is being caught rather than 
ignored...?

Thanks again.

/James



Here is the output....
-------------------------------------------------------------------------------
james@jupiter [20:31:39] ~$ arm-elf-gdb -nw hello
GNU gdb 5.1.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
(gdb) set remotebaud 38400
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
0x0183123c in ?? ()
(gdb) load
Loading section .text, size 0x894c lma 0xc000
Loading section .rodata, size 0x230 lma 0x1494c
Loading section .data, size 0x85c lma 0x14c7c
Loading section .ctors, size 0x8 lma 0x154d8
Loading section .dtors, size 0x8 lma 0x154e0
Start address 0xc000, load size 37864
Transfer rate: 25242 bits/sec, 300 bytes/write.
(gdb) continue
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x0000c008 in start ()
(gdb)


-------------------------------------------------------------------------------
james@jupiter [20:36:00] ~$ arm-elf-gdb -nw hello
GNU gdb 5.1.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
(gdb) set remotebaud 57600
(gdb) target rdi /dev/ttyS0
Angel Debug Monitor V1.31 (ARM, INC. Evaluator Release v1.01)
Built for ARM7TDMI Serial, IRQ
Built Sep 26 2000
Serial Rate:  57600
RDI_info: internal error, unimplemented message
Connected to ARM RDI target.
(gdb) load
Loading section .text, size 0x894c lma 0xc000
Loading section .rodata, size 0x230 lma 0x1494c
Loading section .data, size 0x85c lma 0x14c7c
Loading section .ctors, size 0x8 lma 0x154d8
Loading section .dtors, size 0x8 lma 0x154e0
Start address 0xc000, load size 37864
Transfer rate: 33656 bits/sec, 485 bytes/write.
(gdb) continue
Continuing.
hello, world!
hello, world!
hello, world!
hello, world!
hello, world!
hello, world!
hello, world!
hello, world!
hello, world!
hello, world!

Program exited normally.
(gdb)
-------------------------------------------------------------------------------

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


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