Skip to content

Commit 3fd0da5

Browse files
committed
Merge branch 'release/v0.4.0'
2 parents 987cbab + af2cec4 commit 3fd0da5

File tree

15 files changed

+3786
-254
lines changed

15 files changed

+3786
-254
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,55 +8,30 @@ env:
88
jobs:
99
build:
1010
runs-on: ubuntu-latest
11-
continue-on-error: ${{ matrix.experimental || false }}
12-
strategy:
13-
matrix:
14-
# All code should be running on stable now
15-
rust: [nightly, stable]
16-
include:
17-
# Nightly is only for reference and allowed to fail
18-
- rust: nightly
19-
experimental: true
2011
steps:
2112
- name: Checkout Code
2213
uses: actions/checkout@v3
2314
with:
2415
submodules: true
16+
fetch-depth: 0
2517

2618
- name: Install Rust
2719
uses: actions-rs/toolchain@v1
2820
with:
2921
profile: minimal
30-
toolchain: ${{ matrix.rust }}
22+
toolchain: stable
3123
override: true
3224
target: thumbv6m-none-eabi
3325

3426
- name: Build Code
35-
run: cargo build --release --verbose
36-
37-
- name: Get Branch Name
38-
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
39-
id: branch_name
4027
run: |
41-
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
42-
43-
- name: Create Release
44-
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
45-
id: create_release
46-
uses: actions/create-release@v1
47-
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
with:
50-
tag_name: ${{ github.ref }}
51-
release_name: Release ${{ steps.branch_name.outputs.SOURCE_TAG }}
52-
draft: false
53-
prerelease: false
28+
cargo build --release --verbose
5429
5530
- name: Upload files to Release
5631
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
5732
uses: softprops/action-gh-release@v1
5833
with:
5934
files: |
60-
target/thumbv6m-none-eabi/release/neotron-pico
35+
./target/thumbv6m-none-eabi/release/neotron-pico-bios
6136
env:
6237
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/clippy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111
steps:
1212
- name: Checkout Code
1313
uses: actions/checkout@v3
14+
with:
15+
submodules: true
16+
fetch-depth: 0
1417

1518
- name: Install Rust
1619
uses: actions-rs/toolchain@v1

.github/workflows/format.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ jobs:
88
steps:
99
- name: Checkout Code
1010
uses: actions/checkout@v3
11+
with:
12+
submodules: true
13+
fetch-depth: 0
1114

1215
- name: Install Rust
1316
uses: actions-rs/toolchain@v1

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// List of extensions which should be recommended for users of this workspace.
66
"recommendations": [
7-
"rust-lang.rust",
7+
"rust-lang.rust-analyzer",
88
"marus25.cortex-debug",
99
],
1010
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
* None
66

7+
## v0.4.0 ([Source](https://github.com/neotron-compute/neotron-pico-bios/tree/v0.4.0) | [Release](https://github.com/neotron-compute/neotron-pico-bios/release/tag/v0.4.0))
8+
9+
* Updated dependencies
10+
* Basic keyboard support by talking to BMC
11+
* Revised how version string is generated
12+
* Includes Neotron OS 0.2.0
13+
714
## v0.3.0 ([Source](https://github.com/neotron-compute/neotron-pico-bios/tree/v0.3.0) | [Release](https://github.com/neotron-compute/neotron-pico-bios/release/tag/v0.3.0))
815

916
* Boots OS 0.1.0

Cargo.toml

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,49 +5,41 @@ resolver = "2"
55
readme = "README.md"
66
license = "GPL-3.0-or-later"
77
name = "neotron-pico-bios"
8-
version = "0.3.0"
8+
version = "0.4.0"
99

