Skip to content

Instantly share code, notes, and snippets.

@lupyuen
Last active February 26, 2022 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lupyuen/cc21385ecc66b5c02d15affd776a64af to your computer and use it in GitHub Desktop.
Save lupyuen/cc21385ecc66b5c02d15affd776a64af to your computer and use it in GitHub Desktop.
Build, Flash and Run NuttX on BL602 from macOS (See https://lupyuen.github.io/articles/nuttx)
#!/usr/bin/env bash
## macOS script to build, flash and run BL602 NuttX Firmware
set -e # Exit when any command fails
set -x # Echo commands
## Build the firmware
make -j
## Flash the firmware
blflash flash nuttx.bin \
--port /dev/tty.usbserial-14* \
--initial-baud-rate 230400 \
--baud-rate 230400
sleep 5
## Run the firmware
open -a CoolTerm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment