Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Resource budget (measurements)

Measured sizes of the firmware and the libraries, per hardware or build run. The limits themselves (queue depths, buffer sizes, heap size) are defined and explained in Resource limits; this page only records what was measured with them. Numbers here are history, not contracts: they change with every dependency update and are re-measured when the limits change.

Altruist Urban firmware (Wi-Fi + BLE control)

Measured with size on the release build (cargo build-esp32c3 / cargo build-esp32c6), baseline = Wi-Fi only, before the BLE control plane was added:

ESP32-C3 beforeESP32-C3 afterESP32-C6 beforeESP32-C6 after
.text (flash)970 0921 149 9521 012 3221 335 452
.data10 02415 64012 87618 396
.bss106 984181 248111 288185 056
wireless heap (in .bss)73 728131 07273 728131 072
.bss without heap33 25650 17637 56053 984

Statically allocated control buffers: reassembly 256 B + response 2 048 B + chunk 244 B (control task), BLE RX/TX queues 4 × ~250 B each, TrouBLE host resources, and the task futures. The application code stays heapless; only the radio drivers use the wireless heap.

Sensor runtime (rohi-hal)

cargo build-esp32c3, ESP32-C3 (before Wi-Fi/BLE/TLS):

ItemSize
.text (flash)114 370 B
.rodata (flash)24 096 B
.rwtext + .data (RAM)1 700 B + 2 132 B
.bss (RAM, includes task futures)9 160 B
Heapfixed radio heap only (see Memory model); application code does not allocate
Event queue16 events
Noise buffers256 samples (1 KiB) stack + 8 KiB DMA ring

Task stack usage is not measured yet.

Configuration store

The store uses no heap; see Resource limits for its bounds. Its RAM cost is a few words of state plus the stack workspace during a call.

IP stack, TCP and UDP pools

Not measured: no SDK component opens TCP connections yet, and the UDP pool (one socket, 2 x 128 B plus packet metadata) used by the NTP time source has not been measured on hardware either; the ntp_task stack and the time service state are small and also not measured. Measure the .bss contribution of NetResources and the minimum free wireless heap with an open connection when the first uplink component lands, and record it here.

How to measure

cargo build-esp32c3 && size target/riscv32imc-unknown-none-elf/release/altruist-urban
cargo build-esp32c6 && size target/riscv32imac-unknown-none-elf/release/altruist-urban

The minimum free wireless heap comes from rohi_net_esp::wireless_heap() (the firmware logs it with its snapshot; the heap-stats feature adds the minimum).