Compare commits

..

No commits in common. "3f19ad6ee9f8f78bd351fc0806d99a1ce3360517" and "eb87f77d0a195c55fb09f991eab968454c84e52b" have entirely different histories.

3 changed files with 9 additions and 70 deletions

View file

@ -79,6 +79,5 @@ regulator is 3.3V.
### The Rust Firmware
To flash the firmware, connect the ICSP pins of the board to the
programmer and inside the `firmware/rust/` directory run `cargo make
--profile release all`. This compiles the firmware with the release
profile, burns the fuses, writes the default configuration values to
all`. This burns the fuses, writes the default configuration values to
the EEPROM and flashes the firmware.

View file

@ -112,9 +112,9 @@ checksum = "de96540e0ebde571dc55c73d60ef407c653844e6f9a1e2fdbd40c07b9252d812"
[[package]]
name = "paste"
version = "1.0.7"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc"
checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5"
[[package]]
name = "proc-macro-hack"
@ -124,18 +124,18 @@ checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
[[package]]
name = "proc-macro2"
version = "1.0.37"
version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1"
checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
dependencies = [
"unicode-xid",
]
[[package]]
name = "quote"
version = "1.0.17"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "632d02bff7f874a36f33ea8bb416cd484b90cc66c1194b1a1110d067a7013f58"
checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
dependencies = [
"proc-macro2",
]
@ -176,9 +176,9 @@ dependencies = [
[[package]]
name = "syn"
version = "1.0.91"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d"
checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
dependencies = [
"proc-macro2",
"quote",

View file

@ -6,95 +6,35 @@ HIGH_FUSE = "0xD6"
LOW_FUSE = "0xE2"
[tasks.size]
run_task = [
{ name = "size-development", condition = { profiles = [ "development" ] } },
{ name = "size-release", condition = { profiles = [ "release" ] } },
]
[tasks.size-development]
description = "Print usage of memory segments"
dependencies = ["build"]
command = "avr-size"
args = ["--format=avr", "--mcu=${MCU}", "target/avr-atmega328p/debug/clock-generator.elf"]
[tasks.size-release]
description = "Print usage of memory segments"
dependencies = ["build"]
command = "avr-size"
args = ["--format=avr", "--mcu=${MCU}", "target/avr-atmega328p/release/clock-generator.elf"]
[tasks.copy_flash]
run_task = [
{ name = "copy_flash-development", condition = { profiles = [ "development" ] } },
{ name = "copy_flash-release", condition = { profiles = [ "release" ] } },
]
[tasks.copy_flash-development]
description = "Extract the flash"
dependencies = ["build"]
command = "avr-objcopy"
args = ["-O", "ihex", "-j", ".text", "-j", ".data", "target/avr-atmega328p/debug/clock-generator.elf", "target/avr-atmega328p/debug/clock-generator.hex"]
[tasks.copy_flash-release]
description = "Extract the flash"
dependencies = ["build"]
command = "avr-objcopy"
args = ["-O", "ihex", "-j", ".text", "-j", ".data", "target/avr-atmega328p/release/clock-generator.elf", "target/avr-atmega328p/release/clock-generator.hex"]
[tasks.flash]
run_task = [
{ name = "flash-development", condition = { profiles = [ "development" ] } },
{ name = "flash-release", condition = { profiles = [ "release" ] } },
]
[tasks.flash-development]
description = "Flash the firmware"
dependencies = ["copy_flash", "size"]
command = "avrdude"
args = ["-p", "${MCU}", "-c", "${PROGRAMMER}", "-U", "flash:w:target/avr-atmega328p/debug/clock-generator.hex:a"]
[tasks.flash-release]
description = "Flash the firmware"
dependencies = ["copy_flash", "size-release"]
command = "avrdude"
args = ["-p", "${MCU}", "-c", "${PROGRAMMER}", "-U", "flash:w:target/avr-atmega328p/release/clock-generator.hex:a"]
[tasks.copy_eeprom]
run_task = [
{ name = "copy_eeprom-development", condition = { profiles = [ "development" ] } },
{ name = "copy_eeprom-release", condition = { profiles = [ "release" ] } },
]
[tasks.copy_eeprom-development]
description = "Extract the EEPROM"
dependencies = ["build"]
command = "avr-objcopy"
args = ["--change-section-lma", ".eeprom=0", "-O", "ihex", "-j", ".eeprom", "target/avr-atmega328p/debug/clock-generator.elf", "target/avr-atmega328p/debug/clock-generator.eep"]
[tasks.copy_eeprom-release]
description = "Extract the EEPROM"
dependencies = ["build"]
command = "avr-objcopy"
args = ["--change-section-lma", ".eeprom=0", "-O", "ihex", "-j", ".eeprom", "target/avr-atmega328p/release/clock-generator.elf", "target/avr-atmega328p/release/clock-generator.eep"]
[tasks.eeprom]
run_task = [
{ name = "eeprom-development", condition = { profiles = [ "development" ] } },
{ name = "eeprom-release", condition = { profiles = [ "release" ] } },
]
[tasks.eeprom-development]
description = "Flash the eeprom"
dependencies = ["copy_eeprom", "size"]
command = "avrdude"
args = ["-p", "${MCU}", "-c", "${PROGRAMMER}", "-U", "eeprom:w:target/avr-atmega328p/debug/clock-generator.eep:a"]
[tasks.eeprom-release]
description = "Flash the eeprom"
dependencies = ["copy_eeprom", "size"]
command = "avrdude"
args = ["-p", "${MCU}", "-c", "${PROGRAMMER}", "-U", "eeprom:w:target/avr-atmega328p/release/clock-generator.eep:a"]
[tasks.fuses]
description = "Burn the fuses"
command = "avrdude"