From 51c13b0f0b87cc48b6a14f30cdc7b023bf988a23 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Tue, 7 Oct 2025 23:41:58 +0200 Subject: [PATCH] Add memory leak checker. Signed-off-by: Pol Henarejos --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index be0feb2..93402f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,6 +151,12 @@ if(ENABLE_EMULATION) target_link_options(pico_fido PUBLIC -Wl,-dead_strip ) + if(DEBUG_APDU) + target_compile_options(pico_fido PUBLIC + -fsanitize=address -g -O1 -fno-omit-frame-pointer) + target_link_options(pico_fido PUBLIC + -fsanitize=address -g -O1 -fno-omit-frame-pointer) + endif() else() target_link_options(pico_fido PUBLIC -Wl,--gc-sections