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: loading application on redboot


I use GDB at 115200.

In one of your earlier emails you said that Redboot/GDB did not respond to "$#00". If this does not work, then there is no way that GDB could work.

I faced the same problem earlier. When Redboot sees the 1st ?$?, its gona load the context for trampoline() using hal_thread_load_context() os arm/arch/src/context.S

code form /redboot/src/main.c:

HAL_THREAD_INIT_CONTEXT((CYG_ADDRESS)workspace_end, breakpoint, trampoline, 0); // switch context to trampoline (get GDB stubs started) HAL_THREAD_SWITCH_CONTEXT(&saved_context, &workspace_end);

The last instruction at hal_thread_load_context(),
movs    pc,lr

is going to load the CPSR with SPSR, which has the I ? bit set. So if you have any pending unattached (or not configured), unexpected interrupts, then the processor will branch to an ISR that?s not there (in my case I had the RTC ISR pending ? if you need more info. check the emails by me 2 months earlier on this forum). I advice you to investigate all the key registers just before this last instruction ?movs pc,lr? is taken. & Follow the flow further down using a JTAG probe.

Cheers,
-Mike.

-Mike.


From: Satish Kumar <satish@bvt.sc.sanyo.co.jp>
To: "Michael Anburaj" <embeddedeng@hotmail.com>
CC: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] loading application on redboot
Date: Fri, 01 Aug 2003 17:36:22 +0900

i was just wondering if gdb fails to work on 115200 baudrate, coz the
gdb fails to connect even after setting the baudrate to 115200.

satish


On Fri, 01 Aug 2003 08:31:36 +0000 "Michael Anburaj" <embeddedeng@hotmail.com> wrote:

> Yea,
>
> open gdb with -w (insight) & you can set the baud rate at target settings,
>
> $ arm-elf-gdb -w hello
>
> or if you open the text gdb
>
> gdb> set remotebaud 115200
>
> -Mike.
>
> >From: Satish Kumar <satish@bvt.sc.sanyo.co.jp>
> >To: Jonathan Larmour <jifl@eCosCentric.com>
> >CC: Michael Anburaj
> ><embeddedeng@hotmail.com>,ecos-discuss@sources.redhat.com
> >Subject: Re: [ECOS] loading application on redboot
> >Date: Fri, 01 Aug 2003 17:22:50 +0900
> >
> >well, actually my serial driver is set to baudrate 115200..
> >will the GDB work on this baudrate..?
> >
> >satish
> >
> >
> >On Fri, 01 Aug 2003 05:34:08 +0100
> >Jonathan Larmour <jifl@eCosCentric.com> wrote:
> >
> > > Satish Kumar wrote:
> > > > Hi,
> > > >
> > > > using hyperteminal i have downloaded hello.srec at 0x40000 and
> >this
> > > > time when i tried "go 0x40040" redboot hangs..i see no output on the
> > > > hyper terminal.
> > > >
> > > > btw, i tried another method i.e using arm-elf-gdb..after powering on
> >my
> > > > system, on "arm-elf-gdb -nw hello" ;i get the following output:
> > > >
> > > > $ arm-elf-gdb -nw hello
> > > > GNU gdb 5.3 (eCosCentric)
> > > > 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-cygwin --target=arm-elf"...
> > > > (gdb) target remote com1
> > > > Remote debugging using com1
> > > > Ignoring packet error, continuing...
> > > > Ignoring packet error, continuing...
> > > > Ignoring packet error, continuing...
> > > > Couldn't establish connection to remote target
> > > > Malformed response to offset query, timeout
> > > > (gdb) quit
> > > >
> > > > i m not sure if the problem is with building application or with
> > > > the redboot_ROM monitor.
> > >
> > > This probably means your application isn't built for the right address
> >in
> > > RAM. Do arm-elf-objdump -h on the (ELF) executable to see what the load
> > > address is, and compare that against your memory map.
> > >
> > > Jifl
> > > --
> > > eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot
> >experts
> > > --[ "You can complain because roses have thorns, or you ]--
> > > --[ can rejoice because thorns have roses." -Lincoln ]--
> >Opinions==mine
> >
> >--
> >Satish Kumar <satish@bvt.sc.sanyo.co.jp>
> >
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus


--
Satish Kumar <satish@bvt.sc.sanyo.co.jp>


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


_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail



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