300 views
in Getting started by

Hi,

 I have use the LPC54628 eval kit to run some demo program with GCC. But the compilation result is that the actuall code and data size is oversized. Could you share me how to modify the storage place with GCC? the compilation is as below picture.

 

1 Answer

0 votes
by
Hi zhiwei.li,

one simple appoach could be to locate specific objects or parts of it explicitly to the BOARD_FLASH section.
This can be done in the linker file 'Application\Project\GCC\LPCXpresso54628.ld'.
Fore example to locate all the code of Core.c and all read only data of BrickGame.c to BOARD_FLASH section modify LPCXpresso54628.ld as follows:

...
    .text_Flash2 : ALIGN(4)
    {
       FILL(0xff)
        *Core.o(.text*)
        *BrickGame.o(.rodata*)
        *(.text_Flash2*) /* for compatibility with previous releases */
        *(.text_BOARD_FLASH*) /* for compatibility with previous releases */
        *(.text.$Flash2*)
        *(.text.$BOARD_FLASH*)
        *(.rodata.$Flash2*)
        *(.rodata.$BOARD_FLASH*)
    } > BOARD_FLASH

    /* MAIN TEXT SECTION */
...
by
Thanks, I also put the big data of Application in BOARD_FLASH

Embedded Wizard Website | Privacy Policy | Imprint

...