About data copy,the data is in custom section #76662
Unanswered
xyjdwxzxxbw
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
when i was running this test case,
zephyr\tests\application_development\code_relocation
I noticed this phenomenon:
__in_section(custom_section, static, var) uint32_t var_custom_data = 1U;
The initial value of this global variable should be 1,and the console print its address
Address of custom_section data placed using attributes 0x809ba8
but when i see the address,the value is not 1:
I looked at the initialization process of zephyr. When a variable is placed in a custom section, zephyr does not copy it. Does this cause the initial value of the variable to be lost?
in zephyr\kernel\xip.c
void z_data_copy(void)
,this function do the data copy work,Or maybe is there another place where the copying has been done that I don't see?
Beta Was this translation helpful? Give feedback.
All reactions