Guest
#1172495
Hi,
My problem is:
I have to write with IAP to flash, so I need to save the .text section
after 0x00001000 or 0x00002000 on flash memory.
my linker script for flash executeing is:
ENTRY(_startup) /* our entry point in startup-code */
/* LPC2148 memory map */
MEMORY
{
flash : ORIGIN = 0x00000000, LENGTH = 500K
/* available flash memory LPC2148 */
ram : ORIGIN = 0x40000200, LENGTH = 31964
/* free useable RAM of LPC2148 */
}
/* now define the output sections */
SECTIONS
{
. = 0;
startup :
{
*(.startup)
} >flash
/* all code and readonly values */
.text :
{
*(.text)
/* all .text sections (code) */
*(.rodata)
/* all .rodata sections (constants, strings, etc.) */
*(.rodata*)
/* all .rodata* sections (constants, strings, etc.) */
*(.glue_7)
/* all .glue_7 sections (no idea what these are) */
*(.glue_7t)
/* all .glue_7t sections (no idea what these are) */
} >flash
_text_end = . ;
/* initialized data */
.data :
{
_data_start = . ;
*(.data)
} >ram AT >flash
/* put all the above into RAM (but load the LMA copy into FLASH) */
. = ALIGN(4);
_data_end = . ;
/* uninitialized data */
.bss :
/* bss = block started by symbol */
{
_bss_start = . ;
*(.bss)
} >ram
/* put all the above in RAM (it will be cleared in the startup code */
. = ALIGN(4);
_bss_end = . ;
/* define a global symbol marking the end of the .bss section */
/* stack area */
/*
NOTE:
It will be filled to lower addresses and must begin on align(4)
boundary.
*/
_stack_end = . ;
_stack_start = 0x40007EDC;
/* top of free useable memory */
_end = .;
/* define a global symbol marking the end of application RAM */
}
If I set
flash : ORIGIN = 0x00001000, LENGTH = 500K
the mapfile shows me that .text section beginns at 0x00001000
but the programm doesn`t work after this change.
Have anybody an idea?
thx
Marco