Skip to content

Commit 539a8c7

Browse files
raphaelgaultmicrobit-carlos
authored andcommitted
fft: Add cmsis submodule for fft computation
Signed-off-by: Raphael Gault <[email protected]> Merged CMakeLists.txt target link libraries with master - includes relevant CMSIS libraries.
1 parent 50eef90 commit 539a8c7

File tree

4 files changed

+31
-2
lines changed

4 files changed

+31
-2
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "CMSIS_5"]
2+
path = CMSIS_5
3+
url = [email protected]:ARM-software/CMSIS_5.git

CMSIS_5

Submodule CMSIS_5 added at 2e98b24

CMakeLists.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,29 @@ RECURSIVE_FIND_FILE(LIB_ARCHIVE_FILES "${CMAKE_CURRENT_LIST_DIR}/lib" "*.a")
5050

5151
set(CMAKE_SYSTEM_PROCESSOR "armv7-m" PARENT_SCOPE)
5252

53+
set(ROOT "${CMAKE_CURRENT_LIST_DIR}/CMSIS_5/")
54+
list(APPEND INCLUDE_DIRS "${ROOT}/CMSIS/Core/Include/")
55+
56+
57+
# Define the path to CMSIS-DSP (ROOT is defined on command line when using cmake)
58+
set(DSP ${ROOT}/CMSIS/DSP)
59+
60+
include(${DSP}/Toolchain/GCC.cmake)
61+
62+
# Add DSP folder to module path
63+
list(APPEND CMAKE_MODULE_PATH ${DSP})
64+
65+
###########
66+
#
67+
# CMSIS DSP
68+
#
69+
5370
# add them
5471
include_directories(${INCLUDE_DIRS})
5572

73+
# Load CMSIS-DSP definitions. Libraries will be built in bin_dsp
74+
add_subdirectory(${DSP}/Source bin_dsp)
75+
5676
# create our target
5777
add_library(codal-microbit-v2 ${SOURCE_FILES})
5878

@@ -61,6 +81,11 @@ target_link_libraries(
6181
codal-nrf52
6282
codal-core
6383
codal-microbit-nrf5sdk
84+
CMSISDSPSupport
85+
CMSISDSPTransform
86+
CMSISDSPCommon
87+
CMSISDSPComplexMath
88+
CMSISDSPStatistics
6489
${LIB_OBJECT_FILES}
6590
${LIB_ARCHIVE_FILES}
6691
)

target.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050
"cmake_definitions":{
5151
"MBED_LEGACY_TOOLCHAIN":"GCC_ARM;"
5252
},
53-
"cpu_opts":"-mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp",
53+
"cpu_opts":"-mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard",
5454
"asm_flags":"-fno-exceptions -fno-unwind-tables --specs=nosys.specs -mcpu=cortex-m4 -mthumb",
5555
"c_flags":"-std=c99 --specs=nosys.specs -Warray-bounds",
5656
"cpp_flags":"-std=c++11 -fwrapv -fno-rtti -fno-threadsafe-statics -fno-exceptions -fno-unwind-tables -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment -Wno-array-bounds",
57-
"linker_flags":"-Wl,--no-wchar-size-warning -Wl,--gc-sections -Wl,--wrap,atexit -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -Wl,--start-group -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -Wl,--end-group",
57+
"linker_flags":"-Wl,--no-wchar-size-warning -Wl,--gc-sections -Wl,--wrap,atexit -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -Wl,--start-group -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -Wl,--end-group",
5858
"libraries":[
5959
{
6060
"name":"codal-core",

0 commit comments

Comments
 (0)