1010
[dependencies]
1111
# Useful Cortex-M specific functions (e.g. SysTick)
1212
cortex-m = "0.7"
1313
# The Raspberry Pi Pico HAL
14-
rp-pico = "0.3"
14+
rp-pico = "0.5"
1515
# Cortex-M run-time (or start-up) code
1616
cortex-m-rt = "0.7"
1717
# The BIOS to OS API
18-
neotron-common-bios = "0.1.0"
19-
# For time keeping/handling
20-
embedded-time = "0.12"
18+
neotron-common-bios = "0.7.0"
2119
# For the RP2040 bootloader
2220
rp2040-boot2 = "0.2"
2321
# For hardware abstraction traits
2422
embedded-hal ="0.2"
2523
# Gives us formatted PC-side logging
2624
defmt = "0.3"
2725
# Sends defmt logs to the SWD debugger
28-
defmt-rtt = "0.3"
26+
defmt-rtt = "0.4"
2927
# Send panics to the debugger
3028
panic-probe = "0.2"
3129
# RP2040 PIO assembler
3230
pio = "0.2"
3331
# Macros for RP2040 PIO assembler
3432
pio-proc = "0.2"
35-
36-
[features]
37-
default = [
38-
"defmt-default",
39-
]
40-
defmt-default = []
41-
# Enables trace logs
42-
defmt-trace = []
43-
# Enables debug logs
44-
defmt-debug = []
45-
# Enables info logs
46-
defmt-info = []
47-
# Enables warn logs
48-
defmt-warn = []
49-
# Enables error logs
50-
defmt-error = []
33+
# Hardware locks for sharing data with interrupts
34+
critical-section = "1.0"
35+
# Protocol for talking to a Neotron BMC. The tag is for the repo as a whole, of which the protocol crate is a small part.
36+
neotron-bmc-protocol = { version = "0.1.0", git = "https://github.com/neotron-compute/neotron-bmc", tag="v0.4.0" }
37+
# Time and frequency related functions
38+
fugit = "0.3"
39+
# PS/2 scancode decoding
40+
pc-keyboard = "0.6"
41+
# Useful queues and other structures
42+
heapless = "0.7"
5143

5244
[[bin]]
5345
name = "neotron-pico-bios"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ user@host ~ $ cargo install probe-rs
6060
We use the "neotron-os-pico.ld" linker script to link it at `0x1002_0000`.
6161

6262
```console
63-
user@host ~/neotron-os $ cargo build --release
64-
user@host ~/neotron-os $ arm-none-eabi-objcopy -O binary ./target/thumbv6m-none-eabi/release/flash1002 ../neotron-pico-bios/src/flash1002.bin
63+
user@host ~/neotron-os $ cargo build --bin=flash1002 --release --target=thumbv6m-none-eabi
64+
user@host ~/neotron-os $ arm-none-eabi-objcopy -O binary ./target/thumbv6m-none-eabi/release/flash1002 ../neotron-pico-bios/src/thumbv6m-none-eabi-flash1002-libneotron_os.bin
6565
```
6666

6767
6. Build and load the Neotron BIOS, and view the debug output stream, with `cargo run --release`:

build.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@ fn main() {
2929
// `memory.x` is changed.
3030
println!("cargo:rerun-if-changed=memory.x");
3131

32-
// Get git version
33-
if let Ok(cmd_output) = std::process::Command::new("git")
34-
.arg("describe")
35-
.arg("--all")
36-
.arg("--dirty")
37-
.arg("--long")
32+
// Generate a file containing the firmware version
33+
let version_output = std::process::Command::new("git")
34+
.current_dir(env::var_os("CARGO_MANIFEST_DIR").unwrap())
35+
.args(["describe", "--long", "--dirty"])
3836
.output()
39-
{
40-
let git_version = std::str::from_utf8(&cmd_output.stdout).unwrap();
41-
println!(
42-
"cargo:rustc-env=BIOS_VERSION={} (git:{})",
43-
env!("CARGO_PKG_VERSION"),
44-
git_version.trim()
45-
);
46-
} else {
47-
println!("cargo:rustc-env=BIOS_VERSION={}", env!("CARGO_PKG_VERSION"));
48-
}
37+
.expect("running git-describe");
38+
assert!(version_output.status.success());
39+
40+
// Remove the trailing newline
41+
let mut output = version_output.stdout;
42+
output.pop();
43+
44+
// Add a null
45+
output.push(0);
46+
47+
// Write the file
48+
std::fs::write(out.join("version.txt"), output).expect("writing version file");
4949
}

src/flash1002.bin

-18.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)