Christophe Favergeon | 26c2f68 | 2019-09-06 14:43:32 +0100 | [diff] [blame^] | 1 | if(EXPERIMENTAL) |
| 2 | list(APPEND CMAKE_MODULE_PATH ${EXPROOT}) |
| 3 | include(experimental) |
| 4 | endif() |
| 5 | |
Christophe Favergeon | 3b2a0ee | 2019-06-12 13:29:14 +0200 | [diff] [blame] | 6 | include(Toolchain/Tools) |
Christophe Favergeon | ec57420 | 2019-08-09 06:54:05 +0100 | [diff] [blame] | 7 | SET(PLATFORMFOLDER ${ROOT}/CMSIS/DSP/Platforms/FVP) |
Christophe Favergeon | 3b2a0ee | 2019-06-12 13:29:14 +0200 | [diff] [blame] | 8 | option(OPTIMIZED "Compile for speed" ON) |
| 9 | include(configPlatform) |
| 10 | include(configBoot) |
| 11 | include(configCore) |
Christophe Favergeon | 6b604eb | 2019-05-17 13:46:33 +0200 | [diff] [blame] | 12 | |
Christophe Favergeon | 3b2a0ee | 2019-06-12 13:29:14 +0200 | [diff] [blame] | 13 | define_property(TARGET |
| 14 | PROPERTY DISABLEOPTIMIZATION |
| 15 | BRIEF_DOCS "Force disabling of optimizations" |
| 16 | FULL_DOCS "Force disabling of optimizations") |
Christophe Favergeon | 6b604eb | 2019-05-17 13:46:33 +0200 | [diff] [blame] | 17 | |
Christophe Favergeon | 3b2a0ee | 2019-06-12 13:29:14 +0200 | [diff] [blame] | 18 | # Config core settings |
| 19 | # Configure platform (semihosting etc ...) |
| 20 | # May be required for some compiler |
| 21 | function(disableOptimization project) |
| 22 | set_target_properties(${project} PROPERTIES DISABLEOPTIMIZATION ON) |
| 23 | endfunction() |
Christophe Favergeon | 6b604eb | 2019-05-17 13:46:33 +0200 | [diff] [blame] | 24 | |
Christophe Favergeon | 6b604eb | 2019-05-17 13:46:33 +0200 | [diff] [blame] | 25 | |
Christophe Favergeon | 3b2a0ee | 2019-06-12 13:29:14 +0200 | [diff] [blame] | 26 | function(configLib project cmsisRoot) |
| 27 | configcore(${project} ${cmsisRoot}) |
| 28 | configplatformForLib(${project} ${cmsisRoot}) |
| 29 | SET(COREID ${COREID} PARENT_SCOPE) |
| 30 | endfunction() |
| 31 | |
| 32 | # Config app |
| 33 | function (configApp project cmsisRoot) |
| 34 | configcore(${project} ${cmsisRoot}) |
Christophe Favergeon | ec57420 | 2019-08-09 06:54:05 +0100 | [diff] [blame] | 35 | configboot(${project} ${cmsisRoot} ${PLATFORMFOLDER}) |
Christophe Favergeon | 3b2a0ee | 2019-06-12 13:29:14 +0200 | [diff] [blame] | 36 | set_platform_core() |
| 37 | core_includes(${project}) |
| 38 | SET(PLATFORMID ${PLATFORMID} PARENT_SCOPE) |
| 39 | SET(COREID ${COREID} PARENT_SCOPE) |
Christophe Favergeon | e018132 | 2019-05-20 13:25:14 +0200 | [diff] [blame] | 40 | endfunction() |