Skip to content

Commit

Permalink
add support PIC32MX330/350/370/430/450/470 and config sector for MX5x…
Browse files Browse the repository at this point in the history
…x/6xx/7xx (#12)
  • Loading branch information
kiffie committed Jun 24, 2023
1 parent 11e0ac5 commit a727416
Show file tree
Hide file tree
Showing 19 changed files with 5,415 additions and 120 deletions.
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

0 comments on commit a727416

Please sign in to comment.