EmbDev.net

Forum: ARM programming with GCC/GNU tools LPC2000 download error!


Author: kamil (Guest)
Posted on:

Rate this post
0 useful
not useful
Hello All,

I am using YAGARTO 4.2.2 and using lpc2000 flash utility.
when i download the main.hex using lpc2000 following error occur;

"code in hex fileexceed flash limitations"

the cpu core i used :LPC2138

the linker script file i used below;
*********************************************************************
/* 
************************************************************************ 
******************************  */
/*

/* identify the Entry Point  */

ENTRY(Reset_Handler)




MEMORY
{
  flash  : ORIGIN = 0x00000000, LENGTH = 128K  /* free FLASH EPROM area 
*/
  ram     : ORIGIN = 0x40000000, LENGTH = 64K    /* free RAM area  */
}



/* define a global symbol _stack_end  */

_stack_end = 0x4000FEDC;



/* now define the output sections  */

SECTIONS
{
  startup : { *(.startup)} >ram      /* the startup code goes into FLASH 
*/



  .text :                /* collect all sections that should go into 
FLASH after startup  */
  {
    *(.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) */
    _etext = .;            /* define a global symbol _etext just after 
the last code byte */
  } >ram                /* put all the above into FLASH */

  . = ALIGN(4);            /*  */
  eh_frame :
  {
  KEEP (*(.eh_frame))
  } >ram


  .data :                /* collect all initialized .data sections that 
go into RAM  */
  {
    _data = .;            /* create a global symbol marking the start of 
the .data section  */
    *(.data)            /* all .data sections  */
    _edata = .;            /* define a global symbol marking the end of 
the .data section  */
  } >ram                    /* put all the above into RAM (but load the 
LMA copy into FLASH) */

  .bss :                /* collect all uninitialized .bss sections that 
go into RAM  */
  {
    _bss_start = .;          /* define a global symbol marking the start 
of the .bss section */
    *(.bss)              /* all .bss sections  */
  } >ram                /* put all the above in RAM (it will be cleared 
in the startup code */





  . = ALIGN(4);            /* advance location counter to the next 
32-bit boundary */
  _bss_end = . ;            /* define a global symbol marking the end of 
the .bss section */

  _end = .;              /* define a global symbol marking the end of 
application RAM */
}
PROVIDE (end = .);
*****************************************************************

awaiting for your answers

Regards

kamil

Author: Stefan (Guest)
Posted on:

Rate this post
0 useful
not useful
Did you check the map file?

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.