From b8fbe472b018ff1099d38665bb7852dc33dbf934 Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Tue, 30 Jul 2019 10:36:30 +0200 Subject: [PATCH] CMSIS-DSP:Some corrections to cmake build system. --- Source/CMakeLists.txt | 1 - Testing/.gitignore | 1 + Testing/currentConfig.csv | 2 -- Toolchain/AC6.cmake | 9 ++++++++- configCore.cmake | 1 + configPlatform.cmake | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 Testing/currentConfig.csv diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index c7c3531d..0041aaf7 100755 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -7,7 +7,6 @@ include(config) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/..) -option(FASTMATHCOMPUTATIONS "Fast Math enabled" ON) option(NEON "Neon acceleration" OFF) option(NEONEXPERIMENTAL "Neon experimental acceleration" OFF) option(LOOPUNROLL "Loop unrolling" ON) diff --git a/Testing/.gitignore b/Testing/.gitignore index 205c922b..1c22412d 100644 --- a/Testing/.gitignore +++ b/Testing/.gitignore @@ -17,3 +17,4 @@ GeneratedInclude/ GeneratedSource/ *.db TestDesc.txt +currentConfig.csv diff --git a/Testing/currentConfig.csv b/Testing/currentConfig.csv deleted file mode 100644 index 08125dc3..00000000 --- a/Testing/currentConfig.csv +++ /dev/null @@ -1,2 +0,0 @@ -OPTIMIZED,HARDFP,FASTMATH,NEON,UNROLL,ROUNDING,PLATFORM,CORE,COMPILER,VERSION -1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001 diff --git a/Toolchain/AC6.cmake b/Toolchain/AC6.cmake index 83de49e3..cb7ec760 100644 --- a/Toolchain/AC6.cmake +++ b/Toolchain/AC6.cmake @@ -36,7 +36,14 @@ function(compilerSpecificCompileOptions PROJECTNAME ROOT) if (ARM_CPU STREQUAL "cortex-m33" ) target_compile_options(${PROJECTNAME} PUBLIC "-mfpu=fpv5-sp-d16") - #target_compile_options(${PROJECTNAME} PUBLIC -funsigned-char;-fshort-enums;-fshort-wchar;-ffunction-sections) + endif() + + if (ARM_CPU STREQUAL "cortex-m7" ) + target_compile_options(${PROJECTNAME} PUBLIC "-mfpu=fpv5-sp-d16") + endif() + + if (ARM_CPU STREQUAL "cortex-m4" ) + target_compile_options(${PROJECTNAME} PUBLIC "-mfpu=fpv4-sp-d16") endif() if (ARM_CPU STREQUAL "cortex-a9" ) diff --git a/configCore.cmake b/configCore.cmake index b23c5209..e8523c03 100644 --- a/configCore.cmake +++ b/configCore.cmake @@ -6,6 +6,7 @@ SET(CORTEXM ON) option(HARDFP "Hard floating point" ON) option(LITTLEENDIAN "Little endian" ON) +option(FASTMATHCOMPUTATIONS "Fast Math enabled" OFF) # More detailed identification for benchmark results SET(COREID ARMCM7) diff --git a/configPlatform.cmake b/configPlatform.cmake index b1e589f7..4fa12f23 100644 --- a/configPlatform.cmake +++ b/configPlatform.cmake @@ -1,5 +1,5 @@ option(SEMIHOSTING "Test trace using printf" ON) -option(PLATFORM "Platform" "FVP") +SET(PLATFORM "FVP") if (PLATFORM STREQUAL "FVP")