From 53fa2b9d6cad117aa014ff4a5239234228571449 Mon Sep 17 00:00:00 2001 From: 0xc0170 Date: Mon, 7 Dec 2015 15:38:55 +0000 Subject: [PATCH 1/5] RTOS - add m7 cmsis header --- libraries/rtos/rtx/TARGET_CORTEX_M/rt_CMSIS.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/rtos/rtx/TARGET_CORTEX_M/rt_CMSIS.c b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_CMSIS.c index 3c05b4ed34..a747caf31a 100644 --- a/libraries/rtos/rtx/TARGET_CORTEX_M/rt_CMSIS.c +++ b/libraries/rtos/rtx/TARGET_CORTEX_M/rt_CMSIS.c @@ -36,6 +36,8 @@ #if defined (__CORTEX_M4) || defined (__CORTEX_M4F) #include "core_cm4.h" +#elif defined (__CORTEX_M7) || defined (__CORTEX_M7F) + #include "core_cm7.h" #elif defined (__CORTEX_M3) #include "core_cm3.h" #elif defined (__CORTEX_M0) From d0b55a214a2c7ef51e4bad4e65218ebd8c4ae744 Mon Sep 17 00:00:00 2001 From: 0xc0170 Date: Mon, 7 Dec 2015 15:39:44 +0000 Subject: [PATCH 2/5] Disco F746 - cortex m7f core --- workspace_tools/targets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace_tools/targets.py b/workspace_tools/targets.py index dfe0668075..984a770d63 100755 --- a/workspace_tools/targets.py +++ b/workspace_tools/targets.py @@ -849,7 +849,7 @@ class DISCO_L053C8(Target): class DISCO_F746NG(Target): def __init__(self): Target.__init__(self) - self.core = "Cortex-M7" + self.core = "Cortex-M7F" self.extra_labels = ['STM', 'STM32F7', 'STM32F746', 'STM32F746NG'] self.supported_toolchains = ["ARM", "uARM", "IAR", "GCC_ARM"] self.default_toolchain = "uARM" From 6cb8531848d0449206d7b008aa775333ce0bdc2f Mon Sep 17 00:00:00 2001 From: 0xc0170 Date: Mon, 7 Dec 2015 15:40:20 +0000 Subject: [PATCH 3/5] toolchains gcc - core m7/m7f support addition --- workspace_tools/toolchains/gcc.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/workspace_tools/toolchains/gcc.py b/workspace_tools/toolchains/gcc.py index 21d2147219..f746a19732 100644 --- a/workspace_tools/toolchains/gcc.py +++ b/workspace_tools/toolchains/gcc.py @@ -37,6 +37,8 @@ class GCC(mbedToolchain): cpu = "cortex-m0plus" elif target.core == "Cortex-M4F": cpu = "cortex-m4" + elif target.core == "Cortex-M7F": + cpu = "cortex-m7" else: cpu = target.core.lower() @@ -47,6 +49,9 @@ class GCC(mbedToolchain): if target.core == "Cortex-M4F": self.cpu.append("-mfpu=fpv4-sp-d16") self.cpu.append("-mfloat-abi=softfp") + elif target.core == "Cortex-M7F": + self.cpu.append("-mfpu=fpv5-d16") + self.cpu.append("-mfloat-abi=softfp") if target.core == "Cortex-A9": self.cpu.append("-mthumb-interwork") From 35574d2e55a0694a93ca05906dc8419349a5bee4 Mon Sep 17 00:00:00 2001 From: 0xc0170 Date: Mon, 11 Jan 2016 11:20:38 +0000 Subject: [PATCH 4/5] DISCO_F746NG - disable uLib for uvision4, use scatter file uLib does not support floating, does not make sense to have it enabled. --- workspace_tools/export/uvision4.py | 1 - workspace_tools/export/uvision4_disco_f746ng.uvproj.tmpl | 4 ++-- workspace_tools/targets.py | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/workspace_tools/export/uvision4.py b/workspace_tools/export/uvision4.py index c951c85f32..b0ce867104 100644 --- a/workspace_tools/export/uvision4.py +++ b/workspace_tools/export/uvision4.py @@ -121,7 +121,6 @@ class Uvision4(Exporter): 'DISCO_F334C8', 'DISCO_F429ZI', 'DISCO_F469NI', - 'DISCO_F746NG', 'DISCO_L053C8', 'DISCO_L476VG', 'LPC1549', diff --git a/workspace_tools/export/uvision4_disco_f746ng.uvproj.tmpl b/workspace_tools/export/uvision4_disco_f746ng.uvproj.tmpl index 22e2587e84..8b7167b049 100644 --- a/workspace_tools/export/uvision4_disco_f746ng.uvproj.tmpl +++ b/workspace_tools/export/uvision4_disco_f746ng.uvproj.tmpl @@ -226,7 +226,7 @@ 0 0 8 - 1 + 0 0 0 3 @@ -390,7 +390,7 @@ - 1 + 0 0 0 0 diff --git a/workspace_tools/targets.py b/workspace_tools/targets.py index 984a770d63..d6e15970b5 100755 --- a/workspace_tools/targets.py +++ b/workspace_tools/targets.py @@ -852,7 +852,6 @@ class DISCO_F746NG(Target): self.core = "Cortex-M7F" self.extra_labels = ['STM', 'STM32F7', 'STM32F746', 'STM32F746NG'] self.supported_toolchains = ["ARM", "uARM", "IAR", "GCC_ARM"] - self.default_toolchain = "uARM" self.detect_code = ["0815"] class DISCO_L476VG(Target): From 50719edaf5f1ac279883c0f983364565b27536c8 Mon Sep 17 00:00:00 2001 From: 0xc0170 Date: Mon, 11 Jan 2016 13:50:59 +0000 Subject: [PATCH 5/5] RTOS - M4 files reuse for M7 --- .../TOOLCHAIN_ARM/HAL_CM4.c | 0 .../TOOLCHAIN_ARM/SVC_Table.S | 0 .../TOOLCHAIN_GCC/HAL_CM4.S | 0 .../TOOLCHAIN_GCC/SVC_Table.S | 0 .../TOOLCHAIN_IAR/HAL_CM4.S | 0 .../TOOLCHAIN_IAR/SVC_Table.S | 0 workspace_tools/targets.py | 8 ++++---- 7 files changed, 4 insertions(+), 4 deletions(-) rename libraries/rtos/rtx/TARGET_CORTEX_M/{TARGET_M4 => TARGET_RTOS_M4_M7}/TOOLCHAIN_ARM/HAL_CM4.c (100%) rename libraries/rtos/rtx/TARGET_CORTEX_M/{TARGET_M4 => TARGET_RTOS_M4_M7}/TOOLCHAIN_ARM/SVC_Table.S (100%) rename libraries/rtos/rtx/TARGET_CORTEX_M/{TARGET_M4 => TARGET_RTOS_M4_M7}/TOOLCHAIN_GCC/HAL_CM4.S (100%) rename libraries/rtos/rtx/TARGET_CORTEX_M/{TARGET_M4 => TARGET_RTOS_M4_M7}/TOOLCHAIN_GCC/SVC_Table.S (100%) rename libraries/rtos/rtx/TARGET_CORTEX_M/{TARGET_M4 => TARGET_RTOS_M4_M7}/TOOLCHAIN_IAR/HAL_CM4.S (100%) rename libraries/rtos/rtx/TARGET_CORTEX_M/{TARGET_M4 => TARGET_RTOS_M4_M7}/TOOLCHAIN_IAR/SVC_Table.S (100%) diff --git a/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_ARM/HAL_CM4.c b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_ARM/HAL_CM4.c similarity index 100% rename from libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_ARM/HAL_CM4.c rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_ARM/HAL_CM4.c diff --git a/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_ARM/SVC_Table.S b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_ARM/SVC_Table.S similarity index 100% rename from libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_ARM/SVC_Table.S rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_ARM/SVC_Table.S diff --git a/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_GCC/HAL_CM4.S b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC/HAL_CM4.S similarity index 100% rename from libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_GCC/HAL_CM4.S rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC/HAL_CM4.S diff --git a/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_GCC/SVC_Table.S b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC/SVC_Table.S similarity index 100% rename from libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_GCC/SVC_Table.S rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC/SVC_Table.S diff --git a/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_IAR/HAL_CM4.S b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_IAR/HAL_CM4.S similarity index 100% rename from libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_IAR/HAL_CM4.S rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_IAR/HAL_CM4.S diff --git a/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_IAR/SVC_Table.S b/libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_IAR/SVC_Table.S similarity index 100% rename from libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_IAR/SVC_Table.S rename to libraries/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_IAR/SVC_Table.S diff --git a/workspace_tools/targets.py b/workspace_tools/targets.py index d6e15970b5..badcd81cc9 100755 --- a/workspace_tools/targets.py +++ b/workspace_tools/targets.py @@ -21,10 +21,10 @@ CORE_LABELS = { "Cortex-M0+": ["M0P", "CORTEX_M"], "Cortex-M1" : ["M1", "CORTEX_M"], "Cortex-M3" : ["M3", "CORTEX_M"], - "Cortex-M4" : ["M4", "CORTEX_M"], - "Cortex-M4F" : ["M4", "CORTEX_M"], - "Cortex-M7" : ["M7", "CORTEX_M"], - "Cortex-M7F" : ["M7", "CORTEX_M"], + "Cortex-M4" : ["M4", "CORTEX_M", "RTOS_M4_M7"], + "Cortex-M4F" : ["M4", "CORTEX_M", "RTOS_M4_M7"], + "Cortex-M7" : ["M7", "CORTEX_M", "RTOS_M4_M7"], + "Cortex-M7F" : ["M7", "CORTEX_M", "RTOS_M4_M7"], "Cortex-A9" : ["A9", "CORTEX_A"] }