blob: 75bbf242862e44e5314ae02f909692557f2bc8b2 [file] [log] [blame]
Christophe Favergeond3551bf2019-09-26 08:48:51 +01001include(CMakePrintHelpers)
2
Christophe Favergeon26c2f682019-09-06 14:43:32 +01003
Christophe Favergeonaa3cdc52019-09-25 11:31:39 +02004
5include(configLib)
Christophe Favergeonec574202019-08-09 06:54:05 +01006SET(PLATFORMFOLDER ${ROOT}/CMSIS/DSP/Platforms/FVP)
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +02007include(configPlatform)
8include(configBoot)
Christophe Favergeon6b604eb2019-05-17 13:46:33 +02009
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +020010define_property(TARGET
11 PROPERTY DISABLEOPTIMIZATION
12 BRIEF_DOCS "Force disabling of optimizations"
13 FULL_DOCS "Force disabling of optimizations")
Christophe Favergeon6b604eb2019-05-17 13:46:33 +020014
Christophe Favergeond0048572020-02-04 14:42:25 +010015define_property(TARGET
16 PROPERTY DISABLEHALFFLOATSUPPORT
17 BRIEF_DOCS "Force disabling of f16 support"
18 FULL_DOCS "Force disabling of f16 support")
19
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +020020# Config core settings
21# Configure platform (semihosting etc ...)
22# May be required for some compiler
23function(disableOptimization project)
24 set_target_properties(${project} PROPERTIES DISABLEOPTIMIZATION ON)
25endfunction()
Christophe Favergeon6b604eb2019-05-17 13:46:33 +020026
Christophe Favergeond0048572020-02-04 14:42:25 +010027function(disableHasfFloat project)
28 set_target_properties(${project} PROPERTIES DISABLEHALFFLOATSUPPORT ON)
29endfunction()
30
Christophe Favergeon6b604eb2019-05-17 13:46:33 +020031
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +020032# Config app
33function (configApp project cmsisRoot)
Christophe Favergeond0048572020-02-04 14:42:25 +010034 # When the C compiler is used to process ASM files, the fp16 option
35 # is not always recognized.
36 # So, FP16 option is ignored when building boot code
37 # which is containing ASM
38 disableHasfFloat(${project})
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +020039 configcore(${project} ${cmsisRoot})
Christophe Favergeonec574202019-08-09 06:54:05 +010040 configboot(${project} ${cmsisRoot} ${PLATFORMFOLDER})
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +020041 set_platform_core()
42 core_includes(${project})
43 SET(PLATFORMID ${PLATFORMID} PARENT_SCOPE)
44 SET(COREID ${COREID} PARENT_SCOPE)
Christophe Favergeone0181322019-05-20 13:25:14 +020045endfunction()