Skip to content

Linker script generation update #588

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 22 commits into from
Jun 18, 2025
Merged

Linker script generation update #588

merged 22 commits into from
Jun 18, 2025

Conversation

tact1m4n3
Copy link
Collaborator

@tact1m4n3 tact1m4n3 commented Jun 7, 2025

  • multiple modes for linker script generation
  • MemoryRegion update
  • concatenate linker files directly in the generate linker script tool
  • rp2xxx: use INSERT AFTER and INSERT BEFORE in linker scripts for additional sections
  • esp: auto-generate memory regions in linker scripts
  • esp: direct boot sections
  • use the new .ram_text section instead of .time_critical in rp2xxx and .trap in esp. This section should always be placed in ram.
  • rp2xxx: fix memory regions

@tact1m4n3 tact1m4n3 changed the title Linker script generation refactor Linker script generation update Jun 7, 2025
@tact1m4n3 tact1m4n3 force-pushed the linker_gen_update branch from d25bb20 to 5f0024a Compare June 10, 2025 10:44
@tact1m4n3 tact1m4n3 marked this pull request as ready for review June 11, 2025 06:48
@Grazfather
Copy link
Collaborator

Would be nice to have (even brief) documentation. design.md has a long-living TODO in there, maybe you can jot a few lines?

@tact1m4n3
Copy link
Collaborator Author

Would be nice to have (even brief) documentation. design.md has a long-living TODO in there, maybe you can jot a few lines?

Certainly. Also let's wait a bit on this PR. I've got to fix microzig_time_critical. I want to remove it from the automatically generated linker script as some chips have different memory regions mapped for code and data in ram. Also something similar I think happens for rodata (which I placed in flash by default 😭).

@tact1m4n3 tact1m4n3 marked this pull request as draft June 11, 2025 13:40
@tact1m4n3 tact1m4n3 marked this pull request as ready for review June 14, 2025 16:18
@tact1m4n3
Copy link
Collaborator Author

Would be nice to have (even brief) documentation. design.md has a long-living TODO in there, maybe you can jot a few lines?

I added a brief insight into the system. Let me know what you think of it :)

Copy link
Contributor

@mattnite mattnite left a comment

Choose a reason for hiding this comment

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

Really great work, love the rwx decls. You should consider adding to the dev log!

@tact1m4n3
Copy link
Collaborator Author

You should consider adding to the dev log!

Are you referring to just use what I added in design.md? Or should I write something custom? Or a bit of both? :)

@mattnite
Copy link
Contributor

@tact1m4n3 feel free to make it different but I say what you have there could be copy pasted, it's the perfect length!

@tact1m4n3
Copy link
Collaborator Author

Great! I'll add it then

@mattnite mattnite merged commit dd8544d into main Jun 18, 2025
44 checks passed
@mattnite mattnite deleted the linker_gen_update branch June 18, 2025 15:14
Copper280z pushed a commit to Copper280z/microzig that referenced this pull request Jun 23, 2025
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.

3 participants