forked from recursinging/daisy_q
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibDaisy.patch
51 lines (48 loc) · 2.45 KB
/
libDaisy.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
diff --git a/cmake/toolchains/stm32h750xx.cmake b/cmake/toolchains/stm32h750xx.cmake
index 91f52c39..d15682b6 100644
--- a/cmake/toolchains/stm32h750xx.cmake
+++ b/cmake/toolchains/stm32h750xx.cmake
@@ -8,7 +8,7 @@ if(NOT DEFINED TOOLCHAIN_PREFIX)
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Linux)
set(TOOLCHAIN_PREFIX "/usr")
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin)
- set(TOOLCHAIN_PREFIX "/usr/local")
+ set(TOOLCHAIN_PREFIX "/Applications/ArmGNUToolchain/13.2.Rel1/arm-none-eabi")
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
message(STATUS "Please specify the TOOLCHAIN_PREFIX !\n For example: -DTOOLCHAIN_PREFIX=\"C:/Program Files/GNU Tools ARM Embedded\" ")
else()
@@ -64,8 +64,8 @@ set(CMAKE_EXE_LINKER_FLAGS "${MCU} -Wl,--gc-sections --specs=nano.specs --specs=
# Options for DEBUG build
# -Og Enables optimizations that do not interfere with debugging.
# -g Produce debugging information in the operating system’s native format.
-set(CMAKE_C_FLAGS_DEBUG "-O0 -g" CACHE INTERNAL "C Compiler options for debug build type")
-set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g" CACHE INTERNAL "C++ Compiler options for debug build type")
+set(CMAKE_C_FLAGS_DEBUG "-O2 -g" CACHE INTERNAL "C Compiler options for debug build type")
+set(CMAKE_CXX_FLAGS_DEBUG "-O2 -g" CACHE INTERNAL "C++ Compiler options for debug build type")
set(CMAKE_ASM_FLAGS_DEBUG "-g" CACHE INTERNAL "ASM Compiler options for debug build type")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "" CACHE INTERNAL "Linker options for debug build type")
diff --git a/src/per/sai.cpp b/src/per/sai.cpp
index bce0bb7e..9ee431b7 100644
--- a/src/per/sai.cpp
+++ b/src/per/sai.cpp
@@ -207,8 +207,8 @@ SaiHandle::Result SaiHandle::Impl::Init(const SaiHandle::Config& config)
SaiHandle::Result SaiHandle::Impl::DeInit()
{
// Must have been initialized before deinitialization
- if(&config_ == nullptr)
- return Result::ERR;
+ // if(&config_ == nullptr)
+ // return Result::ERR;
DeInitDma(PeripheralBlock::BLOCK_A);
DeInitDma(PeripheralBlock::BLOCK_B);
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 22b854cc..2ed1fef5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,6 +67,7 @@ add_library(${TARGET} STATIC
${MODULE_DIR}/ui/FullScreenItemMenu.cpp
${MODULE_DIR}/ui/UI.cpp
${MODULE_DIR}/util/color.cpp
+ ${MODULE_DIR}/util/MappedValue.cpp
${MODULE_DIR}/util/WaveTableLoader.cpp
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c