Newer
Older
mbed-os / targets / TARGET_TOSHIBA / TARGET_TMPM46B / device / TOOLCHAIN_ARM_STD / tmpm46bf10fg.sct
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m4
;;  TMPM46BF10 scatter file

;;  Vector table starts at 0
;;    Initial SP == |Image$$ARM_LIB_STACK$$ZI$$Limit| (for two region model)
;;               or |Image$$ARM_LIB_STACKHEAP$$ZI$$Limit| (for one region model)
;;    Initial PC == &__main (with LSB set to indicate Thumb)
;;    These two values are provided by the library
;;    Other vectors must be provided by the user
;;  Code starts after the last possible vector
;;  Data starts at 0x20000000
;;    Heap is positioned by ARM_LIB_HEAB (this is the heap managed by the ARM libraries)
;;    Stack is positioned by ARM_LIB_STACK (library will use this to set SP - see above)

;; Compatible with ISSM model

#if !defined(MBED_APP_START)
  #define MBED_APP_START 0x00000000
#endif

#if !defined(MBED_APP_SIZE)
  #define MBED_APP_SIZE 0x100000
#endif

#if !defined(MBED_RAM_START)
#define MBED_RAM_START 0x20000000
#endif

#if !defined(MBED_RAM_SIZE)
#define MBED_RAM_SIZE 0x80000
#endif

#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
#  if defined(MBED_BOOT_STACK_SIZE)
#    define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
#  else
#    define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
#  endif
#endif

#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
#define VECTOR_SIZE 0x1E0

#define RAM_FIXED_SIZE (MBED_CONF_TARGET_BOOT_STACK_SIZE + VECTOR_SIZE)
#define MBED_IRAM1_START (MBED_RAM_START + VECTOR_SIZE)
#define MBED_IRAM1_SIZE (MBED_RAM_SIZE - VECTOR_SIZE - Stack_Size)

; TMPM46B: 1024 KB FLASH (0x100000) + 512 KB SRAM (0x80000)

LR_IROM1 MBED_APP_START MBED_APP_SIZE ; load region size_region
{
  ER_IROM1 MBED_APP_START MBED_APP_SIZE
  {
   *.o (RESET, +First)
   *(InRoot$$Sections)
   .ANY (+RO)
  }

  RW_IRAM1 MBED_IRAM1_START MBED_IRAM1_SIZE
  {
     tmpm46b_fc.o(+RO)
    .ANY (+RW, +ZI)
  }
  ARM_LIB_HEAP AlignExpr(+0, 16)  EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_IRAM1_START)) { ; heap
  }
  ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack
  }
}