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]

Re: about redboot, gdb and embedded ice


A Roturier wrote:
> 
> hi list,
> 
> i make reboot image from arm aeb2 code and try to load it onto samsung
> snds board(both with same samsung arm7 chips. its merely for testing purpose
> only and i don't expect ecos' gonna run at all :-)). i have a few questions:
> 
> 1, how do i change byte ordering from little endian to big endian?

If it's a big endian board, then you're going to have to recompile with
big-endian compiler options. Swapping the bytes in the executable isn't
enough (or correct).

> 2, after downloading redboot image onto the target with arm-elf-gdb, i can
>    only start single step execution by issuing 'nexti' in gdb console.
> either
>    clicking on those execution 'buttons' in the main window or issuing
> 'next'
>    commman in console will make gdb 'hang'. this seems doesn't make sense.

At a guess it's probably because at the point you are stepping from there
is no source code context. So there is no next source line to step to as
GDB rightly hasn't the slightest clue where you are. Set a breakpoint at
your program entry point instead and continue to there.
 
> 3, after downloading image and before execution, what are the [correct]
> initial
>    valuse of cpu registers? i observe that register values don't change a
> bit
>    after i connect to target and before the execution starts(cpsr=0x60000010
> in
>    this case. i.e., cpu is in user mode. and pc is not the specified ecos
> entry
>    point). is this the right condition?

Is this in the ICE? In that case I'm not surprised because you are still in
RedBoot at the time. The registers (and PC) are only changed when the stub
in RedBoot passes control to the loaded application.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/


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