Section does not fit

Hi,

I have a pretty much empty project generated from cortex-m-quickstart.
I have added a new section to memory.x:

MEMORY {
      FLASH : ORIGIN = 0x08000000, LENGTH = 512K
      RAM : ORIGIN = 0x20000000, LENGTH = 128K
      CCMRAM : ORIGIN = 0x10000000, LENGTH = 64K
    }

SECTIONS {
  .ccmdata (NOLOAD) :
  {
    . = ALIGN(16);
    *(.ccmdata)
    . = ALIGN(16);
  } >CCMRAM
} 

Linker reports an error:
rust-lld: error: section '.ccmdata' will not fit in region 'CCMRAM': overflowed by 18446744073575268352 bytes
Of course I haven't put that large variable to the section :slight_smile: Actually, the figure is the same whatever I put there.
What's going on?

Fixed :slight_smile: - missing INSERT AFTER on close of SECTIONS .

1 Like