Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

set -euo pipefail

# macOS base64 doesn't take -w argument and defaults to a single line.
if [[ $(uname) = "Darwin" ]]; then
BASE64_FLAGS=""
else
BASE64_FLAGS="-w0"
fi

cargo build --release
ELF=target/thumbv6m-none-eabi/release/flash-algo

Expand All @@ -10,7 +17,7 @@ rust-objdump -x $ELF > target/dump.txt
rust-nm $ELF -n > target/nm.txt

function bin {
rust-objcopy $ELF -O binary - | base64 -w0
rust-objcopy $ELF -O binary - | base64 $BASE64_FLAGS
}

function sym {
Expand Down