; Scatter-Loading Description self-written for various STM32

LR_MEM_MAP 0x08000000 0x00008000
{
  ER_STARTUP +0  ALIGN 4  ; +0 means current position 
  {
    *.o (.intvec, +First)
  }

  ER_CFGID 0x08000200 ALIGN 4
  {
    *(.cfgid_configdata) ; .CfgId section
  }

  ER_TEXT 0x08000300  ALIGN 4
  {
    *(+XO +RO) ;.text section
    *(.text)
  }

  ER_RO +0  ALIGN 4  ; +0 means current position 
  {
    *(+RO-DATA) ; .constdata(.rodata) section
    *armlib*(+RO)
    *(.init_array)
  }

  ER_RW_DATA 0x20000000 NOCOMPRESS ALIGN 4
  {
    *(+RW +ZI) ; .data and .bss sections
  }

  ER_STACK 0x20002000 EMPTY -0x00001000     ; region ends at 0x20002000, from which we subtract roomm for 0x1000 stack
  {
  }
}
