From 90a2e1f0aaec6bb6e20bd0ff2546518713f48051 Mon Sep 17 00:00:00 2001 From: Ioannis Glaropoulos Date: Thu, 26 Sep 2019 14:09:59 +0200 Subject: [PATCH] ext: hal: cmsis: add define for __PROGRAM_START For CMSIS compilation, we define __PROGRAM_START to avoid compiling the bss/data initialization routines provided by CMSIS. Signed-off-by: Ioannis Glaropoulos --- ext/hal/cmsis/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/hal/cmsis/CMakeLists.txt b/ext/hal/cmsis/CMakeLists.txt index 76313b4dd72..80e9cdb2672 100644 --- a/ext/hal/cmsis/CMakeLists.txt +++ b/ext/hal/cmsis/CMakeLists.txt @@ -1,3 +1,11 @@ if(CONFIG_HAS_CMSIS) zephyr_include_directories(Include) endif() + +# As of CMSIS v5.6.0, __PROGRAM_START is to indicate whether the +# ARM vendor or the OS supplies data/bss init routine, otherwise +# the default data/bss init routine for the selected toolchain is +# added. We set the macro in build-time to guarantee compatibility +# with all existing ARM platforms. + +zephyr_compile_definitions(__PROGRAM_START)