Skip to content

Commit 3191ee9

Browse files
committed
temphack: using __k_condvar_area_end instead of __data_end
Temphack until section groups has been implemented. Section groups will allow a developer to setup a group of sections that belongs together in such a way that they should form a continous area in code or memory, and where the start and end of such group should have known linker symbols defined. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
1 parent d017959 commit 3191ee9

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

include/linker/common-ram.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@
9393
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_queue, 4)
9494
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_condvar, 4)
9595

96+
__k_condvar_area_end = .;
97+
9698
SECTION_DATA_PROLOGUE(_net_buf_pool_area,,SUBALIGN(4))
9799
{
98100
_net_buf_pool_list = .;

include/linker/linker-defs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ extern char __bss_end[];
178178
extern char __data_load_start[];
179179
extern char __data_start[];
180180
extern char __data_end[];
181+
extern char __k_condvar_area_end[];
181182
#endif /* CONFIG_XIP */
182183

183184
#ifdef CONFIG_MMU

kernel/xip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extern volatile uintptr_t __stack_chk_guard;
2626
void z_data_copy(void)
2727
{
2828
(void)memcpy(&__data_start, &__data_load_start,
29-
__data_end - __data_start);
29+
__k_condvar_area_end - __data_start);
3030
#ifdef CONFIG_ARCH_HAS_RAMFUNC_SUPPORT
3131
(void)memcpy(&__ramfunc_start, &__ramfunc_load_start,
3232
(uintptr_t) &__ramfunc_size);

0 commit comments

Comments
 (0)