aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/startup/ARMCMx/compilers/GCC
diff options
context:
space:
mode:
Diffstat (limited to 'os/common/startup/ARMCMx/compilers/GCC')
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/ld/MK64FX512.ld97
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/ld/MK66FX1M0.ld97
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/mk/startup_MK66F18.mk13
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/mk/startup_k20x.mk1
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/mk/startup_k60x.mk12
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/mk/startup_kl2x.mk1
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf51.mk3
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf52.mk3
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk16
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c129x.mk16
10 files changed, 247 insertions, 12 deletions
diff --git a/os/common/startup/ARMCMx/compilers/GCC/ld/MK64FX512.ld b/os/common/startup/ARMCMx/compilers/GCC/ld/MK64FX512.ld
new file mode 100644
index 0000000..77b0fe3
--- /dev/null
+++ b/os/common/startup/ARMCMx/compilers/GCC/ld/MK64FX512.ld
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com
+ * (C) 2017 Wim Lewis
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * MK64FX512 memory setup.
+ */
+MEMORY
+{
+ flash0 : org = 0x00000000, len = 0x400
+ flash1 : org = 0x00000400, len = 0x10
+ flash2 : org = 0x00000410, len = 512k - 0x410
+ flash3 : org = 0x10000000, len = 128k /* FlexNVM */
+ ram0 : org = 0x1FFF0000, len = 64k /* SRAM_L (code RAM) */
+ ram1 : org = 0x20000000, len = 192k /* SRAM_U (data RAM) */
+ ram2 : org = 0x14000000, len = 4k /* FlexRAM */
+ ram3 : org = 0x00000000, len = 0
+ ram4 : org = 0x00000000, len = 0
+ ram5 : org = 0x00000000, len = 0
+ ram6 : org = 0x00000000, len = 0
+ ram7 : org = 0x00000000, len = 0
+}
+
+/* Flash region for the configuration bytes.*/
+SECTIONS
+{
+ .cfmprotect : ALIGN(4) SUBALIGN(4)
+ {
+ KEEP(*(.cfmconfig))
+ } > flash1
+}
+
+/* For each data/text section two region are defined, a virtual region
+ and a load region (_LMA suffix).*/
+
+/* Flash region to be used for exception vectors.*/
+REGION_ALIAS("VECTORS_FLASH", flash0);
+REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
+
+/* Flash region to be used for constructors and destructors.*/
+REGION_ALIAS("XTORS_FLASH", flash2);
+REGION_ALIAS("XTORS_FLASH_LMA", flash2);
+
+/* Flash region to be used for code text.*/
+REGION_ALIAS("TEXT_FLASH", flash2);
+REGION_ALIAS("TEXT_FLASH_LMA", flash2);
+
+/* Flash region to be used for read only data.*/
+REGION_ALIAS("RODATA_FLASH", flash2);
+REGION_ALIAS("RODATA_FLASH_LMA", flash2);
+
+/* Flash region to be used for various.*/
+REGION_ALIAS("VARIOUS_FLASH", flash2);
+REGION_ALIAS("VARIOUS_FLASH_LMA", flash2);
+
+/* Flash region to be used for RAM(n) initialization data.*/
+REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2);
+
+/* RAM region to be used for Main stack. This stack accommodates the processing
+ of all exceptions and interrupts.*/
+REGION_ALIAS("MAIN_STACK_RAM", ram1);
+
+/* RAM region to be used for the process stack. This is the stack used by
+ the main() function.*/
+REGION_ALIAS("PROCESS_STACK_RAM", ram1);
+
+/* RAM region to be used for data segment.*/
+REGION_ALIAS("DATA_RAM", ram1);
+REGION_ALIAS("DATA_RAM_LMA", flash2);
+
+/* RAM region to be used for BSS segment.*/
+REGION_ALIAS("BSS_RAM", ram1);
+
+/* RAM region to be used for the default heap.*/
+REGION_ALIAS("HEAP_RAM", ram1);
+
+/* Generic rules inclusion.*/
+INCLUDE rules.ld
diff --git a/os/common/startup/ARMCMx/compilers/GCC/ld/MK66FX1M0.ld b/os/common/startup/ARMCMx/compilers/GCC/ld/MK66FX1M0.ld
new file mode 100644
index 0000000..4032c23
--- /dev/null
+++ b/os/common/startup/ARMCMx/compilers/GCC/ld/MK66FX1M0.ld
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com
+ * (C) 2016 flabbergast <s3+flabbergast@sdfeu.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * MK66FX1M0 memory setup.
+ */
+MEMORY
+{
+ flash0 : org = 0x00000000, len = 0x400
+ flash1 : org = 0x00000400, len = 0x10
+ flash2 : org = 0x00000410, len = 1024k - 0x410
+ flash3 : org = 0x10000000, len = 128k /* FlexNVM */
+ ram0 : org = 0x1FFF0000, len = 64k /* SRAM_L (code RAM) */
+ ram1 : org = 0x20000000, len = 192k /* SRAM_U (data RAM) */
+ ram2 : org = 0x14000000, len = 4k /* FlexRAM */
+ ram3 : org = 0x00000000, len = 0
+ ram4 : org = 0x00000000, len = 0
+ ram5 : org = 0x00000000, len = 0
+ ram6 : org = 0x00000000, len = 0
+ ram7 : org = 0x00000000, len = 0
+}
+
+/* Flash region for the configuration bytes.*/
+SECTIONS
+{
+ .cfmprotect : ALIGN(4) SUBALIGN(4)
+ {
+ KEEP(*(.cfmconfig))
+ } > flash1
+}
+
+/* For each data/text section two region are defined, a virtual region
+ and a load region (_LMA suffix).*/
+
+/* Flash region to be used for exception vectors.*/
+REGION_ALIAS("VECTORS_FLASH", flash0);
+REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
+
+/* Flash region to be used for constructors and destructors.*/
+REGION_ALIAS("XTORS_FLASH", flash2);
+REGION_ALIAS("XTORS_FLASH_LMA", flash2);
+
+/* Flash region to be used for code text.*/
+REGION_ALIAS("TEXT_FLASH", flash2);
+REGION_ALIAS("TEXT_FLASH_LMA", flash2);
+
+/* Flash region to be used for read only data.*/
+REGION_ALIAS("RODATA_FLASH", flash2);
+REGION_ALIAS("RODATA_FLASH_LMA", flash2);
+
+/* Flash region to be used for various.*/
+REGION_ALIAS("VARIOUS_FLASH", flash2);
+REGION_ALIAS("VARIOUS_FLASH_LMA", flash2);
+
+/* Flash region to be used for RAM(n) initialization data.*/
+REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2);
+
+/* RAM region to be used for Main stack. This stack accommodates the processing
+ of all exceptions and interrupts.*/
+REGION_ALIAS("MAIN_STACK_RAM", ram1);
+
+/* RAM region to be used for the process stack. This is the stack used by
+ the main() function.*/
+REGION_ALIAS("PROCESS_STACK_RAM", ram1);
+
+/* RAM region to be used for data segment.*/
+REGION_ALIAS("DATA_RAM", ram1);
+REGION_ALIAS("DATA_RAM_LMA", flash2);
+
+/* RAM region to be used for BSS segment.*/
+REGION_ALIAS("BSS_RAM", ram1);
+
+/* RAM region to be used for the default heap.*/
+REGION_ALIAS("HEAP_RAM", ram1);
+
+/* Generic rules inclusion.*/
+INCLUDE rules.ld
diff --git a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_MK66F18.mk b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_MK66F18.mk
new file mode 100644
index 0000000..50dff2d
--- /dev/null
+++ b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_MK66F18.mk
@@ -0,0 +1,13 @@
+# List of the ChibiOS generic MK66F18 startup and CMSIS files.
+STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c \
+ $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.c
+
+STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S
+
+STARTUPINC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
+ $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/devices/MK66F18 \
+ $(CHIBIOS)/os/common/ext/CMSIS/include \
+ $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
+ $(CHIBIOS_CONTRIB)/os/common/ext/CMSIS/KINETIS
+
+STARTUPLD = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
diff --git a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_k20x.mk b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_k20x.mk
index 0c2ec7d..f474d19 100644
--- a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_k20x.mk
+++ b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_k20x.mk
@@ -7,6 +7,7 @@ STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S
STARTUPINC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
$(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/devices/K20x \
$(CHIBIOS)/os/common/ext/CMSIS/include \
+ $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
$(CHIBIOS_CONTRIB)/os/common/ext/CMSIS/KINETIS
STARTUPLD = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
diff --git a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_k60x.mk b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_k60x.mk
new file mode 100644
index 0000000..777df43
--- /dev/null
+++ b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_k60x.mk
@@ -0,0 +1,12 @@
+# List of the ChibiOS generic K60x startup and CMSIS files.
+STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c \
+ $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.c
+
+STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S
+
+STARTUPINC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
+ $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/devices/K60x \
+ $(CHIBIOS)/os/common/ext/CMSIS/include \
+ $(CHIBIOS_CONTRIB)/os/common/ext/CMSIS/KINETIS
+
+STARTUPLD = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
diff --git a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_kl2x.mk b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_kl2x.mk
index ca67f10..0c9d329 100644
--- a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_kl2x.mk
+++ b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_kl2x.mk
@@ -7,6 +7,7 @@ STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v6m.S
STARTUPINC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
$(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/devices/KL2x \
$(CHIBIOS)/os/common/ext/CMSIS/include \
+ $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
$(CHIBIOS_CONTRIB)/os/common/ext/CMSIS/KINETIS
STARTUPLD = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
diff --git a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf51.mk b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf51.mk
index f005ce0..8ec318f 100644
--- a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf51.mk
+++ b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf51.mk
@@ -5,6 +5,7 @@ STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c \
STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v6m.S
STARTUPINC = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/devices/NRF51822 \
- $(CHIBIOS)/os/common/ext/CMSIS/include
+ $(CHIBIOS)/os/common/ext/CMSIS/include \
+ $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include
STARTUPLD = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
diff --git a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf52.mk b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf52.mk
index 693ae67..450ec41 100644
--- a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf52.mk
+++ b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_nrf52.mk
@@ -5,6 +5,7 @@ STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c \
STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S
STARTUPINC = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/devices/NRF52832 \
- $(CHIBIOS)/os/common/ext/CMSIS/include
+ $(CHIBIOS)/os/common/ext/CMSIS/include \
+ $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include
STARTUPLD = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
diff --git a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk
index 263338a..835faca 100644
--- a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk
+++ b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c123x.mk
@@ -1,12 +1,18 @@
# List of the ChibiOS generic TM4C123x startup and CMSIS files.
-STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c \
- $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.c
+STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
-STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S
+STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S \
+ $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
-STARTUPINC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
+STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
+ $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
$(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/devices/TM4C123x \
- $(CHIBIOS)/os/common/ext/CMSIS/include \
+ $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
$(CHIBIOS_CONTRIB)/os/common/ext/TivaWare
STARTUPLD = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
+
+# Shared variables
+ALLXASMSRC += $(STARTUPASM)
+ALLCSRC += $(STARTUPSRC)
+ALLINC += $(STARTUPINC)
diff --git a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c129x.mk b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c129x.mk
index 6cf42f7..ac4f76e 100644
--- a/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c129x.mk
+++ b/os/common/startup/ARMCMx/compilers/GCC/mk/startup_tm4c129x.mk
@@ -1,12 +1,18 @@
# List of the ChibiOS generic TM4C129x startup and CMSIS files.
-STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c \
- $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.c
+STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
-STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S
+STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S \
+ $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
-STARTUPINC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
+STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
+ $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
$(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/devices/TM4C129x \
- $(CHIBIOS)/os/common/ext/CMSIS/include \
+ $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
$(CHIBIOS_CONTRIB)/os/common/ext/TivaWare
STARTUPLD = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/ld
+
+# Shared variables
+ALLXASMSRC += $(STARTUPASM)
+ALLCSRC += $(STARTUPSRC)
+ALLINC += $(STARTUPINC)