Skip to content

linker: device_state : add alignment setting #86871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025

Conversation

hakehuang
Copy link
Collaborator

@hakehuang hakehuang commented Mar 10, 2025

the device_state need realocate when boot as second core.
as the relocation does not know the alignment, this could
be a case that the next data is mis-place after relocation.

fix this by add a alignment in device_state section.

still need revert aec0355
reported in #86871

fixes: #82841

@hakehuang hakehuang requested a review from dleach02 March 10, 2025 13:20
hakehuang added a commit to nxp-upstream/zephyr that referenced this pull request Mar 10, 2025
the device_state need realocate when boot as second core.
as the relocation does not know the alignment, this could
be a case that the next data is mis-place after relocation.

fix this by add a alignment in device_state section.

still need revert aec0355
reported in zephyrproject-rtos#86871

fixes: zephyrproject-rtos#82841

Signed-off-by: Hake Huang <[email protected]>
@hakehuang
Copy link
Collaborator Author

see the linker error in map file
image

@hakehuang
Copy link
Collaborator Author

@dcpleung @nashif please take a look.

Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label May 12, 2025
@hakehuang hakehuang removed the Stale label May 12, 2025
the device_state need realocate when boot as second core.
as the relocation does not know the alignment, this could
be a case that the next data is mis-place after relocation.

fix this by add a alignment in device_state section.

still need revert aec0355
reported in zephyrproject-rtos#86871

fixes: zephyrproject-rtos#82841

Signed-off-by: Hake Huang <[email protected]>
Copy link

@nashif nashif merged commit 8e2c053 into zephyrproject-rtos:main May 30, 2025
30 checks passed
Shreyas-Shankar155 pushed a commit to MihiraMadhava/zephyr that referenced this pull request Jun 3, 2025
the device_state need realocate when boot as second core.
as the relocation does not know the alignment, this could
be a case that the next data is mis-place after relocation.

fix this by add a alignment in device_state section.

still need revert aec0355
reported in zephyrproject-rtos#86871

fixes: zephyrproject-rtos#82841

Signed-off-by: Hake Huang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests: mimxrt1160_evk/mimxrt1166/cm7:samples/drivers/mbox_data/sample: drivers: mbox_data test Timeout
5 participants