Sync inav to Gitea
Make sure docs are updated / settings_md (push) Canceled after 0s
Build firmware / test (push) Canceled after 0s
Build firmware / build-SITL-Windows (push) Canceled after 0s
Build firmware / build-SITL-Mac (push) Canceled after 0s
Build firmware / build-SITL-Linux (push) Canceled after 0s
Build firmware / build-SITL-Linux-arm64 (push) Canceled after 0s
Build firmware / upload-artifacts (push) Canceled after 0s
Build firmware / build-single-target (push) Canceled after 0s
Build firmware / build (9) (push) Canceled after 0s
Build firmware / build (8) (push) Canceled after 0s
Build firmware / build (7) (push) Canceled after 0s
Build firmware / build (6) (push) Canceled after 0s
Build firmware / build (5) (push) Canceled after 0s
Build firmware / build (4) (push) Canceled after 0s
Build firmware / build (3) (push) Canceled after 0s
Build firmware / build (2) (push) Canceled after 0s
Build firmware / build (14) (push) Canceled after 0s
Build firmware / build (13) (push) Canceled after 0s
Build firmware / build (12) (push) Canceled after 0s
Build firmware / build (11) (push) Canceled after 0s
Build firmware / build (10) (push) Canceled after 0s
Build firmware / build (1) (push) Canceled after 0s
Build firmware / build (0) (push) Canceled after 0s
Build firmware / detect (push) Canceled after 0s
Build pre-release / build (push) Canceled after 0s
Build pre-release / Release (push) Canceled after 0s
Make sure docs are updated / settings_md (push) Canceled after 0s
Build firmware / test (push) Canceled after 0s
Build firmware / build-SITL-Windows (push) Canceled after 0s
Build firmware / build-SITL-Mac (push) Canceled after 0s
Build firmware / build-SITL-Linux (push) Canceled after 0s
Build firmware / build-SITL-Linux-arm64 (push) Canceled after 0s
Build firmware / upload-artifacts (push) Canceled after 0s
Build firmware / build-single-target (push) Canceled after 0s
Build firmware / build (9) (push) Canceled after 0s
Build firmware / build (8) (push) Canceled after 0s
Build firmware / build (7) (push) Canceled after 0s
Build firmware / build (6) (push) Canceled after 0s
Build firmware / build (5) (push) Canceled after 0s
Build firmware / build (4) (push) Canceled after 0s
Build firmware / build (3) (push) Canceled after 0s
Build firmware / build (2) (push) Canceled after 0s
Build firmware / build (14) (push) Canceled after 0s
Build firmware / build (13) (push) Canceled after 0s
Build firmware / build (12) (push) Canceled after 0s
Build firmware / build (11) (push) Canceled after 0s
Build firmware / build (10) (push) Canceled after 0s
Build firmware / build (1) (push) Canceled after 0s
Build firmware / build (0) (push) Canceled after 0s
Build firmware / detect (push) Canceled after 0s
Build pre-release / build (push) Canceled after 0s
Build pre-release / Release (push) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,141 @@
|
||||
include(CMakePrintHelpers)
|
||||
cmake_policy(SET CMP0077 NEW)
|
||||
|
||||
SET(CORTEXM ON)
|
||||
option(FASTMATHCOMPUTATIONS "Fast Math enabled" ON)
|
||||
option(NEON "Neon acceleration" OFF)
|
||||
option(NEONEXPERIMENTAL "Neon experimental acceleration" OFF)
|
||||
option(LOOPUNROLL "Loop unrolling" ON)
|
||||
option(ROUNDING "Rounding" OFF)
|
||||
option(MATRIXCHECK "Matrix Checks" OFF)
|
||||
|
||||
###################
|
||||
#
|
||||
# ALL CORTEX
|
||||
#
|
||||
|
||||
function(configdsp PROJECTNAME DSP)
|
||||
target_compile_options(${PROJECTNAME} PUBLIC "-mfloat-abi=hard;-mlittle-endian")
|
||||
|
||||
if (CONFIGTABLE)
|
||||
# Public because initialization for FFT may be defined in client code
|
||||
# and needs access to the table.
|
||||
target_compile_definitions(${PROJECTNAME} PUBLIC ARM_DSP_CONFIG_TABLES)
|
||||
endif()
|
||||
|
||||
if (FASTMATHCOMPUTATIONS)
|
||||
target_compile_options(${PROJECTNAME} PUBLIC "-ffast-math")
|
||||
endif()
|
||||
|
||||
if (LOOPUNROLL)
|
||||
target_compile_definitions(${PROJECTNAME} PRIVATE ARM_MATH_LOOPUNROLL)
|
||||
endif()
|
||||
|
||||
if (ROUNDING)
|
||||
target_compile_definitions(${PROJECTNAME} PRIVATE ARM_MATH_ROUNDING)
|
||||
endif()
|
||||
|
||||
if (MATRIXCHECK)
|
||||
target_compile_definitions(${PROJECTNAME} PRIVATE ARM_MATH_MATRIX_CHECK)
|
||||
endif()
|
||||
|
||||
|
||||
###################
|
||||
#
|
||||
# CORTEX-A
|
||||
#
|
||||
|
||||
# CORTEX-A9
|
||||
if (ARM_CPU STREQUAL "cortex-a9" )
|
||||
target_include_directories(${PROJECTNAME} PUBLIC "${DSP}/../../Core_A/Include")
|
||||
SET(CORTEXM OFF)
|
||||
|
||||
if (NOT (NEON OR NEONEXPERIMENTAL))
|
||||
target_compile_options(${PROJECTNAME} PUBLIC "-mfpu=vfpv3-d16-fp16")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
# CORTEX-A7
|
||||
if (ARM_CPU STREQUAL "cortex-a7" )
|
||||
target_include_directories(${PROJECTNAME} PUBLIC "${DSP}/../../Core_A/Include")
|
||||
SET(CORTEXM OFF)
|
||||
|
||||
if (NOT (NEON OR NEONEXPERIMENTAL))
|
||||
target_compile_options(${PROJECTNAME} PUBLIC "-mfpu=vfpv4-d16")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
# CORTEX-A5
|
||||
if (ARM_CPU STREQUAL "cortex-a5" )
|
||||
target_include_directories(${PROJECTNAME} PUBLIC "${DSP}/../../Core_A/Include")
|
||||
SET(CORTEXM OFF)
|
||||
|
||||
if ((NEON OR NEONEXPERIMENTAL))
|
||||
target_compile_options(${PROJECTNAME} PUBLIC "-mfpu=neon-vfpv4")
|
||||
else()
|
||||
target_compile_options(${PROJECTNAME} PUBLIC "-mfpu=vfpv4-d16")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
###################
|
||||
#
|
||||
# CORTEX-M
|
||||
#
|
||||
|
||||
# CORTEX-M35
|
||||
if (ARM_CPU STREQUAL "cortex-m35")
|
||||
target_include_directories(${PROJECTNAME} PUBLIC "${DSP}/../../Core/Include")
|
||||
endif()
|
||||
|
||||
# CORTEX-M33
|
||||
if (ARM_CPU STREQUAL "cortex-m33")
|
||||
target_include_directories(${PROJECTNAME} PUBLIC "${DSP}/../../Core/Include")
|
||||
endif()
|
||||
|
||||
# CORTEX-M23
|
||||
if (ARM_CPU STREQUAL "cortex-m23")
|
||||
target_include_directories(${PROJECTNAME} PUBLIC "${DSP}/../../Core/Include")
|
||||
endif()
|
||||
|
||||
# CORTEX-M7
|
||||
if (ARM_CPU STREQUAL "cortex-m7")
|
||||
target_include_directories(${PROJECTNAME} PUBLIC "${DSP}/../../Core/Include")
|
||||
endif()
|
||||
|
||||
# CORTEX-M4
|
||||
if (ARM_CPU STREQUAL "cortex-m4")
|
||||
target_include_directories(${PROJECTNAME} PUBLIC "${DSP}/../../Core/Include")
|
||||
|
||||
endif()
|
||||
|
||||
# CORTEX-M3
|
||||
if (ARM_CPU STREQUAL "cortex-m3")
|
||||
target_include_directories(${PROJECTNAME} PUBLIC "${DSP}/../../Core/Include")
|
||||
endif()
|
||||
|
||||
# CORTEX-M0plus
|
||||
if (ARM_CPU STREQUAL "cortex-m0p")
|
||||
target_include_directories(${PROJECTNAME} PUBLIC "${DSP}/../../Core/Include")
|
||||
endif()
|
||||
|
||||
# CORTEX-M0
|
||||
if (ARM_CPU STREQUAL "cortex-m0")
|
||||
target_include_directories(${PROJECTNAME} PUBLIC "${DSP}/../../Core/Include")
|
||||
endif()
|
||||
|
||||
###################
|
||||
#
|
||||
# FEATURES
|
||||
#
|
||||
|
||||
if (NEON AND NOT CORTEXM)
|
||||
target_compile_definitions(${PROJECTNAME} PRIVATE ARM_MATH_NEON __FPU_PRESENT)
|
||||
endif()
|
||||
|
||||
if (NEONEXPERIMENTAL AND NOT CORTEXM)
|
||||
target_compile_definitions(${PROJECTNAME} PRIVATE ARM_MATH_NEON_EXPERIMENTAL __FPU_PRESENT)
|
||||
endif()
|
||||
endfunction()
|
||||
Reference in New Issue
Block a user