Skip to content

Commit

Permalink
update i2c_oled example
Browse files Browse the repository at this point in the history
  • Loading branch information
kiffie committed Jul 8, 2023
1 parent 1d1f4c5 commit b559258
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 518 deletions.
2 changes: 1 addition & 1 deletion examples/i2c_oled_display/.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
43 changes: 22 additions & 21 deletions examples/i2c_oled_display/Cargo.lock

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

10 changes: 5 additions & 5 deletions examples/i2c_oled_display/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ default = ["pic32mx2xxfxxxb"]

[dependencies]
mips-mcu = { version = "0.3.0", features = ["critical-section-single-core"] }
mips-rt = "0.3.0"
mips-rt = "0.3.2"
panic-halt = "0.2.0"
embedded-hal = "0.2.7"
critical-section = "1.0.0"
tinylog = { git = "https://github.com/kiffie/pic32-rs.git" }
pic32-hal = "0.9.0"
critical-section = "1.1.1"
pic32-hal = "0.10.0"
ssd1306 = "0.8.0"
embedded-graphics = "0.8.0"
pic32-config-sector = "0.2.0"
pic32-config-sector = "0.3.0"

[profile.release]
opt-level = 2
Expand Down
36 changes: 36 additions & 0 deletions examples/i2c_oled_display/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 b559258

Please sign in to comment.