Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ target

Cargo.lock
!cli/Cargo.lock
!examples/**/Cargo.lock

# mdbook output
/book
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Fixed

- `tinyboot-ch32-rt` (0.4.1): trim `link.x` to drop unused vector-table / exception / trap KEEPs the bootloader never produces. Boot binaries are now tolerant of downstream PACs (e.g. `ch32-metapac` with the `rt` feature) emitting `__EXTERNAL_INTERRUPTS` under cargo feature unification — `--gc-sections` drops the unreferenced static. Bootloader flash size is unchanged.

## [0.4.1] - 2026-05-07

### Added
Expand Down
2 changes: 1 addition & 1 deletion ch32/rt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tinyboot-ch32-rt"
description = "Minimal tinyboot runtime for CH32"
version = "0.4.0"
version = "0.4.1"
edition.workspace = true
repository.workspace = true
license.workspace = true
Expand Down
28 changes: 3 additions & 25 deletions ch32/rt/link.x
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,30 @@ ENTRY(_start);

SECTIONS
{
.vector_table ORIGIN(CODE) :
.text ORIGIN(CODE) :
{
KEEP(*(SORT_NONE(.init)));
. = ALIGN(4);
KEEP(*(.vector_table.core_interrupts));
KEEP(*(.vector_table.external_interrupts));
KEEP(*(.vector_table.exceptions));
*(.trap .trap.rust);
} > CODE AT> BOOT

.text : ALIGN(4)
{
KEEP(*(SORT_NONE(.handle_reset)));
*(.init.rust);
*(.text .text.*);
} > CODE AT> BOOT

.rodata : ALIGN(4)
{
*(.srodata .srodata.*);
*(.rodata .rodata.*);
*(.srodata .srodata.* .rodata .rodata.*);
. = ALIGN(4);
} > CODE AT> BOOT

.data : ALIGN(4)
{
_sidata = LOADADDR(.data);
_sdata = .;
PROVIDE(__global_pointer$ = . + 0x800);
*(.sdata .sdata.* .sdata2 .sdata2.*);
*(.data .data.*);
*(.sdata .sdata.* .sdata2 .sdata2.* .data .data.*);
. = ALIGN(4);
_edata = .;
} > RAM AT> BOOT

.bss (NOLOAD) : ALIGN(4)
{
_sbss = .;
*(.sbss .sbss.* .bss .bss.*);
. = ALIGN(4);
_ebss = .;
} > RAM

.uninit (NOLOAD) : ALIGN(4)
{
*(.uninit .uninit.*);
} > RAM

_stack_top = ORIGIN(RAM) + LENGTH(RAM);
Expand Down
Loading