ProtoCore v0.0.1
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
board_profile.h File Reference

Per-variant default sizing: pick sane PC_* defaults for the target board. More...

#include "pc_platform.h"
#include "classic_defaults.h"

Go to the source code of this file.

Detailed Description

Per-variant default sizing: pick sane PC_* defaults for the target board.

The library's sizing defaults used to be a single flat set tuned to fit the smallest classic-ESP32 DRAM ceiling, so a board with far more RAM/flash silently inherited the same cramped numbers. This selector instead layers per-variant default files:

  • chip variant (classic / s3 / c6 / p4) - HW-specific switches + chip-appropriate defaults (internal SRAM, core count, crypto HW accel).
  • PSRAM size (8 / 16 / 32 MB) - RAM-backed buffer sizes; a given chip ships with or without PSRAM, so it is its own axis.
  • flash size (8 / 16 / 32 MB) - flash-backed sizing; likewise independent.

Every default is set behind an #ifndef, so precedence is "first definition wins": your -D / build_opt.h override > PSRAM profile > flash profile > chip profile (chip files pull in classic_defaults.h last as the universal floor). Nothing here forces a value you set yourself.

Chip is auto-detected from the SoC target macro. PSRAM/flash size can't be read reliably from the Arduino core, so set them for your board (they default to "none / smallest"):

build_flags = -DPC_PSRAM_MB=8 -DPC_FLASH_MB=16

ESP-IDF builds auto-fill both from the sdkconfig below.

Definition in file board_profile.h.