Compare commits
No commits in common. "1cc9ba632a1b191bee2d445228380a9ff6e8cb7d" and "878a8032af2216d1126d50ede2637c9dfd7ee23b" have entirely different histories.
1cc9ba632a
...
878a8032af
|
@ -2,7 +2,6 @@
|
||||||
target = "thumbv6m-none-eabi"
|
target = "thumbv6m-none-eabi"
|
||||||
|
|
||||||
[target.thumbv6m-none-eabi]
|
[target.thumbv6m-none-eabi]
|
||||||
runner = "./flash.sh"
|
|
||||||
rustflags = [
|
rustflags = [
|
||||||
"-C", "link-arg=-Tlink.x",
|
"-C", "link-arg=-Tlink.x",
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
target/
|
target/
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
firmware.bin
|
|
||||||
|
|
5
flash.sh
5
flash.sh
|
@ -1,5 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
binary="$1"
|
|
||||||
arm-none-eabi-objcopy -O binary "$binary" firmware.bin
|
|
||||||
sudo dfu-util -a 0 -s 0x08000000:leave -D firmware.bin
|
|
2
memory.x
2
memory.x
|
@ -1,6 +1,6 @@
|
||||||
/* STM32F072CxT6 */
|
/* STM32F072CxT6 */
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
FLASH : ORIGIN = 0x08000000, LENGTH = 128K /* change length to 128K for STM32F072CBT6 */
|
FLASH : ORIGIN = 0x08000000, LENGTH = 64K /* change length to 128K for STM32F072CBT6 */
|
||||||
RAM : ORIGIN = 0x20000000, LENGTH = 16K
|
RAM : ORIGIN = 0x20000000, LENGTH = 16K
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[toolchain]
|
|
||||||
channel = "stable"
|
|
||||||
components = [ "rust-src" ]
|
|
||||||
targets = [ "thumbv6m-none-eabi" ]
|
|
20
shell.nix
20
shell.nix
|
@ -1,20 +0,0 @@
|
||||||
# Use nixpkgs with oxalica rust-bin overlay
|
|
||||||
let
|
|
||||||
rust_overlay = import (builtins.fetchTarball
|
|
||||||
"https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
|
|
||||||
nixpkgs = import <nixpkgs> { overlays = [ rust_overlay ]; };
|
|
||||||
rust_channel = nixpkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain;
|
|
||||||
in
|
|
||||||
# Avoid typing `nixpkgs.` before each package name
|
|
||||||
with nixpkgs;
|
|
||||||
|
|
||||||
# Define the shell
|
|
||||||
pkgs.mkShell {
|
|
||||||
buildInputs = [
|
|
||||||
dfu-util
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
rust_channel # Full rust from overlay, includes cargo
|
|
||||||
];
|
|
||||||
}
|
|
Loading…
Reference in New Issue