Created
June 9, 2024 12:08
-
-
Save standarddeviant/61d959381df84d44a81615cca0ad427e to your computer and use it in GitHub Desktop.
Rust BLE recipe on nRF52840
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let startdir = pwd | |
if not ('nrf-softdevice' | path exists) { | |
git clone https://github.com/embassy-rs/nrf-softdevice.git | |
} | |
cd ([nrf-softdevice examples] | path join) | |
if not ('uf2conv.py' | path exists) { | |
http get https://raw.githubusercontent.com/microsoft/uf2/master/utils/uf2families.json | save uf2families.json | |
http get https://raw.githubusercontent.com/microsoft/uf2/master/utils/uf2conv.py | save uf2conv.py | |
} | |
cargo build --bin ble_bas_peripheral --features nrf52840 --release | |
arm-none-eabi-objcopy -O ihex ..\target\thumbv7em-none-eabihf\release\ble_bas_peripheral .\ble_bas_peripheral.hex | |
mergehex -m s140_nrf52_7.3.0_softdevice.hex ble_bas_peripheral.hex -o merged.hex | |
python uf2conv.py -f 0xADA52840 -c -b 0x1000 -o app.uf2 merged.hex | |
cd $startdir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment