[ZEPHYR]: make a pre-configured stack link section
On targets with low default RAM section (<400K), but with more RAM avaialble (typically DTCM, ITCM ...), it may be mandatory to link the heap and stacks into a specific section (MBEDTLS HEAP is somehow 64K)
Create a configuration (string) value CONFIG_SOPC_ALLOC_SECTION
and use something like
#define DTCM_STACK_DEFINE(sym, size) Z_KERNEL_STACK_DEFINE_IN(sym, size, CONFIG_SOPC_ALLOC_SECTION);
Use __kstackmem
as default value for retro-compatibility.
The possible values are given in #include <zephyr/linker/section_tags.h>
Moreover, remove the instrumentations that are natively provided by Zephyr (CONFIG_SOPC_HELPER_IMPL_INSTRUM
mostly covered by CONFIG_INIT_STACKS
, CONFIG_THREAD_STACK_INFO
, CONFIG_THREAD_MONITOR
, CONFIG_THREAD_RUNTIME_STATS
, CONFIG_SCHED_THREAD_USAGE_ANALYSIS
See also #1195 (closed)
Edited by Jérémie Chabod