Skip to content

Feat/improve linker scripts#640

Open
FoniksFox wants to merge 18 commits into
developmentfrom
feat/Improve-Linker-Scripts
Open

Feat/improve linker scripts#640
FoniksFox wants to merge 18 commits into
developmentfrom
feat/Improve-Linker-Scripts

Conversation

@FoniksFox
Copy link
Copy Markdown
Contributor

@FoniksFox FoniksFox commented May 4, 2026

Closes #625
Closes #653

A refactor of the Linker Script, Startup Code and System.c

Check the corresponding pr in the template-project to see the changes needed to make it work.

It implementes:

  • Initialized data sections for all memory domains with a copy table, so that ResetHandler can generally copy all data defined in the table.
  • A Linker Script with configurable ITCM memory via macros (C preprocessor) and the possibility to add all code to ITCM.
  • ISR vector always copied to ITCM.
  • Implement DTCM constants.
  • weak BoardInit function that gets called after SystemInit, but before global constructors

Not implemented left as a weak definition so that users can implement their own version):

  • Configuration checker (a function to check whether the provided ITCM size matches the defined size, and whatever other configuration that's deemed as necessary)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

ST-LIB Release Plan

  • Current version: 6.1.2
  • Pending changesets: 1
  • Highest requested bump: major
  • Next version if merged now: 7.0.0

Pending changes

  • major Refactor linker script, startup code, and memory model with unified copy/zero tables, configurable ITCM, and weak BoardInit (.changesets/refactor-linker-script.md)

@FoniksFox FoniksFox marked this pull request as ready for review June 1, 2026 22:10
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.

The linker rejects objects of different types in the same section - DX sections RAM.ld doesn't work

1 participant