Forums

Strange Boot problem

Started by jopoulin23 July 26, 2007
Hi,

I work with an LPC2214 with external flash and ram. I use CrossStudio
with crossconnect as DevTool. For now I just try to run my program in
the internal flash and I don't use the external memory. Where my
problem is the boot pin configuration. Normally to run in internal
flash I have to left these pin high (No jump to ground). But this not
work. The program don't run and I can't connect the debugger.

But, if I put the boot pins to low the program run. To see what is
happening I hard reset the target and after I attach the debugger. At
this time the MEMMAP register is at 0x03(User external mem) and if I
read memory at address 0 I see that there is no valid vector. So I
think that the CPU run from 0 and execute invalid OP up to the
address 0x40 where the _start function of the crt0.s module are. Note
that I don't know why the bootloader allow to boot when there is not
valid vector with checksum.

There is someone can help me with this please? Some suggestion to check?

thanks
Jonathan

An Engineer's Guide to the LPC2100 Series

> But, if I put the boot pins to low the program run. To see what is
> happening I hard reset the target and after I attach the debugger. At
> this time the MEMMAP register is at 0x03(User external mem) and if I
> read memory at address 0 I see that there is no valid vector. So I
> think that the CPU run from 0 and execute invalid OP up to the
> address 0x40 where the _start function of the crt0.s module are. Note
> that I don't know why the bootloader allow to boot when there is not
> valid vector with checksum.

If all of the vectors are 0x00000000 then the checksum will be
correct. Why are they not initialized?

Ordinarily, the vectors are defined in crt0.s.

Richard
--- In l..., "rtstofer" wrote:
> > But, if I put the boot pins to low the program run. To see what is
> > happening I hard reset the target and after I attach the debugger. At
> > this time the MEMMAP register is at 0x03(User external mem) and if I
> > read memory at address 0 I see that there is no valid vector. So I
> > think that the CPU run from 0 and execute invalid OP up to the
> > address 0x40 where the _start function of the crt0.s module are. Note
> > that I don't know why the bootloader allow to boot when there is not
> > valid vector with checksum.
>
> If all of the vectors are 0x00000000 then the checksum will be
> correct. Why are they not initialized?
>
> Ordinarily, the vectors are defined in crt0.s.
>
> Richard
>

The vertor are not initialized because the code are compile to run in
the internal flash. So if I put the boot pins to boot in the external
memory there are no vertor table (External memory are blank). Review
my first post. I don't know exactly what the bootloader read when it
check the vector table but when I attach the debuger and I read the
memory at 0, the vector table was at 0xFFFFFFFF so the checksum
suppose to be bad. Note the external flash on the board are a 16bit
memory.

Jonathan
--- In l..., "jopoulin23" wrote:
>
> --- In l..., "rtstofer" wrote:
> >
> >
> > > But, if I put the boot pins to low the program run. To see what is
> > > happening I hard reset the target and after I attach the
debugger. At
> > > this time the MEMMAP register is at 0x03(User external mem) and if I
> > > read memory at address 0 I see that there is no valid vector. So I
> > > think that the CPU run from 0 and execute invalid OP up to the
> > > address 0x40 where the _start function of the crt0.s module are.
Note
> > > that I don't know why the bootloader allow to boot when there is not
> > > valid vector with checksum.
> >
> > If all of the vectors are 0x00000000 then the checksum will be
> > correct. Why are they not initialized?
> >
> > Ordinarily, the vectors are defined in crt0.s.
> >
> > Richard
> > The vertor are not initialized because the code are compile to run in
> the internal flash. So if I put the boot pins to boot in the external
> memory there are no vertor table (External memory are blank). Review
> my first post. I don't know exactly what the bootloader read when it
> check the vector table but when I attach the debuger and I read the
> memory at 0, the vector table was at 0xFFFFFFFF so the checksum
> suppose to be bad. Note the external flash on the board are a 16bit
> memory.
>
> Jonathan
>

I miss to mention that my vector table are not define in the crt0.s. I
use the startup file give with crosswork.

Jonathan
--- In l..., "jopoulin23" wrote:
>
> --- In l..., "jopoulin23" wrote:
> >
> > --- In l..., "rtstofer" wrote:
> > >
> > >
> > > > But, if I put the boot pins to low the program run. To see what is
> > > > happening I hard reset the target and after I attach the
> debugger. At
> > > > this time the MEMMAP register is at 0x03(User external mem)
and if I
> > > > read memory at address 0 I see that there is no valid vector. So I
> > > > think that the CPU run from 0 and execute invalid OP up to the
> > > > address 0x40 where the _start function of the crt0.s module are.
> Note
> > > > that I don't know why the bootloader allow to boot when there
is not
> > > > valid vector with checksum.
> > >
> > > If all of the vectors are 0x00000000 then the checksum will be
> > > correct. Why are they not initialized?
> > >
> > > Ordinarily, the vectors are defined in crt0.s.
> > >
> > > Richard
> > >
> >
> > The vertor are not initialized because the code are compile to run in
> > the internal flash. So if I put the boot pins to boot in the external
> > memory there are no vertor table (External memory are blank). Review
> > my first post. I don't know exactly what the bootloader read when it
> > check the vector table but when I attach the debuger and I read the
> > memory at 0, the vector table was at 0xFFFFFFFF so the checksum
> > suppose to be bad. Note the external flash on the board are a 16bit
> > memory.
> >
> > Jonathan
> > I miss to mention that my vector table are not define in the crt0.s. I
> use the startup file give with crosswork.
>
> Jonathan
>

Hi,

I finally resolved my problem. But I don't know what the problem are
!!! This morning I try to restart to zero and step by step come to
what I had. And all work correctly.

I think I really need my vacation. 2 more week. before it. I dream !! :)

thanks
Jonathan