[ECOS] Evaluator 7t - Reboot and gdb difficulties (with some progress!)

Mark Salter msalter@redhat.com
Wed May 22 05:21:00 GMT 2002


>>>>> James Harris writes:

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

RedBoot does not recognize Angel SWI calls. You built the program to
run on Angel and run on Angel you must.

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

A. If you can download and run the program standalone, you should be
able to download and run it under GDB control. The program has to play
nice with the gdb stub in RedBoot, however. For instance, if your
program installs its own exception handlers, then the gdb stub in
RedBoot might not see that the program hit a breakpoint.

> 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...?

The program is trying to communicate with the Angel stub. How did you build
it?

--Mark

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



More information about the Ecos-discuss mailing list