From d6951f81b717ac546d5952eafd8c831892f3c783 Mon Sep 17 00:00:00 2001 From: Zach Nelson Date: Wed, 18 Mar 2026 11:41:18 -0500 Subject: [PATCH] fix: Build with -fno-exceptions (#1412) ## Summary **What is the goal of this PR?** Until today, I sincerely thought we were building without exception support. The codebase is not set up with any exception handling infrastructure. The SKILL.md file specifies no exceptions. I just learned that we actually were building with exceptions enabled, with `-fexceptions` coming from ~/.platformio/packages/framework-arduinoespressif32-libs/esp32c3/pioarduino-build.py. This change removes the `-fexceptions` flag and adds `-fno-exceptions`. The result is **53,670 bytes in flash savings**. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_ --- platformio.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platformio.ini b/platformio.ini index 4ba1c750..f4b56a9f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -36,9 +36,11 @@ build_flags = -DPNG_MAX_BUFFERED_PIXELS=16416 -Wno-bidi-chars -Wl,--wrap=panic_print_backtrace,--wrap=panic_abort + -fno-exceptions build_unflags = -std=gnu++11 + -fexceptions ; Board configuration board_build.flash_mode = dio