1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// The smallest whole program this repository can produce: boot on
// `rpi-hal`'s `rt`, bring up the UART, and say so.
//
// It exists to prove the parts of the build that have nothing to do with
// what the crate does -- that the toolchain, the target, `rpi-link.x` and
// the two load addresses are all wired up, and that an image built here
// runs on a board. Those are the things that break once and then stay
// broken, and a greeting is enough to see all of them.
//
// Build it for either architecture with `scripts/build-example.sh hello`
// or `scripts/build-example64.sh hello`.
use Write;
use ;
// This example takes no features, so the library it links against has no
// modules compiled into it and there is nothing here to call -- see
// `console.rs` for an example that uses one. Named anyway because a crate
// nothing refers to is never linked, and this crate is destined to
// install things by linkage the way `rpi-hal-embassy`'s time driver does.
// So this stays the image that proves the scaffolding on its own: if it
// boots, nothing about the toolchain, the targets or the linker script is
// what broke.
use rpi_kickstart as _;
// A library cannot supply this: a program may have exactly one, so it is
// the application's, and an example is an application. The console is the
// only place a bare-metal panic can go, so it is reinitialized here rather
// than shared -- whatever owned the UART is exactly what may have just
// panicked.
!
// `unsafe(no_mangle)` rather than the bare `no_mangle` `rpi-hal`'s own
// examples use: this crate is edition 2024, which requires the wrapper.
pub extern "C" !