|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
The CONFIG_* answers the vendored esp-hosted core asks for. More...
Go to the source code of this file.
Macros | |
| #define | CONFIG_ESP_HOSTED_ENABLED (1) |
| This firmware is an esp-hosted host. | |
| #define | CONFIG_ESP_HOSTED_USE_MEMPOOL (0) |
| Transport buffers come from esp-hosted's own block pool. | |
| #define | CONFIG_ESP_HOSTED_DFLT_TASK_STACK (4096) |
| Default stack, in bytes, for a transport worker thread. | |
| #define | CONFIG_H_LOWER_MEMCOPY (0) |
| Do not trade a pooled buffer for a per-packet heap allocation. | |
| #define | CONFIG_ESP_HOSTED_WIFI_AUTO_CONNECT_ON_STA_START (0) |
| The application decides when to associate, not the event handler. | |
| #define | CONFIG_ESP_WIFI_ENABLE_WIFI_TX_STATS (0) |
| No transmit-side Wi-Fi driver statistics are collected. | |
| #define | CONFIG_ESP_WIFI_ENABLE_WIFI_RX_STATS (0) |
| No receive-side Wi-Fi driver statistics are collected. | |
The CONFIG_* answers the vendored esp-hosted core asks for.
On an ESP-IDF host this file does not exist in source control at all: menuconfig writes it into the build directory from the Kconfig tree, and every CONFIG_* symbol in it is a rendering of a choice made in that menu. There is no Kconfig tree here and no menuconfig to run, so the file is authored, and the authority for every value below is this project's own build – the transport that is actually wired, the RTOS that is actually linked, the allocator policy this firmware actually obeys. Nothing in this file may be justified by "that is what menuconfig defaults to"; it must be justified by what the RA8D2 build does.
Five vendored translation units include sdkconfig.h by name (esp_hosted_cli.{c,h}, mempool.h, mempool.c), and a further eighteen reach CONFIG_* symbols through other headers.
Definition in file sdkconfig.h.
| #define CONFIG_ESP_HOSTED_DFLT_TASK_STACK (4096) |
Default stack, in bytes, for a transport worker thread.
Not a flag: sdio/sdio_drv.c expands it directly as the value of its four *_TASK_STACK_SIZE macros, so an undefined symbol here is a syntax error rather than a silent zero. 4096 matches DFLT_TASK_STACK_SIZE in port_esp_hosted_host_os.h, which is what the SPI driver – the transport this board actually uses – passes to _h_thread_create. Keeping the two equal means the SDIO driver, if it is ever built, gets the stack this port has already sized for a transport worker rather than a second, unrelated number.
Definition at line 132 of file sdkconfig.h.
| #define CONFIG_ESP_HOSTED_ENABLED (1) |
This firmware is an esp-hosted host.
Tested with #ifdef in common/utils/esp_hosted_cli.{c,h}, where it gates the includes of port_esp_hosted_host_config.h and the power-save driver – the host-side headers, as opposed to the co-processor ones. Defined because the statement is simply true: the RA8D2 drives an ESP32-C6 over SPI and this port supplies the host half of that link. The value is 1 for readability only; the #ifdef never inspects it.
Definition at line 74 of file sdkconfig.h.
| #define CONFIG_ESP_HOSTED_USE_MEMPOOL (0) |
Transport buffers come from esp-hosted's own block pool.
Zero. Its companion H_USE_MEMPOOL in port_esp_hosted_host_config.h is left undefined rather than defined to zero, because the vendored vtable header guards four of its rows with #ifdef – defining that symbol at all, even to zero, would grow hosted_osi_funcs_t. This one is tested with a bare #if, so here zero is the spelling that means off. The two say the same thing in the two different dialects their consumers use. The reason for off is structural. common/mempool/mempool_ll.h includes freertos/FreeRTOS.h, portmacro.h, task.h and semphr.h unconditionally – upstream's pool is a FreeRTOS data structure, and this image runs ThreadX.
Switching it off costs nothing this project wanted. With it off every transport buffer goes through the port's _h_malloc_align, which serves from a fixed ThreadX byte pool carved once during initialisation, so the allocation profile stays bounded and NASA Power of 10 Rule 3 clean – which is the property the pool existed to provide.
Definition at line 109 of file sdkconfig.h.
| #define CONFIG_ESP_HOSTED_WIFI_AUTO_CONNECT_ON_STA_START (0) |
The application decides when to associate, not the event handler.
Tested with a bare #if in three places in rpc/wrap/rpc_wrap.c: it guards a forward declaration, the definition of rpc_wifi_connect_async(), and the call to it from inside the WIFI_EVENT_STA_START case. Zero, so the station-started event is reported and nothing else happens. Two reasons. It matches ESP-IDF's own contract, in which an application calls esp_wifi_connect() itself once it has credentials – code written against ESP-IDF and moved onto this port behaves the same. And it keeps association policy in the application rather than firing an asynchronous RPC from inside the Wi-Fi event dispatch, where a failure has no caller to return to.
Definition at line 191 of file sdkconfig.h.
| #define CONFIG_ESP_WIFI_ENABLE_WIFI_RX_STATS (0) |
No receive-side Wi-Fi driver statistics are collected.
The receive-side twin of CONFIG_ESP_WIFI_ENABLE_WIFI_TX_STATS, tested with a bare #if in the same three CLI command tables and zero for the same reason.
Definition at line 232 of file sdkconfig.h.
| #define CONFIG_ESP_WIFI_ENABLE_WIFI_TX_STATS (0) |
No transmit-side Wi-Fi driver statistics are collected.
Tested with a bare #if in common/utils/esp_hosted_cli.c, which gates CLI commands that dump the co-processor's Wi-Fi driver counters. Zero: the counters live in the Wi-Fi driver on the ESP32-C6, and the only thing that reads them is the CLI, which this build does not have (see CONFIG_ESP_HOSTED_CLI_ENABLED in the undefined section below).
Definition at line 213 of file sdkconfig.h.
| #define CONFIG_H_LOWER_MEMCOPY (0) |
Do not trade a pooled buffer for a per-packet heap allocation.
Tested with a bare #if in host/utils/stats.c and in spi/spi_drv.c – in the SPI driver inside an outer #if 0, so only the statistics path is live. Upstream's "lower memcopy" variant saves one copy by calling _h_calloc for every raw-throughput packet and freeing it again afterwards. Zero, because that is a per-packet heap allocation on a hot path: NASA Power of 10 Rule 3 rules it out, and it would also contradict CONFIG_ESP_HOSTED_USE_MEMPOOL, which says transport buffers come from the pool.
Definition at line 164 of file sdkconfig.h.