Skip to content

fix: missing .uninit (NOLOAD) section causes ~500MB binary output with wlink#19

Open
aq1018 wants to merge 1 commit intoch32-rs:mainfrom
OpenServoCore:fix/uninit-section
Open

fix: missing .uninit (NOLOAD) section causes ~500MB binary output with wlink#19
aq1018 wants to merge 1 commit intoch32-rs:mainfrom
OpenServoCore:fix/uninit-section

Conversation

@aq1018
Copy link
Copy Markdown

@aq1018 aq1018 commented Apr 13, 2026

When I used defmt-rtt with qingke-rt and flash with wlink, it produces a ~500MB binary that failed to flash.

Turns out defmt-rtt places its RTT buffer in .uninit.* sections and expects them to be NOLOAD. Since qingke-rt's linker scripts don't define a .uninit section, the linker places these symbols in a default loadable segment with a RAM VMA (0x20000000+). wlink interprets the RAM VMA as a flash offset, so the output binary spans from 0x00000000 to 0x20000xxx.

This PR adds a .uninit (NOLOAD) section after .bss in both link-highcode.x and link-no-highcode.x, matching what cortex-m-rt does.

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.

1 participant