blob: 6c52fc25cbc5e528b5e373da2619b33eabda24ee [file] [log] [blame]
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +02001include(Toolchain/Tools)
Christophe Favergeonec574202019-08-09 06:54:05 +01002SET(PLATFORMFOLDER ${ROOT}/CMSIS/DSP/Platforms/FVP)
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +02003option(OPTIMIZED "Compile for speed" ON)
4include(configPlatform)
5include(configBoot)
6include(configCore)
Christophe Favergeon6b604eb2019-05-17 13:46:33 +02007
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +02008define_property(TARGET
9 PROPERTY DISABLEOPTIMIZATION
10 BRIEF_DOCS "Force disabling of optimizations"
11 FULL_DOCS "Force disabling of optimizations")
Christophe Favergeon6b604eb2019-05-17 13:46:33 +020012
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +020013# Config core settings
14# Configure platform (semihosting etc ...)
15# May be required for some compiler
16function(disableOptimization project)
17 set_target_properties(${project} PROPERTIES DISABLEOPTIMIZATION ON)
18endfunction()
Christophe Favergeon6b604eb2019-05-17 13:46:33 +020019
Christophe Favergeon6b604eb2019-05-17 13:46:33 +020020
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +020021function(configLib project cmsisRoot)
22 configcore(${project} ${cmsisRoot})
23 configplatformForLib(${project} ${cmsisRoot})
24 SET(COREID ${COREID} PARENT_SCOPE)
25endfunction()
26
27# Config app
28function (configApp project cmsisRoot)
29 configcore(${project} ${cmsisRoot})
Christophe Favergeonec574202019-08-09 06:54:05 +010030 configboot(${project} ${cmsisRoot} ${PLATFORMFOLDER})
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +020031 set_platform_core()
32 core_includes(${project})
33 SET(PLATFORMID ${PLATFORMID} PARENT_SCOPE)
34 SET(COREID ${COREID} PARENT_SCOPE)
Christophe Favergeone0181322019-05-20 13:25:14 +020035endfunction()