diff --git a/CMakeLists.txt b/CMakeLists.txt index 00c73cbc..78a1e57e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -171,6 +171,7 @@ if(CMAKE_CROSSCOMPILING) $<$:-specs=nosys.specs> $<$:-g> $<$:-g> + $<$>:-flto> -ffunction-sections -fdata-sections -fno-exceptions diff --git a/Core/Src/main.cpp b/Core/Src/main.cpp index a5c64aab..6d9a7155 100644 --- a/Core/Src/main.cpp +++ b/Core/Src/main.cpp @@ -5,8 +5,7 @@ using namespace ST_LIB; constexpr auto led = ST_LIB::DigitalOutputDomain::DigitalOutput(ST_LIB::PF13); - -using MainBoard = ST_LIB::Board; +using MainBoard = ST_LIB::Board,led>; #ifndef EXAMPLE_SELECTED int main(void) { @@ -22,7 +21,7 @@ int main(void) { #endif extern "C" void Error_Handler(void) { - ErrorHandler("HAL error handler triggered"); + PANIC("HAL error handler triggered"); while (1) { } }