Commit Graph

4 Commits

Author SHA1 Message Date
Guillaume Souchere
b5bacffbd3 esp_hw_support: allow writing in IRAM when CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT is not set for esp32C2
when CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT is not set, the PMP rule for esp32c2 shoud allow write access.
Fix esp_cpu_configure_region_protection() in cpu.c accordingly.
2023-01-02 08:41:16 +01:00
Guillaume Souchere
4d16f46a88 esp_system: fix placement of __stack_chk_fail from flash to RAM
When stack check is enabled, certain functions (sometimes placed in RAM)
are being decorated with stack guards and a call to __stask_chk_fail() in
case ofr stack corruption. For this reason, __stack_chk_fail() must be
placed in RAM too.

Add stack check config in heap tests on all targets to find eventual flash to RAM
calls due to stack checks when running callgraph_check.py
2022-12-07 08:49:12 +01:00
Guillaume Souchere
0376e6ec79 heap: add check for usage of flash content from iram
this commits:
- adds build-time test to check that no call to flash regions are done from IRAM functions

- resolves problems related to IRAM function using content in flash memory

- update heap_caps_alloc_failed to use a default function name in DRAM
  when necessary instead of creating a function name variable in DRAM for
  each call of heap_caps_alloc_failed. This allows to save some extra bytes
  in RAM.
2022-11-24 10:31:14 +01:00
Guillaume Souchere
405c26da6d heap: migrate unit tests to pytest 2022-09-23 09:49:07 +02:00