Bloat Bdscr -

Always audit your linker scripts and descriptor data structures – especially when porting code across different flash architectures or toolchains.

gcc -DNDEBUG -ffunction-sections -fdata-sections ... ld --gc-sections -o output.elf input.o Or manually strip after linking:

.bdscr : ALIGN(4) KEEP(*(.bdscr)) > FLASH Instead of: bloat bdscr

.bdscr : KEEP(*(.bdscr)) . = ALIGN(4096); // Over-alignment > FLASH With:

5.1. Linker Script Optimization Replace: Always audit your linker scripts and descriptor data

bdscr_t blocks[256]; // 256 * 32 bytes = 8KB Use:

Reduced alignment to 4 bytes, changed static array to pointer + malloc, and moved non-critical descriptors to a compressed filesystem. // Over-alignment &gt

Example bloaty command: