Skip to content

Commit fe16ced

Browse files
committed
Update instructions
1 parent 2526462 commit fe16ced

File tree

3 files changed

+29
-16
lines changed

3 files changed

+29
-16
lines changed

.github/workflows/rust.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,37 @@ jobs:
1919
- uses: actions/upload-artifact@v4
2020
if: ${{success()}}
2121
with:
22-
name: ${{ matrix.target }}-${{ matrix.start_address }}-binaries
22+
name: ${{ matrix.target }}-${{ matrix.start_address }}-binary
2323
if-no-files-found: error
2424
path: |
2525
./target/${{ matrix.target }}/release/neotron-os
2626
./target/${{ matrix.target }}/release/neotron-os.bin
2727
./target/${{ matrix.target }}/release/romfs.bin
28-
linux-libraries:
28+
linux-library:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- uses: actions/checkout@v4
3232
with:
3333
submodules: true
34-
- run: cargo nbuild libraries
34+
- run: cargo nbuild library
3535
- uses: actions/upload-artifact@v4
3636
if: ${{success()}}
3737
with:
38-
name: linux-libraries
38+
name: linux-library
3939
if-no-files-found: error
4040
path: |
4141
./target/release/libneotron_os.so
42-
windows-libraries:
42+
windows-library:
4343
runs-on: windows-latest
4444
steps:
4545
- uses: actions/checkout@v4
4646
with:
4747
submodules: true
48-
- run: cargo nbuild libraries
48+
- run: cargo nbuild library
4949
- uses: actions/upload-artifact@v4
5050
if: ${{success()}}
5151
with:
52-
name: windows-libraries
52+
name: windows-library
5353
if-no-files-found: error
5454
path: |
5555
./target/release/neotron_os.dll
@@ -62,7 +62,7 @@ jobs:
6262
- run: cargo nbuild test
6363
release:
6464
runs-on: ubuntu-latest
65-
needs: [binaries, linux-libraries, windows-libraries, run-tests]
65+
needs: [binaries, linux-library, windows-library, run-tests]
6666
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
6767
steps:
6868
- run: mkdir ./release

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,30 @@ Your board will need an appropriate Neotron BIOS installed, and you need to have
3737
OpenOCD or some other programming tool running for your particular board. See
3838
your BIOS instructions for more details.
3939

40-
Building Neotron OS is handled by the `nbuild` tool, in this repository.
40+
Building Neotron OS is handled by the `nbuild` tool, in this repository. Run `cargo nbuild help` for more information.
4141

42-
Run `cargo nbuild help` for more information.
42+
To make an image for a board like the Neotron Pico, you want to run `cargo nbuild binary`. By default this will produce a `thumbv6m-none-eabi` image linked to run at address `0x1002_0000`, with a ROMFS containing various utilities, which is what you need on a Neotron Pico. Your BIOS should tell you if you need to change these options, and how to load the resulting image onto your system.
4343

44-
Your BIOS should tell you which options to pass, and how to load the resulting image onto your system.
44+
```console
45+
$ cargo nbuild binary
46+
...
47+
$ ls ./target/thumbv6m-none-eabi/release
48+
build/ examples/ flames.d libflames.d libneotron_os.d neotron-os neotron-os.d
49+
deps/ flames incremental/ libflames.rlib libneotron_os.rlib neotron-os.bin romfs.bin
50+
```
51+
52+
Here:
53+
54+
* `romfs.bin` is the raw ROMFS image
55+
* `neotron-os` is an ELF file containing the OS and the ROMFS image
56+
* `neotron-os.bin` is an raw binary copy of the contents of the ELF file
4557

46-
Programs in the ROMFS can be loaded with:
58+
When the OS is running, programs in the ROMFS can be loaded with:
4759

4860
```text
4961
> rom
50-
flames.elf (14212 bytes)
51-
> rom flames.elf
62+
flames (14212 bytes)
63+
> rom flames
5264
Loading 4256 bytes to 0x20001000
5365
Loading 532 bytes to 0x200020a0
5466
Loading 4908 bytes to 0x200022b4
@@ -62,6 +74,7 @@ You can also build a *shared object* to load into a Windows/Linux/macOS applicat
6274

6375
```console
6476
$ cargo nbuild library
77+
...
6578
$ ls ./target/debug/*.so
6679
./target/debug/libneotron_os.so
6780
```

nbuild/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ enum Commands {
1414
target: String,
1515
},
1616
/// Builds the OS as a library, for the native machine
17-
Libraries {
17+
Library {
1818
/// The target we're building Neotron OS for
1919
#[clap(long)]
2020
target: Option<String>,
@@ -82,7 +82,7 @@ fn main() {
8282
}) => {
8383
binary(&packages, &start_address, &target);
8484
}
85-
Some(Commands::Libraries { target }) => library(&packages, target.as_deref()),
85+
Some(Commands::Library { target }) => library(&packages, target.as_deref()),
8686
Some(Commands::Format { check }) => format(&packages, check),
8787
Some(Commands::Clippy) => clippy(&packages),
8888
Some(Commands::Test) => test(&packages),

0 commit comments

Comments
 (0)