Re: WELCOME to coldfire-gnu-discuss@xxxxxxxxxxxxxxxx
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WELCOME to coldfire-gnu-discuss@xxxxxxxxxxxxxxxx



>Petter wrote:
>
>
>    My question: does anybody have a working hello world project for
>    Sourcery G++, 5223x is target, running from flash (not copying
>    itself
>    from flash to ram during power-up and then running from ram) ?


The clue is to put the text section into the flash. Here's from my
linker script:

MEMORY
{
  ram    (rwx) : ORIGIN = 512M,       LENGTH = 32K
  flash  (rx)  : ORIGIN = 0,          LENGTH = 256K
  ipsbar (rwx) : ORIGIN = 0x40000000, LENGTH = 0x0
}
...

  .text :
  {
    *(.text .text.*)
    . = ALIGN(0x4);
  } > flash

as well as the rodata:

  .rodata :
  {
    *(.rodata .rodata.*)
    . = ALIGN(0x4);
  } > flash


Petter