Skip to content

Commit

Permalink
Merge branch 'release/0.10.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGeldenhuys committed Aug 3, 2021
2 parents 5f15a8f + 3bd9f9b commit 00e3c36
Show file tree
Hide file tree
Showing 12 changed files with 316 additions and 158 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ fabric.properties

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

# CMAKE generated version file from 'GitAppVersion.cmake'
Core/Inc/version.h
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_C_STANDARD 11)

# Generate version from git
include(MyAppVersion.cmake)
add_definitions(-DKV_VERSION="${MYAPP_VERSION}")
add_custom_target( GitAppVersion
COMMAND ${CMAKE_COMMAND}
-D INPUT_FILE=${CMAKE_CURRENT_SOURCE_DIR}/Core/Inc/version.h.in
-D OUTPUT_FILE=${CMAKE_CURRENT_SOURCE_DIR}/Core/Inc/version.h
-P ${CMAKE_CURRENT_SOURCE_DIR}/GitAppVersion.cmake
)

#Uncomment for hardware floating point
add_compile_definitions(ARM_MATH_CM4;ARM_MATH_MATRIX_CHECK;ARM_MATH_ROUNDING)
Expand Down Expand Up @@ -82,3 +86,6 @@ add_custom_command(TARGET ${PROJECT_NAME}.elf POST_BUILD
COMMAND ${CMAKE_OBJCOPY} -Obinary $<TARGET_FILE:${PROJECT_NAME}.elf> ${BIN_FILE}
COMMENT "Building ${HEX_FILE}
Building ${BIN_FILE}")

# Add dependency to run GitVersionApp before build
add_dependencies(${PROJECT_NAME}.elf GitAppVersion)
10 changes: 9 additions & 1 deletion CMakeLists_template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_C_STANDARD 11)

# Generate version from git
include(MyAppVersion.cmake)
add_custom_target( GitAppVersion
COMMAND ${CMAKE_COMMAND}
-D INPUT_FILE=${CMAKE_CURRENT_SOURCE_DIR}/Core/Inc/version.h.in
-D OUTPUT_FILE=${CMAKE_CURRENT_SOURCE_DIR}/Core/Inc/version.h
-P ${CMAKE_CURRENT_SOURCE_DIR}/GitAppVersion.cmake
)

#Uncomment for hardware floating point
add_compile_definitions(ARM_MATH_CM4;ARM_MATH_MATRIX_CHECK;ARM_MATH_ROUNDING)
Expand Down Expand Up @@ -80,3 +85,6 @@ add_custom_command(TARGET $${PROJECT_NAME}.elf POST_BUILD
COMMAND $${CMAKE_OBJCOPY} -Obinary $<TARGET_FILE:$${PROJECT_NAME}.elf> $${BIN_FILE}
COMMENT "Building $${HEX_FILE}
Building $${BIN_FILE}")

# Add dependency to run GitVersionApp before build
add_dependencies(${PROJECT_NAME}.elf GitAppVersion)
13 changes: 11 additions & 2 deletions Core/Inc/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,30 @@
#ifdef __cplusplus
extern "C" {
#endif
#include "version.h"

#define ADC_MAX_DELAY 100

#define AUTHORS "CM Geldenhuys"

// Set logging level
#define LOG_LEVEL_INFO
// Set Log destination
#define LOG_DEST_TTY

#ifdef DEBUG
// Enable performance metering
#define PERF_ENABLE

// Change ADC sampling Freq.
#define ADC_SAMPLING_RATE 16000

// Set Log destination
#define LOG_DEST_TTY

// Enable HPF when in DEBUG mode
#define ADC_EN_HPF
#else
// Set Log destination
#define LOG_DEST_FILE
#endif

// Enable static file allocation
Expand Down
Loading

0 comments on commit 00e3c36

Please sign in to comment.