Skip to content

Commit a4785c6

Browse files
Implement remote reboot.
Also fixes the issues around Core 0 restarting but Core 1 and DMA and everything else remaining running. We do this using the watchdog scratch registers. Also cleans up the stack painting code and moves some functions around so they are all together.
1 parent ac52081 commit a4785c6

4 files changed

Lines changed: 314 additions & 224 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,26 @@ The Neotron BIOS uses the [defmt](https://crates.io/crates/defmt) crate to provi
9494
cargo install probe-run
9595
```
9696

97-
5. Power on your Neotron Pico by applying 12V and pressing the On/Off button.
98-
99-
6. Build the Neotron OS:
97+
5. Build the Neotron OS:
10098
We use the "neotron-flash-1002.ld" linker script to link it at `0x1002_0000`.
10199

102100
```console
103101
user@host ~/neotron-os $ cargo build --bin=flash1002 --release --target=thumbv6m-none-eabi
104102
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
105103
```
106104

107-
7. Build and load the Neotron BIOS, and view the debug output stream, with `cargo run --release`:
105+
5. Power on your Neotron Pico into bootloader mode by applying 12V, holding down
106+
the "BOOTSEL" button on the Raspberry Pi Pico and then and tapping the On/Off
107+
button on the Neotron.
108+
109+
If you don't put the RP2040 into bootloader mode then when `probe-run` resets
110+
the chip after programming, the firmware will detect it has had an incomplete
111+
reset and cause a full reset. This makes the video output more reliable, but
112+
the full reset will immediately disconnect `probe-run` so you won't see any
113+
log messages. Booting the RP2040 in USB bootloader mode avoids this issue by
114+
making the `probe-run` triggered reset look more like a full reset.
115+
116+
7. Build and load the Neotron BIOS, and view the debug output stream, with `cargo run --release`.
108117

109118
```console
110119
user@host ~/neotron-pico-bios $ DEFMT_LOG=debug cargo run --release

0 commit comments

Comments
 (0)