From 47dd3d4df71eff3dff2fe12e2afbbc87a4b78ec3 Mon Sep 17 00:00:00 2001 From: oganigl Date: Mon, 11 May 2026 15:17:43 +0200 Subject: [PATCH 1/2] added linked time optimization for release --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) 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 From e52d4a6c6e29288d238556d8b52dcfa7d7aeeb18 Mon Sep 17 00:00:00 2001 From: oganigl Date: Mon, 11 May 2026 16:17:32 +0200 Subject: [PATCH 2/2] modified main so can compile --- Core/Src/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) { } }