@@ -8,8 +8,45 @@ RFD41, but has evolved considerably since then.
8
8
9
9
# Learning
10
10
11
- We have some documentation in disjointed files in the ` doc/ ` directory. This
12
- file gives quick-start information.
11
+ Developer documentation is in Asciidoc in the ` doc/ ` directory. It gets rendered
12
+ via GitHub pages, and is available at https://oxidecomputer.github.io/hubris .
13
+
14
+ # Navigating
15
+
16
+ The repo is laid out as follows.
17
+
18
+ - ` app/ ` is where the top-level binary crates for applications live, e.g.
19
+ ` app/gimlet ` contains the firmware crate for Gimlet. Generally speaking, if
20
+ you want to build an image for something, look here.
21
+
22
+ - ` build/ ` contains the build system and supporting crates.
23
+
24
+ - ` doc/ ` contains developer documentation.
25
+
26
+ - ` drv/ ` contains drivers, a mix of simple driver lib crates and fully-fledged
27
+ server bin crates. Current convention is that ` drv/SYSTEM-DEVICE ` is the
28
+ driver for ` DEVICE ` on ` SYSTEM ` (where ` SYSTEM ` is usually an SoC name),
29
+ whereas ` drv/SYSTEM-DEVICE-server ` is the server bin crate.
30
+
31
+ - ` lib/ ` contains assorted utility libraries we've written. If you need to make
32
+ a reusable crate that doesn't fit into one of the other directories, it
33
+ probably belongs here.
34
+
35
+ - ` stage0/ ` is the bootloader/hypovisor, primarily for LPC55.
36
+
37
+ - ` support/ ` contains some interface and programming support files, like fake
38
+ certificates and programmer firmware images.
39
+
40
+ - ` sys/ ` contains the "system" bits of Hubris, namely the kernel (` sys/kern ` ),
41
+ the shared crate defining the ABI (` sys/abi ` ), and the user library used by
42
+ tasks (` sys/userlib ` ).
43
+
44
+ - ` task/ ` contains reusable tasks that aren't drivers. The distinction between
45
+ things that live in ` task ` vs in ` drv/something-server ` is fuzzy. Use your
46
+ judgement.
47
+
48
+ - ` test/ ` contains the test framework and binary crates for building it for
49
+ various boards.
13
50
14
51
# Developing
15
52
@@ -30,17 +67,20 @@ submodules, so they'll fail when run from a fork.)
30
67
31
68
You will need:
32
69
33
- - The nightly toolchain. (It will * probably* automatically install when you try
34
- to build, but people have had issues.)
70
+ - A ` rustup ` -based toolchain install. ` rustup ` will take care of automatically
71
+ installing our pinned toolchain version, and the cross-compilation targets,
72
+ when you first try to build.
35
73
36
- - ` openocd ` (mostly tested on 0.10) or (if using the LPC55)
37
- ` pyocd ` (0.27 or later). Note that the 0.10 release of OpenOCD predates the
38
- STLink v3. People are using various post-0.10 builds provided by system
39
- package managers. If you're going to use Homebrew on macOS to install
40
- OpenOCD, you need to use ` brew install --head openocd ` to build the tip of the
41
- main branch rather than using the latest binary release.
74
+ - ` openocd ` (ideally 0.11) or (if using the LPC55) ` pyocd ` (0.27 or later).
75
+ Note that the 0.10 release of OpenOCD predates the STLink v3. People are using
76
+ various post-0.10, pre-0.11 builds provided by system package managers, with
77
+ some success, but if your system isn't packaging 0.11 yet, pester them. If
78
+ you're going to use Homebrew on macOS to install OpenOCD, you need to use
79
+ ` brew install --head openocd ` to build the tip of the main branch rather than
80
+ using the latest binary release.
42
81
43
- - The appropriate Rust toolchain target installed:
82
+ - The appropriate Rust toolchain target installed (note: this should happen
83
+ automatically):
44
84
- ` rustup target add thumbv7em-none-eabihf ` (for the STM32)
45
85
- ` rustup target add thumbv8m.main-none-eabihf ` (for the LPC55)
46
86
@@ -488,4 +528,3 @@ This magic happens in three parts:
488
528
Note: most tasks pick up their ` build.rs ` behavior implicitly by depending on
489
529
` userlib ` . You generally do not need a ` build.rs ` in your task unless you need
490
530
to detect compiler/architecture features or depend on board rev.
491
-
0 commit comments