@@ -96,9 +96,12 @@ def build(env):
96
96
"frequency" : env .get ("frequency" , 1000 ),
97
97
"with_debug" : env .has_module (":debug" ),
98
98
"with_heap" : env .has_module (":platform:heap" ),
99
+ "with_fpu" : env .get (":platform:cortex-m:float-abi" , "soft" ) != "soft" ,
99
100
}
100
101
path = core .replace ("cortex-m" , "ARM_CM" ).replace ("+" , "" ).replace ("fd" , "f" ).upper ()
101
102
path = path .replace ("CM7F" , "CM7/r0p1" ) # use subfolder for M7
103
+ path = path .replace ("CM33F" , "CM33" ) # common port for FPU/non-FPU version
104
+ path = path .replace ("CM33" , "CM33_NTZ/non_secure" ) # no trustzone supported, use non_secure subfolder
102
105
path = "freertos/FreeRTOS/Source/portable/GCC/{}" .format (path )
103
106
104
107
env .outbasepath = "modm/ext"
@@ -112,6 +115,10 @@ def build(env):
112
115
env .copy ("{}/port.c" .format (path ), "freertos/port.c" )
113
116
# Copy the portmacro.h file
114
117
env .copy ("{}/portmacro.h" .format (path ), "freertos/inc/freertos/portmacro.h" )
118
+ # Copy the portasm.c/.h files for CM33
119
+ if "CM33" in path :
120
+ env .copy ("{}/portasm.c" .format (path ), "freertos/portasm.c" )
121
+ env .copy ("{}/portasm.h" .format (path ), "freertos/inc/freertos/portasm.h" )
115
122
116
123
# Generate the FreeRTOSConfig.h file
117
124
env .template ("FreeRTOSConfig.h.in" , "freertos/inc/freertos/FreeRTOSConfig.h" )
0 commit comments