Christophe Favergeon | d3551bf | 2019-09-26 08:48:51 +0100 | [diff] [blame] | 1 | include(CMakePrintHelpers) |
| 2 | |
Christophe Favergeon | 26c2f68 | 2019-09-06 14:43:32 +0100 | [diff] [blame] | 3 | |
Christophe Favergeon | aa3cdc5 | 2019-09-25 11:31:39 +0200 | [diff] [blame] | 4 | |
| 5 | include(configLib) |
Christophe Favergeon | ec57420 | 2019-08-09 06:54:05 +0100 | [diff] [blame] | 6 | SET(PLATFORMFOLDER ${ROOT}/CMSIS/DSP/Platforms/FVP) |
Christophe Favergeon | 3b2a0ee | 2019-06-12 13:29:14 +0200 | [diff] [blame] | 7 | include(configPlatform) |
| 8 | include(configBoot) |
Christophe Favergeon | 6b604eb | 2019-05-17 13:46:33 +0200 | [diff] [blame] | 9 | |
Christophe Favergeon | 3b2a0ee | 2019-06-12 13:29:14 +0200 | [diff] [blame] | 10 | define_property(TARGET |
| 11 | PROPERTY DISABLEOPTIMIZATION |
| 12 | BRIEF_DOCS "Force disabling of optimizations" |
| 13 | FULL_DOCS "Force disabling of optimizations") |
Christophe Favergeon | 6b604eb | 2019-05-17 13:46:33 +0200 | [diff] [blame] | 14 | |
Christophe Favergeon | d004857 | 2020-02-04 14:42:25 +0100 | [diff] [blame^] | 15 | define_property(TARGET |
| 16 | PROPERTY DISABLEHALFFLOATSUPPORT |
| 17 | BRIEF_DOCS "Force disabling of f16 support" |
| 18 | FULL_DOCS "Force disabling of f16 support") |
| 19 | |
Christophe Favergeon | 3b2a0ee | 2019-06-12 13:29:14 +0200 | [diff] [blame] | 20 | # Config core settings |
| 21 | # Configure platform (semihosting etc ...) |
| 22 | # May be required for some compiler |
| 23 | function(disableOptimization project) |
| 24 | set_target_properties(${project} PROPERTIES DISABLEOPTIMIZATION ON) |
| 25 | endfunction() |
Christophe Favergeon | 6b604eb | 2019-05-17 13:46:33 +0200 | [diff] [blame] | 26 | |
Christophe Favergeon | d004857 | 2020-02-04 14:42:25 +0100 | [diff] [blame^] | 27 | function(disableHasfFloat project) |
| 28 | set_target_properties(${project} PROPERTIES DISABLEHALFFLOATSUPPORT ON) |
| 29 | endfunction() |
| 30 | |
Christophe Favergeon | 6b604eb | 2019-05-17 13:46:33 +0200 | [diff] [blame] | 31 | |
Christophe Favergeon | 3b2a0ee | 2019-06-12 13:29:14 +0200 | [diff] [blame] | 32 | # Config app |
| 33 | function (configApp project cmsisRoot) |
Christophe Favergeon | d004857 | 2020-02-04 14:42:25 +0100 | [diff] [blame^] | 34 | # 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 Favergeon | 3b2a0ee | 2019-06-12 13:29:14 +0200 | [diff] [blame] | 39 | configcore(${project} ${cmsisRoot}) |
Christophe Favergeon | ec57420 | 2019-08-09 06:54:05 +0100 | [diff] [blame] | 40 | configboot(${project} ${cmsisRoot} ${PLATFORMFOLDER}) |
Christophe Favergeon | 3b2a0ee | 2019-06-12 13:29:14 +0200 | [diff] [blame] | 41 | set_platform_core() |
| 42 | core_includes(${project}) |
| 43 | SET(PLATFORMID ${PLATFORMID} PARENT_SCOPE) |
| 44 | SET(COREID ${COREID} PARENT_SCOPE) |
Christophe Favergeon | e018132 | 2019-05-20 13:25:14 +0200 | [diff] [blame] | 45 | endfunction() |