Skip to content

Commit d7c0c07

Browse files
authored
Merge pull request #29 from Neotron-Compute/support_rev100
Support Neotron Pico v1.0.0
2 parents cb1ab44 + 3f2444e commit d7c0c07

14 files changed

+150
-123
lines changed

.github/workflows/build_and_release.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,11 @@ jobs:
1919
- name: Install flip-link
2020
run: cd / && cargo install --debug flip-link
2121

22-
- name: Build neotron-bmc-pico for F030
23-
run: |
24-
cd neotron-bmc-pico
25-
cargo build --release --verbose --target=thumbv6m-none-eabi --features=stm32f030x6
26-
cd target/thumbv6m-none-eabi/release
27-
mv neotron-bmc-pico neotron-bmc-pico-f030
28-
29-
- name: Build neotron-bmc-pico for F031
30-
run: |
31-
cd neotron-bmc-pico
32-
cargo build --release --verbose --target=thumbv6m-none-eabi --features=stm32f031
33-
cd target/thumbv6m-none-eabi/release
34-
mv neotron-bmc-pico neotron-bmc-pico-f031
22+
- name: Build neotron-bmc-pico
23+
run: cd neotron-bmc-pico && DEFMT_LOG=info cargo build --release --verbose --target=thumbv6m-none-eabi
3524

3625
- name: Build neotron-bmc-nucleo
37-
run: |
38-
cd neotron-bmc-nucleo
39-
cargo build --release --verbose --target=thumbv7em-none-eabihf
26+
run: cd neotron-bmc-nucleo && DEFMT_LOG=info cargo build --release --verbose --target=thumbv7em-none-eabihf
4027

4128
- name: Get Branch Name
4229
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The NBMC appears to the main Neotron system processor as an Expansion Device. As
2222

2323
### Neotron Pico
2424

25-
The NBMC firmware is designed to run on an ST Micro STM32F0 (STM32F031K6T6) microcontroller, as fitted to a [Neotron Pico](https://github.com/neotron-compute/neotron-pico).
25+
The NBMC firmware is designed to run on an ST Micro STM32F0 (STM32F030K6T6) microcontroller, as fitted to a [Neotron Pico](https://github.com/neotron-compute/neotron-pico).
2626

2727
See the [board-specific README](./neotron-bmc-pico/README.md)
2828

Binary file not shown.
-909 KB
Binary file not shown.

neotron-bmc-nucleo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This folder is for the Board Management Controller (BMC) when running on an STM3
66

77
## Hardware Interface
88

9-
The NBMC also supports running on an ST Nucleo-F401RE, for development and debugging purposes. The STM32F401RET6U MCU has:
9+
This firmware runs on an ST Nucleo-F401RE, for development and debugging purposes. The STM32F401RET6U MCU has:
1010

1111
* 32-bit Arm Cortex-M4 Core
1212
* 3.3V I/O (5V tolerant)

neotron-bmc-nucleo/src/main.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1+
//! Neotron BMC Firmware
2+
//!
3+
//! This is the firmware for the Neotron Board Management Controller (BMC). It
4+
//! controls the power, reset, UART and PS/2 ports, but running on an ST Nucleo
5+
//! instead of a real Neotron board. For more details, see the `README.md` file.
6+
//!
7+
//! # Licence
8+
//! This source code as a whole is licensed under the GPL v3. Third-party crates
9+
//! are covered by their respective licences.
10+
111
#![no_main]
212
#![no_std]
313

4-
///! Neotron BMC Firmware
5-
///!
6-
///! This is the firmware for the Neotron Board Management Controller (BMC). It controls the power, reset, UART and PS/2 ports on a Neotron mainboard.
7-
///! For more details, see the `README.md` file.
8-
///!
9-
///! # Licence
10-
///! This source code as a whole is licensed under the GPL v3. Third-party crates are covered by their respective licences.
1114
use cortex_m::interrupt::free as disable_interrupts;
1215
use heapless::spsc::{Consumer, Producer, Queue};
1316
use rtic::app;

neotron-bmc-pico/.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
2-
runner = "probe-run --chip STM32F031K6Tx"
2+
runner = "probe-run --chip STM32F030K6Tx"
33
rustflags = [
44
"-C", "linker=flip-link",
55
"-C", "link-arg=-Tlink.x",

neotron-bmc-pico/Cargo.toml

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ edition = "2018"
55
version = "0.3.0"
66

77
[dependencies]
8-
defmt = "0.3"
98
cortex-m = { version = "0.7.5", features = ["inline-asm"] }
10-
defmt-rtt = "0.3"
119
cortex-m-rtic = "1.0"
12-
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
13-
stm32f0xx-hal = { version = "0.18", features = ["rt"] }
1410
debouncr = "0.2"
11+
defmt = "0.3"
12+
defmt-rtt = "0.3"
1513
heapless= "0.7"
16-
systick-monotonic = "1.0.0"
14+
panic-probe = { version = "0.3", features = ["print-defmt"] }
15+
stm32f0xx-hal = { version = "0.17", features = ["stm32f030x6", "rt"] }
16+
systick-monotonic = "1.0"
1717

1818
[features]
1919
# set logging levels here
@@ -36,44 +36,36 @@ defmt-error = []
3636
[profile.dev]
3737
codegen-units = 1
3838
debug = 2
39-
debug-assertions = true # <-
39+
debug-assertions = true
4040
incremental = false
41-
opt-level = 3 # <-
42-
overflow-checks = true # <-
41+
opt-level = 3
42+
overflow-checks = true
4343

4444
# cargo test
4545
[profile.test]
4646
codegen-units = 1
4747
debug = 2
48-
debug-assertions = true # <-
48+
debug-assertions = true
4949
incremental = false
50-
opt-level = 3 # <-
51-
overflow-checks = true # <-
50+
opt-level = 3
51+
overflow-checks = true
5252

5353
# cargo build/run --release
5454
[profile.release]
5555
codegen-units = 1
5656
debug = 2
57-
debug-assertions = false # <-
57+
debug-assertions = false
5858
incremental = false
5959
lto = 'fat'
60-
opt-level = 3 # <-
61-
overflow-checks = false # <-
60+
opt-level = 3
61+
overflow-checks = false
6262

6363
# cargo test --release
6464
[profile.bench]
6565
codegen-units = 1
6666
debug = 2
67-
debug-assertions = false # <-
67+
debug-assertions = false
6868
incremental = false
6969
lto = 'fat'
70-
opt-level = 3 # <-
71-
overflow-checks = false # <-
72-
73-
# uncomment this to switch from the crates.io version of defmt to its git version
74-
# check app-template's README for instructions
75-
# [patch.crates-io]
76-
# defmt = { git = "https://github.com/knurling-rs/defmt", rev = "use defmt version reported by `probe-run --version`" }
77-
# defmt-rtt = { git = "https://github.com/knurling-rs/defmt", rev = "use defmt version reported by `probe-run --version`" }
78-
# defmt-test = { git = "https://github.com/knurling-rs/defmt", rev = "use defmt version reported by `probe-run --version`" }
79-
# panic-probe = { git = "https://github.com/knurling-rs/defmt", rev = "use defmt version reported by `probe-run --version`" }
70+
opt-level = 3
71+
overflow-checks = false

0 commit comments

Comments
 (0)