diff --git a/src/avclan/target/avr-attiny3216/CMakeLists.txt b/src/avclan/target/avr-attiny3216/CMakeLists.txt index 00e96cd..6634849 100644 --- a/src/avclan/target/avr-attiny3216/CMakeLists.txt +++ b/src/avclan/target/avr-attiny3216/CMakeLists.txt @@ -77,7 +77,7 @@ set_property(CACHE USART_RXMODE PROPERTY STRINGS set(RTC_STATUS_PERIOD_MS 1000 CACHE STRING "Measured ms per nominal RTC status period (1000 = no correction)") # --- Firmware configuration options ---------------------------------------- -set(AVCLAN_FRAME_POOL_N 24 CACHE STRING "Pool allocator capacity for avclan::Frame (must be <= incoming/outgoing queue size)") +set(AVCLAN_FRAME_POOL_N 14 CACHE STRING "Pool allocator capacity for avclan::Frame (must be <= incoming/outgoing queue size)") try_compile(LIBC_VERSION_TEST SOURCES "${CMAKE_SOURCE_DIR}/cmake/libc-version-test.cpp" diff --git a/src/sniffer.cc b/src/sniffer.cc index 2dfdf62..8172a93 100644 --- a/src/sniffer.cc +++ b/src/sniffer.cc @@ -20,7 +20,9 @@ const char *const offon[] = {"OFF", "ON"}; -constexpr uint8_t CACHE_SIZE = 32; +constexpr uint8_t CACHE_SIZE = 16; +static_assert(CACHE_SIZE >= AVCLAN_FRAME_POOL_N, + "CACHE_SIZE must be >= avclan::Frame allocator pool capacity"); using namespace avclan;