Skip to content

Commit e670477

Browse files
committed
Runs on the Pico 2.
Tested showing 640x480@4bpp images and running the neotracker with DAMAGE.MOD.
1 parent fe6a548 commit e670477

File tree

9 files changed

+162
-105
lines changed

9 files changed

+162
-105
lines changed

.cargo/config.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
[target.thumbv6m-none-eabi]
2-
# This will make a UF2 and copy it to the RP2040's Mass Storage Device bootloader
3-
# runner = "elf2uf2-rs -d"
4-
# This will flash over SWD with any compatible probe it finds.
5-
runner = "probe-rs run --chip RP2040 --speed 10000"
1+
[target.thumbv8m.main-none-eabihf]
2+
# This will load the binary with picotool
3+
runner = "picotool load -v -u -x -t elf"
64
rustflags = [
75
# This is needed if your flash or ram addresses are not aligned to 0x10000 in memory.x
86
# See https://github.com/rust-embedded/cortex-m-quickstart/pull/95
@@ -16,7 +14,7 @@ rustflags = [
1614
]
1715

1816
[build]
19-
target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+
17+
target = "thumbv8m.main-none-eabihf" # Cortex-M33
2018

2119
[env]
2220
DEFMT_LOG = { value = "info" }

.github/workflows/build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ jobs:
2424
run: |
2525
rustup toolchain install stable --profile minimal --no-self-update
2626
rustup default stable
27-
rustup target add thumbv6m-none-eabi
27+
rustup target add thumbv8m.main-none-eabihf
2828
echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV
2929
echo CARGO_TERM_COLOR=always >> $GITHUB_ENV
3030
3131
- name: Build neotron-pico-bios
3232
run: |
3333
cargo build --release --verbose
34-
mv ./target/thumbv6m-none-eabi/release/neotron-pico-bios ./target/thumbv6m-none-eabi/release/neotron-pico-bios.elf
35-
elf2uf2-rs ./target/thumbv6m-none-eabi/release/neotron-pico-bios.elf
34+
mv ./target/thumbv8m.main-none-eabihf/release/neotron-pico-bios ./target/thumbv8m.main-none-eabihf/release/neotron-pico-bios.elf
35+
# elf2uf2-rs ./target/thumbv8m.main-none-eabihf/release/neotron-pico-bios.elf
3636
3737
- name: Upload Artifacts
3838
uses: actions/upload-artifact@v4
@@ -41,15 +41,15 @@ jobs:
4141
name: Artifacts
4242
if-no-files-found: error
4343
path: |
44-
./target/thumbv6m-none-eabi/release/neotron-pico-bios.elf
45-
./target/thumbv6m-none-eabi/release/neotron-pico-bios.uf2
44+
./target/thumbv8m.main-none-eabihf/release/neotron-pico-bios.elf
45+
./target/thumbv8m.main-none-eabihf/release/neotron-pico-bios.uf2
4646
4747
- name: Upload files to Release
4848
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
4949
uses: softprops/action-gh-release@v1
5050
with:
5151
files: |
52-
./target/thumbv6m-none-eabi/release/neotron-pico-bios.elf
53-
./target/thumbv6m-none-eabi/release/neotron-pico-bios.uf2
52+
./target/thumbv8m.main-none-eabihf/release/neotron-pico-bios.elf
53+
./target/thumbv8m.main-none-eabihf/release/neotron-pico-bios.uf2
5454
env:
5555
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/clippy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
- name: Add targets/components
2020
run: |
2121
rustup component add clippy
22-
rustup target add thumbv6m-none-eabi
22+
rustup target add thumbv8m.main-none-eabihf
2323
2424
- name: Run Clippy
2525
run: |
26-
cargo clippy --target=thumbv6m-none-eabi --all-features
26+
cargo clippy --target=thumbv8m.main-none-eabihf --all-features

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"coreConfigs": [
1515
{
1616
// Change this to the binary you want to debug
17-
"programBinary": "${workspaceFolder}/target/thumbv6m-none-eabi/release/neotron-pico-bios",
17+
"programBinary": "${workspaceFolder}/target/thumbv8m.main-none-eabihf/release/neotron-pico-bios",
1818
"rttEnabled": true
1919
}
2020
],

Cargo.lock

Lines changed: 74 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ pc-keyboard = "0.7.0" # PS/2 scancode decoding
2929
pio = "0.2.1" # RP2040 PIO assembler
3030
pio-proc = "0.2" # Macros for RP2040 PIO assembler
3131
portable-atomic = { version = "1.10.0", features = ["critical-section"] } # Atomic CAS for non-CAS CPUs
32-
rp2040-boot2 = "0.3.0" # For the RP2040 bootloader
33-
rp2040-hal = { version = "0.11", features = [ "defmt", "rt", "critical-section-impl", "rom-func-cache" ] } # The Raspberry Pi RP2040 HAL (so we can turn defmt on)
32+
rp235x-hal = { version = "0.2", features = [ "defmt", "rt", "critical-section-impl", "rom-func-cache" ] } # The Raspberry Pi RP2350 HAL
3433
shared-bus = "0.3.1" # I2C Bus Sharing
3534
tlv320aic23 = "0.1.0" # CODEC register control
3635

0 commit comments

Comments
 (0)