Skip to content

Commit

Permalink
update usb_serial example
Browse files Browse the repository at this point in the history
  • Loading branch information
kiffie committed Jul 8, 2023
1 parent b559258 commit 81f82a7
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 497 deletions.
2 changes: 1 addition & 1 deletion examples/usb_serial/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

[target.mipsel-unknown-none]
rustflags = ["-C", "link-arg=-T32MX270F256B_procdefs.ld"]
rustflags = ["-C", "link-arg=-Tlink.x"]

[build]
target = "mipsel-unknown-none"
Expand Down
40 changes: 0 additions & 40 deletions examples/usb_serial/32MX270F256B_procdefs.ld

This file was deleted.

16 changes: 8 additions & 8 deletions examples/usb_serial/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions examples/usb_serial/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ default = ["pic32mx2xxfxxxb"]

[dependencies]
mips-mcu = { version = "0.3.0", features = ["critical-section-single-core"] }
mips-rt = "0.3.0"
mips-mcu-alloc = "0.6.0"
embedded-hal = "0.2.3"
pic32-hal = { version = "0.9.0", features = ["usb-device"] }
mips-rt = "0.3.2"
mips-mcu-alloc = "0.6.1"
embedded-hal = "0.2.7"
pic32-hal = { version = "0.10.0", features = ["usb-device"] }
panic-halt = "0.2.0"
usb-device = "0.2.5"
usbd-serial = "0.1.0"
pic32-config-sector = "0.2.0"
usb-device = "0.2.9"
usbd-serial = "0.1.1"
pic32-config-sector = "0.3.0"

[profile.release]
opt-level = 2
lto = true
debug = true
36 changes: 36 additions & 0 deletions examples/usb_serial/memory.x
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Memory region of PIC32MX devices
*
* LENGTH values need to be adapted to specific device variant.
* REGION_ALIAS functions are used to put the startup code either into the boot
* flash memory or into the program flash memory keeping the boot flash free for
* a boot loader.
*/

/* Symbols used for interrupt-vector table generation */
PROVIDE(_vector_spacing = 0x0001);
PROVIDE(_ebase_address = 0x9D000000); /* first 4 KiB of program flash */

MEMORY
{
boot_flash (rx) : ORIGIN = 0xBFC00000, LENGTH = 3k - 0x10
program_flash (rx) : ORIGIN = 0x9D000000, LENGTH = 128k
sram (w!x) : ORIGIN = 0x80000000, LENGTH = 32k
configsfrs : ORIGIN = ORIGIN(boot_flash) + LENGTH(boot_flash), LENGTH = 0x10
}

REGION_ALIAS("exception_mem", program_flash)
REGION_ALIAS("program_mem", program_flash)
REGION_ALIAS("data_mem", sram)

/* aliases for direct start without bootloader
* put the reset handler into the boot flash.
*/
REGION_ALIAS(reset_mem, boot_flash)

/* aliases for bootloader support
* put the bootloader into the boot flash memory and the reset handler at the
* beginning of the normal program flash memory.
*/
/* REGION_ALIAS(reset_mem, program_flash)
REGION_ALIAS(bootloader_mem, boot_flash) */
Loading

0 comments on commit 81f82a7

Please sign in to comment.