[ECOS] "Ignoring packet error" in GDB

leslie egeus@rocketmail.com
Mon Dec 13 14:44:00 GMT 2004


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

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



More information about the Ecos-discuss mailing list