`_current` is now functionally equals to `arch_curr_thread()`, remove
its usage in-tree and deprecate it instead of removing it outright,
as it has been with us since forever.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Split the cached area and assign both parts IROM and DROM meaning. This
is necessary to overcome the esptool section merging issues.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Fix missing input/output enable flags on pinctrl macro, which
wouldn't allow for driver to see and apply flags configuration
made in the device tree.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Updates and fixes to support APPCPU.
- fix ld scripts
- fix and update memory layout
- fix build issues
- fix sysbuild
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Larger image partitions require more space in DRAM due to
the increase in .bss.sector_buffers.
Each sector in .bss.sector_buffers consumes 16 bytes.
In the worst case scenario, such as with the ESP32S3 N32R8V,
which has 32 MB of flash and most likely 12 MB image partition,
an addition of 0xc000 should be sufficient to accommodate this.
Signed-off-by: Nik Schewtschuk <nikita.schewtschuk@smartmechatronics.de>
- Update GDMA and ADC drivers and remove deprecated entries.
- Rebased hal_espressif to latest bump sync.
- Added ESP Timer and Radio common config values
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Make sure all kconfig related to Wi-Fi is
in its driver area.
This commit also removes esp_timer_init() call
from Wi-Fi driver.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This commit applies several changes in the way "heap_runtime"
feature is used. It can't be split due to bisectability issues.
Whenever the feature is enabled, a new heap is created and
custom malloc/calloc/free functions are added into the build
system. Those functions are currently used for internal Wi-Fi and BLE
drivers only.
Such changes are described below:
1) Rename heap.c to esp_heap_runtime.c for better readability.
2) Rename RUNTIME_HEAP to HEAP_RUNTIME to make it similar to what is
available in Zephyr.
3) Add runtime heap to BT as such as Wi-Fi.
Fixes#79490Fixes#79470
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Provide symbols for the creation of dynamic memory pool.
Update the ROM-code SRAM usage according the IDF main.
Fix static allocations size check.
Increase iram_seg memory size for MCUboot.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Provide symbols for the creation of dynamic memory pool.
Fix the loader ROM buffers start address.
Fix static allocation size check.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Add the `CONFIG_ESP_RUNTIME_HEAP` kconfig.
This allows the memory pool to be created starting
at `z_mapped_end` ending at `_heap_sentry`.
Added choice symbol ESP_WIFI_HEAP_* to select which
heap to use in the ESP WiFi adapter module.
Add file heap.c with code to initialize the runtime heap.
Size of the pool is checked during the runtime.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Currently the RAM allocated for the bootloader is not
enough to use MCUBoot with crypto signatures.
This commit bumps the #defines accordingly to fix
compile errors with ecdsa_p256 and RSA.
Signed-off-by: Brandon Allen <brandon.allen@exacttechnology.com>
Update CONFIG_ESP_SIMPLE_BOOT to exclude if CONFIG_MCUBOOT=y
Fix usage of the config according to actual definition.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Rework how flash is initialized in esp32 SoC.
"esp_flash_app_init()" will make sure proper cache handling
will be set in place.i
Fixes#77551
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Get console baudrate property from device tree to allow
proper configuration for 26 and 40 Mhz devices.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Remove all entries that as not being used.
This also update hal to re-enable warning flags
as such as -Wno-unused-variable.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The way ESP32 XIP works (with MMU and cache) does no fit the way Zephyr XIP
is implemented, causing issues related to included Zephyr linker files.
Flash code still resides in flash for execution, but MMU/Cache handles it
in such way that XIP might not (or should not) be used with current Zephyr
approach. To address this problem, XIP configuration option is being
removed from Espressif targets.
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
Currently, if the user wants to allocate heap on external RAM
he needs to enable CONFIG_ESP_SPIRAM and set a threshold defined
with CONFIG_ESP_HEAP_MIN_EXTRAM_THRESHOLD.
This approach requires that we re-implement `k_malloc` and allocate
the memory on the proper region based on the block size.
By using the shared multi heap feature the proccess of allocating
memory from external memory becomes more fluent and simple.
The attribute SMH_REG_ATTR_EXTERNAL was added to reference the
external memory.
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
ESP32 SoC has multiple revisions, some of which are not supported
by the current implementation, as such as REV0 and REV1. This PR
adds an option to indicate user that this is not recommended and not
supported.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add config file to host WiFi specific settings.
Introduce CONFIG_ESP_WIFI_MAX_THREAD_PRIO to be used
as a cap for the LL driver runtime.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Many xtensa target jump from soc code directly into cstart and depend on
architecture code being initialized in arch_kernel_init(). Instead of
jumping to cstart, jump to newly introduced prep_c similar to all other
architectures, where common platfotm initialization will happen.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
cplusplus-rom linker initialization was wrongly placed
in RAM area when it should be in ROM area.
Fixes#75853
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>