File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
arch/arm/core/aarch32/cortex_m/mpu Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,11 @@ extern K_THREAD_STACK_DEFINE(z_main_stack, CONFIG_MAIN_STACK_SIZE);
5555uint32_t z_arm_mpu_stack_guard_and_fpu_adjust (struct k_thread * thread );
5656#endif
5757
58+ #if defined(CONFIG_CODE_DATA_RELOCATION_SRAM )
59+ extern char __sram_text_start [];
60+ extern char __sram_text_size [];
61+ #endif
62+
5863static const struct z_arm_mpu_partition static_regions [] = {
5964#if defined(CONFIG_COVERAGE_GCOV ) && defined (CONFIG_USERSPACE )
6065 {
@@ -82,6 +87,14 @@ static const struct z_arm_mpu_partition static_regions[] = {
8287 .attr = K_MEM_PARTITION_P_RX_U_RX ,
8388 },
8489#endif /* CONFIG_ARCH_HAS_RAMFUNC_SUPPORT */
90+ #if defined(CONFIG_CODE_DATA_RELOCATION_SRAM )
91+ {
92+ /* RAM area for relocated text */
93+ .start = (uint32_t )& __sram_text_start ,
94+ .size = (uint32_t )& __sram_text_size ,
95+ .attr = K_MEM_PARTITION_P_RX_U_RX ,
96+ },
97+ #endif /* CONFIG_CODE_DATA_RELOCATION_SRAM */
8598#if !defined (CONFIG_MULTITHREADING ) && defined (CONFIG_MPU_STACK_GUARD )
8699 /* Main stack MPU guard to detect overflow.
87100 * Note:
You can’t perform that action at this time.
0 commit comments