#!armclang --target=arm-arm-none-eabi -march=armv8-m.main -E -x c
/*
** ###################################################################
**     Processors:          LPC55S69JBD100_cm33_core0
**                          LPC55S69JBD64_cm33_core0
**                          LPC55S69JEV98_cm33_core0
**
**     Compiler:            Keil ARM C/C++ Compiler
**     Reference manual:    LPC55S6x/LPC55S2x/LPC552x User manual(UM11126) Rev.1.3  16 May 2019
**     Version:             rev. 1.1, 2019-05-16
**     Build:               b190923
**
**     Abstract:
**         Linker file for the Keil ARM C/C++ Compiler
**
**     Copyright 2016 Freescale Semiconductor, Inc.
**     Copyright 2016-2019 NXP
**     All rights reserved.
**
**     SPDX-License-Identifier: BSD-3-Clause
**
**     http:                 www.nxp.com
**     mail:                 support@nxp.com
**
** ###################################################################
*/


/* USB BDT size */
#define usb_bdt_size                   0x0
/* Sizes */
#if (defined(__stack_size__))
  #define Stack_Size                   __stack_size__
#else
  #define Stack_Size                   0x0400
#endif

#if (defined(__heap_size__))
  #define Heap_Size                    __heap_size__
#else
  #define Heap_Size                    0x0400
#endif

/* Only the first 64kB of flash is used as secure memory. */
#define  m_interrupts_start            0x10000000
#define  m_interrupts_size             0x00000200

#define  m_text_start                  0x10000200
#define  m_text_size                   0x0000FC00

#define  m_core1_image_start           0x10072000
#define  m_core1_image_size            0x00026000

/* Only first 32kB of data RAM is used as secure memory. */
#if (defined(__use_shmem__))
  #define  m_data_start                0x30000000
  #define  m_data_size                 0x00008000
  #define  m_rpmsg_sh_mem_start        0x30031800
  #define  m_rpmsg_sh_mem_size         0x00001800
#else
  #define  m_data_start                0x30000000
  #define  m_data_size                 0x00008000
#endif

/* 512B - memory for veneer table (NSC - secure, non-secure callable memory) */
#define  m_veneer_table_start          0x1000FE00
#define  m_veneer_table_size           0x200


#define  m_usb_sram_start              0x50100000
#define  m_usb_sram_size               0x00004000


LR_m_text m_interrupts_start m_interrupts_size+m_text_size+m_veneer_table_size {   ; load region size_region

  VECTOR_ROM m_interrupts_start m_interrupts_size { ; load address = execution address
    * (.isr_vector,+FIRST)
  }

  ER_m_text m_text_start FIXED m_text_size { ; load address = execution address
    * (InRoot$$Sections)
    .ANY (+RO)
  }

#if (defined(__use_shmem__))
  RPMSG_SH_MEM m_rpmsg_sh_mem_start UNINIT m_rpmsg_sh_mem_size { ; Shared memory used by RPMSG
    * (rpmsg_sh_mem_section)
  }
#endif

  RW_m_data m_data_start m_data_size-Stack_Size-Heap_Size { ; RW data
    .ANY (+RW +ZI)
  }
  ARM_LIB_HEAP +0 EMPTY Heap_Size {    ; Heap region growing up
  }
  ARM_LIB_STACK m_data_start+m_data_size EMPTY -Stack_Size { ; Stack region growing down
  }

  ER_m_veneer_table m_veneer_table_start FIXED m_veneer_table_size {; veneer table
    *(Veneer$$CMSE)
  }

  RW_m_usb_bdt m_usb_sram_start UNINIT usb_bdt_size {
    * (*m_usb_bdt)
  }

  RW_m_usb_ram (m_usb_sram_start + usb_bdt_size) UNINIT (m_usb_sram_size - usb_bdt_size) {
    * (*m_usb_global)
  }
}

LR_CORE1_IMAGE m_core1_image_start {
  CORE1_REGION m_core1_image_start m_core1_image_size {
    * (.core1_code)
  }
}
