SRAM Lite Project
Overview
sram_lite is the trimmed-down BK7258 application project. It shares the AP/CP startup flow and application entry code with the default app project, but trims features and re-splits memory to leave more SRAM to the AP side, which suits memory-constrained solutions that need a baseline to evaluate against.
Removes the AT command service, the Bluetooth host, IPv6, iperf, and a set of driver self-tests; Bluetooth is limited to BLE slave.
Disables
CONFIG_OTA_FUNCTION(it isyinapp), so the OTA implementation underap/components/otais not compiled.LWIP uses a reduced memory strategy:
CONFIG_LWIP_MEM_DEFAULTon the AP andCONFIG_LWIP_MEM_REDUCEon the CP.The SRAM split favors the AP, moving 48K from the CP compared with
app(AP_RAM=0x05c000,CP_RAM=0x033700).Keeps the main features: Wi-Fi, PSRAM, FATFS/SD, LittleFS, EasyFlash, and VFS.
Both BK7258 and BK7257 build targets are supported.
The application entry also contains optional SMP, IPC, and BLE network-provisioning test initialization, which is compiled only when the corresponding configuration is enabled.
Project layout
ap/ap_main.c: AP initialization and optional test codecp/cp_main.c: CP initialization and CP1 power-on voteap/config/bk7258_ap/config: trimmed AP project configurationcp/config/bk7258/config: trimmed CP project configurationpartitions/bk7258/auto_partitions.csv: flash partition layoutpartitions/bk7258/ram_regions.csv: AP-favoring SRAM/PSRAM region layout
Build
Run from the SDK root:
make bk7258 PROJECT=sram_lite
To build the BK7257 target:
make bk7257 PROJECT=sram_lite
Run
Flash the generated AP and CP images, connect the serial consoles, and reset the board. Confirm that both application entries complete initialization, then use the remaining Wi-Fi and filesystem CLI commands for basic validation.
Notes
The value of this project is the memory baseline. Before re-enabling trimmed features (especially the Bluetooth host, AT, or IPv6), confirm that the SRAM split in
ram_regions.csvis still sufficient.CP-side SRAM is already squeezed to
0x033700, so adding CP features tends to hit the limit first.CONFIG_OTA_HTTPis stillywhileCONFIG_OTA_FUNCTIONisn. To use OTA, enableCONFIG_OTA_FUNCTIONas well;CONFIG_OTA_HTTPalone does not build the OTA implementation.CONFIG_MAX_COMMANDSis 200 on both AP and CP; raise it when adding many new CLI commands.