From 12c9004a823e9fbe6c912d0c6a0881afa977bbce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Fri, 24 Mar 2017 17:42:02 +0100 Subject: [PATCH] kinetis: Add ldscripts for various memory layouts --- .../ldscripts/kinetis_f1024l64u192.ld | 18 ++++++++++++++++++ .../ldscripts/kinetis_f256l16u16.ld | 18 ++++++++++++++++++ .../ldscripts/kinetis_f256l32u32.ld | 18 ++++++++++++++++++ .../ldscripts/kinetis_f512l32u32.ld | 18 ++++++++++++++++++ .../ldscripts/kinetis_f512l64u64.ld | 18 ++++++++++++++++++ 5 files changed, 90 insertions(+) create mode 100644 cpu/kinetis_common/ldscripts/kinetis_f1024l64u192.ld create mode 100644 cpu/kinetis_common/ldscripts/kinetis_f256l16u16.ld create mode 100644 cpu/kinetis_common/ldscripts/kinetis_f256l32u32.ld create mode 100644 cpu/kinetis_common/ldscripts/kinetis_f512l32u32.ld create mode 100644 cpu/kinetis_common/ldscripts/kinetis_f512l64u64.ld diff --git a/cpu/kinetis_common/ldscripts/kinetis_f1024l64u192.ld b/cpu/kinetis_common/ldscripts/kinetis_f1024l64u192.ld new file mode 100644 index 000000000..dd6b9e75c --- /dev/null +++ b/cpu/kinetis_common/ldscripts/kinetis_f1024l64u192.ld @@ -0,0 +1,18 @@ +/* + * NXP Kinetis CPU with the following memory layout: + * 1024 kB flash @ 0x00000000 + * 256 kB RAM, split into two banks: 64 kB SRAM_L, 192 kB SRAM_U. + * SRAM_L ends at 0x1fffffff, SRAM_U begins at 0x20000000 + */ +OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") +OUTPUT_ARCH(arm) + +MEMORY +{ + vectors (rx) : ORIGIN = 0x00000000, LENGTH = 0x400 + flashsec (rx) : ORIGIN = 0x00000400, LENGTH = 0x10 + rom (rx) : ORIGIN = 0x00000410, LENGTH = 1024K - 0x410 + ram (rwx) : ORIGIN = 0x20000000 - 64K, LENGTH = 256K +} + +INCLUDE kinetis.ld diff --git a/cpu/kinetis_common/ldscripts/kinetis_f256l16u16.ld b/cpu/kinetis_common/ldscripts/kinetis_f256l16u16.ld new file mode 100644 index 000000000..04ca28171 --- /dev/null +++ b/cpu/kinetis_common/ldscripts/kinetis_f256l16u16.ld @@ -0,0 +1,18 @@ +/* + * NXP Kinetis CPU with the following memory layout: + * 256 kB flash @ 0x00000000 + * 32 kB RAM, split into two banks: 16 kB SRAM_L, 16 kB SRAM_U. + * SRAM_L ends at 0x1fffffff, SRAM_U begins at 0x20000000 + */ +OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") +OUTPUT_ARCH(arm) + +MEMORY +{ + vectors (rx) : ORIGIN = 0x00000000, LENGTH = 0x400 + flashsec (rx) : ORIGIN = 0x00000400, LENGTH = 0x10 + rom (rx) : ORIGIN = 0x00000410, LENGTH = 256K - 0x410 + ram (rwx) : ORIGIN = 0x20000000 - 16K, LENGTH = 32K +} + +INCLUDE kinetis.ld diff --git a/cpu/kinetis_common/ldscripts/kinetis_f256l32u32.ld b/cpu/kinetis_common/ldscripts/kinetis_f256l32u32.ld new file mode 100644 index 000000000..b05470c12 --- /dev/null +++ b/cpu/kinetis_common/ldscripts/kinetis_f256l32u32.ld @@ -0,0 +1,18 @@ +/* + * NXP Kinetis CPU with the following memory layout: + * 256 kB flash @ 0x00000000 + * 64 kB RAM, split into two banks: 32 kB SRAM_L, 32 kB SRAM_U. + * SRAM_L ends at 0x1fffffff, SRAM_U begins at 0x20000000 + */ +OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") +OUTPUT_ARCH(arm) + +MEMORY +{ + vectors (rx) : ORIGIN = 0x00000000, LENGTH = 0x400 + flashsec (rx) : ORIGIN = 0x00000400, LENGTH = 0x10 + rom (rx) : ORIGIN = 0x00000410, LENGTH = 256K - 0x410 + ram (rwx) : ORIGIN = 0x20000000 - 32K, LENGTH = 64K +} + +INCLUDE kinetis.ld diff --git a/cpu/kinetis_common/ldscripts/kinetis_f512l32u32.ld b/cpu/kinetis_common/ldscripts/kinetis_f512l32u32.ld new file mode 100644 index 000000000..db40a5ac3 --- /dev/null +++ b/cpu/kinetis_common/ldscripts/kinetis_f512l32u32.ld @@ -0,0 +1,18 @@ +/* + * NXP Kinetis CPU with the following memory layout: + * 512 kB flash @ 0x00000000 + * 64 kB RAM, split into two banks: 32 kB SRAM_L, 32 kB SRAM_U. + * SRAM_L ends at 0x1fffffff, SRAM_U begins at 0x20000000 + */ +OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") +OUTPUT_ARCH(arm) + +MEMORY +{ + vectors (rx) : ORIGIN = 0x00000000, LENGTH = 0x400 + flashsec (rx) : ORIGIN = 0x00000400, LENGTH = 0x10 + rom (rx) : ORIGIN = 0x00000410, LENGTH = 512K - 0x410 + ram (rwx) : ORIGIN = 0x20000000 - 32K, LENGTH = 64K +} + +INCLUDE kinetis.ld diff --git a/cpu/kinetis_common/ldscripts/kinetis_f512l64u64.ld b/cpu/kinetis_common/ldscripts/kinetis_f512l64u64.ld new file mode 100644 index 000000000..d32dc7029 --- /dev/null +++ b/cpu/kinetis_common/ldscripts/kinetis_f512l64u64.ld @@ -0,0 +1,18 @@ +/* + * NXP Kinetis CPU with the following memory layout: + * 512 kB flash @ 0x00000000 + * 128 kB RAM, split into two banks: 64 kB SRAM_L, 64 kB SRAM_U. + * SRAM_L ends at 0x1fffffff, SRAM_U begins at 0x20000000 + */ +OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") +OUTPUT_ARCH(arm) + +MEMORY +{ + vectors (rx) : ORIGIN = 0x00000000, LENGTH = 0x400 + flashsec (rx) : ORIGIN = 0x00000400, LENGTH = 0x10 + rom (rx) : ORIGIN = 0x00000410, LENGTH = 512K - 0x410 + ram (rwx) : ORIGIN = 0x20000000 - 64K, LENGTH = 128K +} + +INCLUDE kinetis.ld