Skip to content

Commit

Permalink
Allow kernel to be built with stable toolchain.
Browse files Browse the repository at this point in the history
The only nightly feature still used in the kernel is `#[naked]` on
functions. This can be replaced with careful use of `global_asm!` to
create functions in pure assembly language.

With this change, the kernel builds and works on stable 1.82.0 using my
out-of-tree build system.
  • Loading branch information
cbiffle committed Nov 20, 2024
1 parent a842b3c commit 134b7d7
Show file tree
Hide file tree
Showing 3 changed files with 354 additions and 383 deletions.
6 changes: 4 additions & 2 deletions build/kernel-link.x
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,14 @@ SECTIONS
*(.PreResetTrampoline);
*(.Reset);

*(.text .text.*);

/* The HardFaultTrampoline uses the `b` instruction to enter `HardFault`,
so must be placed close to it. */
*(.HardFaultTrampoline);
*(.HardFault.*);
*(.text.HardFault.*);

*(.text .text.*);

. = ALIGN(4);
__etext = .;
} > FLASH
Expand Down
Loading

0 comments on commit 134b7d7

Please sign in to comment.