Yes, I have customized the CPU settings so there is a single ram bank of 0x3000 starting @ 0x2000000, rather than the 3 separate RAM banks that were the default setting.
I also have a customized linker script that that shifts the entry point up in flash to accommodate for a boot loader. This is file main_test_section.ldt, copied below.
I can provide the code privately; let me know where to send my project archive files.
- Joe
/* MAIN TEXT SECTION */
.text : ALIGN(${text_align})
{
FILL(0xff)
__vectors_start__ = ABSOLUTE(.) ;
KEEP(*(.isr_vector))
/* jmd: The default linker script is modified. To disable this warning, goto Window | Preferences | LPCXpresso
| Default Tool settings, and uncheck "...and compare with script generated using old-style templates." */
/* Here I use the "dot" command to move the program counter to move the main program code up to where it would be
if loaded by the bootloader. This is done so I can use the same binary to debug and create the image
for the bootloader. (The old way was to set the flash address to 0 when debugging, and then switch it to 0x6000
when creating the image that would be passed to the bootloader image file creator (the encrypt utility.)
When loaded by the bootloader, the vectors start at 0x6000, and then the program code is after the vectors.
I need to know how much space the vectors use to make best use of space, but you can always go over.
On the LPC15XX, vectors end at 0X110. But I picked 0x120 (8 word boundary) so I can see it easy in memory displays.
It is also possible to use the space between the vectors and program code to store information about the code
(version number for example), so it can be read by the bootloader or other external tools.
*/
. = 0x6120; /* Start the program code at this location */
/* Code Red uses the small space between the vectors and CRP to place the startup code (see cr_startup_lpc15xx.c) and the global_section_table that is referenced by the startup code.
This needs to be moved up as well. */
<#include "global_section_table.ldt" >
*(.after_vectors*)
/* CRP will never be used with this code. (Only in the bootloader.) So do not allow the linker to try to inject
the CRP value at 0x2FC. */
/* jmd removed: <#include "crp.ldt" > */
/* End of my linker modifications :dmj */
} >${CODE}
.text : ALIGN(${text_align})
{
<#include "main_text.ldt" >
<#include "main_rodata.ldt" >
<#include "cpp_info.ldt" >
} > ${CODE}