This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Fwd: Re: "Ignoring packet error" in GDB
- From: leslie <egeus at rocketmail dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Tue, 14 Dec 2004 20:48:26 -0800 (PST)
- Subject: [ECOS] Fwd: Re: [ECOS] "Ignoring packet error" in GDB
hello all,
Previously I managed to run the application by starting from the offset
address to the "main", and it worked, but when I try to do that on
another program (that just prints a statement) it does not work. I
supposed its because there is branching in the code and it'll crash
when accessing the wrong application.
I tried unchecking the "claims virtual vector" but the vector tables
are still compiled into the program.
Anyone knows how to properly run the application (what steps I taken
wrongly) or should I simply overwrite Redboot and use the
start from ROM option?
Rgds,
Leslie
--- leslie <egeus@rocketmail.com> wrote:
> From leslie Mon Dec 13 06:44:26 2004
> Received: from [155.69.5.235] by web10804.mail.yahoo.com via HTTP;
> Mon, 13 Dec 2004 06:44:26 PST
> Date: Mon, 13 Dec 2004 06:44:26 -0800 (PST)
> From: leslie <egeus@rocketmail.com>
> Subject: Re: [ECOS] "Ignoring packet error" in GDB
> To: ecos-discuss@sources.redhat.com
> In-Reply-To: <20041213084919.GB14820@lunn.ch>
> MIME-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Length: 2086
>
> Hi,
>
> I took a look at the disassembled codes, at it showed that the
> exception handlers were defined at the beginning:
>
> Disassembly of section .rom_vectors:
>
> 00010000 <__exception_handlers>:
> 10000: e59ff018 ldr pc, [pc, #24] ; 10020 <vectors>
> 10004: e59ff018 ldr pc, [pc, #24] ; 10024
> <.undefined_instruction>
> 10008: e59ff018 ldr pc, [pc, #24] ; 10028 <.software_interrupt>
> 1000c: e59ff018 ldr pc, [pc, #24] ; 1002c <.abort_prefetch>
> 10010: e59ff018 ldr pc, [pc, #24] ; 10030 <.abort_data>
>
> .......
>
> .......
>
> and the main program is defined at and offset of 500
>
> int main(void)
> {
> cyg_uint32 a,b;
> HAL_READ_UINT32(E7T_IOPMOD, a);
> 10500: e3a0367f mov r3, #133169152 ; 0x7f00000
> 10504: e2833af5 add r3, r3, #1003520 ; 0xf5000
> 10508: e5932000 ldr r2, [r3]
> ........
> ........
>
> And the program works and complete successfully when I GO from
> location
> with offset 500 from the base address I loaded.
>
> I would like to find out whether to run any eCos application, I need
> to
> start running from an offset location of the address where program is
> loaded? Or is there a way that I can not include the vectors portion.
>
> I also understand from Andrew that 0x10000 is as defined in my .ldi
> files, and that is why GDB cannot load the program onto my target. My
> RAM is mapped from 0x00000000-0x00080000 and ROM from 0x01800000 to
> 0x01880000.
>
> Below are my .ldi files, is there anything wrong with it?
>
> mlt_arm_e7t_rom.ldi:
>
> MEMORY
> {
> ram : ORIGIN = 0, LENGTH = 0x80000
> rom : ORIGIN = 0x1800000, LENGTH = 0x80000
> }
>
> SECTIONS
> {
> SECTIONS_BEGIN
> SECTION_rom_vectors (rom, ALIGN (0x1800000), LMA_EQ_VMA)
> SECTION_text (rom, ALIGN (0x1), LMA_EQ_VMA)
> SECTION_fini (rom, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_rodata (rom, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_rodata1 (rom, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_fixup (rom, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_gcc_except_table (rom, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_fixed_vectors (ram, 0x20, LMA_EQ_VMA)
> SECTION_data (ram, 0x8000, FOLLOWING (.gcc_except_table))
> SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
> CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
> SECTIONS_END
> }
>
> mlt_arm_e7t_ram.ldi:
>
> MEMORY
> {
> ram : ORIGIN = 0, LENGTH = 0x80000
> }
>
> SECTIONS
> {
> SECTIONS_BEGIN
> SECTION_fixed_vectors (ram, 0x20, LMA_EQ_VMA)
> SECTION_rom_vectors (ram, 0x10000, LMA_EQ_VMA)
> SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_rodata1 (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_gcc_except_table (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_data (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
> CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
> SECTIONS_END
> }
>
> Thanks alot for the help everyone!
>
> Rgds,
> Leslie
>
> --- Andrew Lunn <andrew@lunn.ch> wrote:
>
> > On Sun, Dec 12, 2004 at 09:26:37AM -0800, leslie wrote:
> > > Hi all,
> > >
> > > I still couldn't get my program to execute on the board.
> > > So I tried using the GDB to see whats the error messages
> generated,
> > but
> > > there are some problems. I managed to connect to the target
> > (program
> > > stopped at 0x180771c), but while downloading the program onto the
> > > board, I got the "Ignoring packet error" message.
> > >
> > > I checked for similar problems discussed in the mailing list but
> I
> > > don't think its due to downloading program in a non RAM region,
> as
> > in
> > > most cases I found. My RAM region is from address 0x0000-0x48000
> > and
> > > from my available RAM is from 0x168A0-0x48000. The various
> sections
> > > were downloaded to region before 0x168A0 (thats region used by
> > Redboot
> > > for vector tables and runtime data right?). And the errors
> occured
> > > while loading the sections. So what could be the reason that I
> > failed
> > > to download the program for debugging?
> >
> > Yes, you are downloading your program on top of the currently
> running
> > program which causes it to crash.
> >
> > > What does it mean by eCos application is not position
> independent?
> > Is
> > > it okay to run the program as long as I load it in the free RAM
> > region?
> >
> > A position independant program is one that you can load anywhere
> into
> > RAM and it will execute correctly. It does not care where in RAM it
> > is. eCos programs are not position independent. They must be loaded
> > exactly where they expect to be.
> >
> > > >From what I read in the documentations, after loading the image
> > eCos
> > > should know where to start execution. Do I have to define the
> > location
> > > to load the image in the linker file?
> >
> > Yes. Take a look at the .ldi files in the HAL sources for your
> > target.
> >
> > Andrew
> >
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - 250MB free storage. Do more. Manage less.
> http://info.mail.yahoo.com/mail_250
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss