Skip to content

Assign symbols to specific memory regions in ld script#458

Open
vladyslavmarkovaccenture wants to merge 4 commits into
eclipse-openbsw:mainfrom
esrlabs:cr-294067
Open

Assign symbols to specific memory regions in ld script#458
vladyslavmarkovaccenture wants to merge 4 commits into
eclipse-openbsw:mainfrom
esrlabs:cr-294067

Conversation

@vladyslavmarkovaccenture

Copy link
Copy Markdown
Contributor

Assign symbols to specific memory regions in ld script

Change-Id: I7971a283f712c66695d976dc343eb749cb207698
Change-Id: I7ed597ca3fa125fcc703c1c14ece6f4eebc5bb4e
*(.data)
*(.data*)
/* Communication-related components */
*app.o(.data .data*)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same file list is now listed 7 times in this linker script, in different variants - hard to maintain.

Can this be factored out? E.g. via include construction, or macros? (Preprocessor would need to be employed explicitly, though.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately we need to reference units 7 times. I created a single source of truth file for hot memory. Macros are defined within linkerscript itself.

@rolandreichweinbmw

Copy link
Copy Markdown
Contributor

@vladyslavmarkovaccenture Can you please explain the background behind this change? Which problem it solves? Ideally, in the commit message and or documentation?

@vladyslavmarkovaccenture

vladyslavmarkovaccenture commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

@rolandreichweinbmw I will add another commit to this PR with changes to documentation. TL;DR functionally it's an expansion of usable memory. All new stuff will be put to SRAM_U by default, "hot" functionality is moved to SRAM_L. Previously SRAM_U was not used (except for 0x400 bytes allocated for NoInit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants