diff options
-rw-r--r-- | fw/.gitignore | 1 | ||||
-rwxr-xr-x | fw/nucleo.sh | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/fw/.gitignore b/fw/.gitignore new file mode 100644 index 0000000..b6b51e9 --- /dev/null +++ b/fw/.gitignore @@ -0,0 +1 @@ +my.conf diff --git a/fw/nucleo.sh b/fw/nucleo.sh index 8bff4a0..24966b1 100755 --- a/fw/nucleo.sh +++ b/fw/nucleo.sh @@ -28,12 +28,19 @@ FLASH_ADDRESS='0x8000000' BOARD='nucleo_f767zi' BAUDRATE='115200' SERIAL_PORT='/dev/ttyACM0' +CONFIG_OVERLAY="${FW}/my.conf" +overlay_config='' +if test -f "$CONFIG_OVERLAY" +then + overlay_config="-DEXTRA_CONF_FILE="${CONFIG_OVERLAY}"" +fi + set -x rm -rf "$BUILD" -cmake "-B${BUILD}" -GNinja -DBOARD="$BOARD" +cmake "-B${BUILD}" -GNinja -DBOARD="$BOARD" "$overlay_config" ninja -C "$BUILD" st-flash --connect-under-reset write "$FIRMWARE" "$FLASH_ADDRESS" picocom -b "$BAUDRATE" "$SERIAL_PORT" |