Dot matrix audio spectrum visualiser based on an stm32f107 STM eval board and several chained MAX2719 drivers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
stm32f107-audio-dotmatrix-v.../CMakeLists.txt

40 lines
1.6 KiB

8 years ago
project(f107-fft C ASM)
cmake_minimum_required(VERSION 3.5.0)
file(GLOB_RECURSE USER_SOURCES "User/*.c")
file(GLOB_RECURSE MX_SOURCES "Src/*.c")
8 years ago
file(GLOB_RECURSE HAL_SOURCES "Drivers/STM32F1xx_HAL_Driver/Src/*.c")
file(GLOB_RECURSE CMSIS_SOURCES "Drivers/CMSIS/DSP_Lib/Source/*.c" "Drivers/CMSIS/DSP_Lib/Source/*.S")
8 years ago
add_library(HAL ${HAL_SOURCES})
add_library(CMSIS ${CMSIS_SOURCES}
8 years ago
Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c
Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f107xc.s)
include_directories(Inc)
include_directories(Drivers/STM32F1xx_HAL_Driver/Inc)
include_directories(Drivers/CMSIS/Include)
include_directories(Drivers/CMSIS/Device/ST/STM32F1xx/Include)
include_directories(User)
# stdlib path
include_directories(/usr/arm-none-eabi/include)
include_directories(/usr/lib/gcc/arm-none-eabi/6.1.1/include/)
# defines for the used libraries
8 years ago
add_definitions(-DSTM32F107xC)
add_definitions(-DARM_MATH_CM3)
add_definitions(-DF_CPU=72000000UL)
add_definitions(-DUSE_FULL_ASSERT)
8 years ago
add_executable(${PROJECT_NAME}.elf ${MX_SOURCES} ${USER_SOURCES} ${LINKER_SCRIPT})
target_link_libraries(${PROJECT_NAME}.elf HAL CMSIS)
8 years ago
set(HEX_FILE ${PROJECT_SOURCE_DIR}/build/${PROJECT_NAME}.hex)
set(BIN_FILE ${PROJECT_SOURCE_DIR}/build/${PROJECT_NAME}.bin)
add_custom_command(TARGET ${PROJECT_NAME}.elf POST_BUILD
COMMAND ${CMAKE_OBJCOPY} -Oihex $<TARGET_FILE:${PROJECT_NAME}.elf> ${HEX_FILE}
COMMAND ${CMAKE_OBJCOPY} -Obinary $<TARGET_FILE:${PROJECT_NAME}.elf> ${BIN_FILE}
COMMENT "Building ${HEX_FILE} \nBuilding ${BIN_FILE}")