|
esp-sdr-zephyr
Raw I/Q receive and transmit on the ESP32-S3/C6 Wi-Fi radio, for Zephyr
|
Usage categories for functions and buffers, placed in memory by rules for the SoC, the board and the app (esp_sdr_place.h). More...
Macros | |
| #define | ESP_SDR_CODE(cat, fn) |
Placement of function fn, used as cat (before its definition). | |
| #define | ESP_SDR_DATA(cat, nm) |
Placement of object nm, used as cat (on its definition). | |
| #define | ESP_SDR_DATA_F(cat, nm, f) |
As ESP_SDR_DATA(), with constraint f (DMA, ATOMIC or NOINIT) checked. | |
| #define | ESP_SDR_DATA_F2(cat, nm, f1, f2) |
| As ESP_SDR_DATA_F(), with two constraints. | |
| #define | ESP_SDR_BUF_DEFINE(cat, type, nm, dims, align, f) |
static type nm dims __aligned(align) in its region, with constraint f (or NONE). | |
| #define | ESP_SDR_STACK_DEFINE(nm, size) |
| A static kernel thread stack in the region of category STACK. | |
| #define | ESP_SDR_ASM_SECTION(cat, fn) |
The .section line of assembler function fn, used as cat. | |
| #define | ESP_SDR_REGION_CODE(cat, fn) |
The region token the rules choose for function fn used as cat, for tools (scripts/place/place_report.py). | |
Usage categories for functions and buffers, placed in memory by rules for the SoC, the board and the app (esp_sdr_place.h).
Guide: Code placement.
A function or buffer says how it is used; rules for the SoC, the board and the app say where that goes (doc/dev/code-placement.md). Every region expands to the attribute such code or data carried before (IRAM_ATTR, DRAM_ATTR, EXT_RAM_BSS_ATTR, ESP_SDR_HIGH_RAM, ...), so the default rules keep each section name as it was, and a multiapp extension's own definitions of those attributes (multiapp/ext.h) still apply.
Code, ESP_SDR_CODE(cat, fn) before a function definition, fn its name. cat:
Data, ESP_SDR_DATA(cat, name) or ESP_SDR_DATA_F(cat, name, flag) on a definition, name the object's name. cat: STATE (read and written per sample or chunk), TABLE (read-only, read per sample), BULK (captures, histories, data touched only now and then), SCRATCH (reused between calls). flag: DMA (internal RAM only), ATOMIC (never PSRAM: atomics, spinlocks, kernel objects), NOINIT (the code initializes it itself; required in the high region, which is not zeroed at boot). A clash between a flag and the region the rules chose stops the build. ESP_SDR_BUF_DEFINE() and ESP_SDR_STACK_DEFINE() define a buffer or a thread stack the same way.
Rules (the generated esp_sdr_place_rules.h includes the app's, the board's and the SoC's rule headers in that order; the first definition counts): ESP_SDR_PLACE_<cat> is a category's region, ESP_SDR_PIN_CODE_<fn> and ESP_SDR_PIN_DATA_<name> one function's or object's. Rules and pins can be narrowed to a scope, the compile definition ESP_SDR_PLACE_SCOPE of an app's or a library's sources (ESP_SDR_PLACE_<scope>_<cat>, ESP_SDR_PIN_CODE_<scope>_<fn>), so that the apps an image combines keep their own rules (apps/multiapp), and pins to a file that defines ESP_SDR_PLACE_FILE (ESP_SDR_PIN_CODE_<file>_<fn>; static names repeat across files). Lookup order: file pin, scope pin, pin, scope rule, rule. Regions: ESP_SDR_IRAM, ESP_SDR_HOTBLOCK, ESP_SDR_FLASH for code; ESP_SDR_DRAM, ESP_SDR_DEFAULT, ESP_SDR_HIGH, ESP_SDR_PSRAM, ESP_SDR_PSRAM_FILE, ESP_SDR_NOINIT, ESP_SDR_PSRAM_NOINIT for data; a pin of ESP_SDR_RULE stands for no pin. Builds for other targets (native_sim) place nothing.