Moving from 2106 to 2138

Started by Nice Guy July 26, 2005
In a school project we were originally going to use a 2106, but have
decided to move to a 2138 due to extra GPIO pins and External
Interrupts that are edge sensitve. We have been sucessfully
developing for the 2106 with no problems using GCC and .ld and crt.s
files from an example project. What will need to be changed when
going to the 2138. I know the following will need to be corrected in
the .ld file:

/* Memory Definitions */
MEMORY
{
ROM (rx) : ORIGIN = 0x00000000, LENGTH = 0x00020000
RAM (rw) : ORIGIN = 0x40000000, LENGTH = 0x00010000
}

Is this all that will need to be changed?

Thanks,
Reggie McMurtrey


An Engineer's Guide to the LPC2100 Series

That's basically it; you may also want to set the stack end in the .ld
file. Here are the top few lines from my lpc2138.ld file:

MEMORY {
flash : ORIGIN = 0, LENGTH = 500K
ram : ORIGIN = 0x40000000, LENGTH = 32K
}

__stack_end__ = 0x40000000 + 32K - 4;

One thing to look out for, is that the bootloader of the LPC2138 is 12
kiB, instead of 8 kiB of the LPC2106. That is why I set the Flash
length at 500 kiB (500 + 12 for the bootloader = 512 kiB).

Thiadmer