Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support PIC32MX330/350/370/430/450/470 and config sector for MX5xx/6xx/7xx #12

Merged
merged 6 commits into from
Jun 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,27 @@ jobs:
- run: cargo clippy --no-deps
working-directory: ./examples/${{ matrix.example }}

ci-check-all:
runs-on: ubuntu-latest
strategy:
matrix:
crate: [pic32-hal]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rust-src, clippy
- run: ./check_all
working-directory: ./${{ matrix.crate }}

ci-crates:
runs-on: ubuntu-latest
strategy:
matrix:
crate: [mips-rt, pic32-config-sector, pic32-hal]
include:
- crate: pic32-hal
features: "pic32mx2xxfxxxb, usb-device"
crate: [mips-rt, pic32-config-sector]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand Down
2 changes: 1 addition & 1 deletion examples/blinky/32MX270F256B_procdefs.ld
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*************************************************************************
* Processor-specific object file for PIC32MX170 and PIC32MX270
* Processor-specific linker script for PIC32MX170 and PIC32MX270
*************************************************************************/

/*************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion examples/usb_serial/32MX270F256B_procdefs.ld
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*************************************************************************
* Processor-specific object file for PIC32MX170 and PIC32MX270
* Processor-specific linker script for PIC32MX170 and PIC32MX270
*************************************************************************/

/*************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion pic32-config-sector/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "pic32-config-sector"
description = "Calculate constant values for PIC32 configuration words"
version = "0.1.2"
version = "0.3.0"
authors = ["Stephan <kiffie@mailbox.org>"]
repository = "https://github.com/kiffie/pic32-rs/tree/master/pic32-config-sector"
license = "MIT OR Apache-2.0"
Expand Down
3 changes: 3 additions & 0 deletions pic32-config-sector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ The following modules exist:
| pic32mx2xx | PIC32MX2xx | PIC32MX270F256B.PIC |
| pic32mx1x4 | PIC32MX1x4 (XLP) | PIC32MX174F256B.PIC |
| pic32mx2x4 | PIC32MX2x4 (XLP) | PIC32MX274F256B.PIC |
| pic32mx37x | PIC32MX330/350/370 | PIC32MX370F512L.PIC |
| pic32mx47x | PIC32MX430/450/470 | PIC32MX470F512L.PIC |
| pic32mx567 | PIC32MX5xx/6xx/7xx | PIC32MX695F512L.PIC |
| pic32mzef | PIC32MZEF | PIC32MZ2048EFM144.PIC |

The const builder structs are machine generated from XML files distributed by
Expand Down
18 changes: 13 additions & 5 deletions pic32-config-sector/create_src.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ build_module() {
./pic2config.py -o "src/$module.rs" $edc || exit -1
}

URLBASE=https://raw.githubusercontent.com/kiffie/pic32-pac/master/pic32mx2xx
URLBASE=https://raw.githubusercontent.com/kiffie/pic32-pac/master
URLBASE_MX567=https://raw.githubusercontent.com/kiffie/pic32-pac/mx567

build_module $URLBASE/pic32mx1xxfxxxb/PIC32MX170F256B.PIC pic32mx1xx
build_module $URLBASE/pic32mx2xxfxxxb/PIC32MX270F256B.PIC pic32mx2xx
build_module $URLBASE/pic32mx1x4fxxxb/PIC32MX174F256B.PIC pic32mx1x4
build_module $URLBASE/pic32mx2x4fxxxb/PIC32MX274F256B.PIC pic32mx2x4
build_module $URLBASE/pic32mx2xx/pic32mx1xxfxxxb/PIC32MX170F256B.PIC pic32mx1xx
build_module $URLBASE/pic32mx2xx/pic32mx2xxfxxxb/PIC32MX270F256B.PIC pic32mx2xx
build_module $URLBASE/pic32mx2xx/pic32mx1x4fxxxb/PIC32MX174F256B.PIC pic32mx1x4
build_module $URLBASE/pic32mx2xx/pic32mx2x4fxxxb/PIC32MX274F256B.PIC pic32mx2x4

build_module $URLBASE/pic32mx470/pic32mx37xfxxxl/PIC32MX370F512L.PIC pic32mx37x
build_module $URLBASE/pic32mx470/pic32mx47xfxxxl/PIC32MX470F512L.PIC pic32mx47x

build_module $URLBASE_MX567/pic32mx567/pic32mx695fxxxl/PIC32MX695F512L.PIC pic32mx567

build_module file:$(pwd)/PIC32MZ2048EFM144.PIC pic32mzef

cargo fmt
9 changes: 9 additions & 0 deletions pic32-config-sector/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,14 @@ pub mod pic32mx1x4;
/// Configuration sector struct and builder for PIC32MX2x4 (XLP)
pub mod pic32mx2x4;

/// Configuration sector struct and builder for PIC32MX330/350/370
pub mod pic32mx37x;

/// Configuration sector struct and builder for PIC32MX430/450/470
pub mod pic32mx47x;

/// Configuration sector struct and builder for PIC32MX5xx/6xx/7xx
pub mod pic32mx567;

/// Configuration sector struct and builder for PIC32MZEF
pub mod pic32mzef;
Loading
Loading