blob: 284200cf1ac5d3b97723b4dc972d352a8b9c5c36 [file] [log] [blame]
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +02001include(Toolchain/Tools)
2SET(PLATFORMFOLDER "FVP")
3option(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})
30 configboot(${project} ${cmsisRoot} ${cmsisRoot}/CMSIS/DSP/Platforms/${PLATFORMFOLDER})
31 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()