Skip to content
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

Enable 'unwind_tables' for all platforms (for #370) #373

Merged
merged 1 commit into from
Feb 2, 2025

Conversation

marnix
Copy link
Contributor

@marnix marnix commented Feb 1, 2025

For ARM-based embedded firmware this requires
explicit declaration of ARM.extab sections in linker.d, otherwise the exception tables can incorrectly end up in RAM. (See ziglang/zig#22685.)

(The .unwind_tables = true line must be removed for Zig 0.14, which already has this enabled for basically all platforms.)

Implements part of #370 already on Zig 0.13.0.

For ARM-based embedded firmware this requires
explicit declaration of `ARM.extab` sections in linker.d,
otherwise the exception tables can incorrectly end up in RAM.
(See ziglang/zig#22685.)
@marnix marnix changed the title Enable 'unwind_tables' for all platforms Enable 'unwind_tables' for all platforms (for #370) Feb 1, 2025
@mattnite mattnite merged commit 5385b0e into ZigEmbeddedGroup:main Feb 2, 2025
30 checks passed
@ghostiam
Copy link

Hello, this commit breaks the build for RISC-V, resulting in a 400MB firmware file for the CH32V003. The only workaround is to override with:

<firmware>.artifact.root_module.unwind_tables = false

Could you please fix this issue or add this override to the RISC-V example file so that others don’t have to deal with this problem?

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