summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2025-03-21 22:47:17 +0100
committerxengineering <me@xengineering.eu>2025-03-21 22:47:17 +0100
commitfb24214660b60e97cc3b012fb0ac31d5a54e9e9e (patch)
tree16fc1d9d95bab4ca499e385362b1340faa3a3e19
parent3d28070910e3cf6ec5375e18cafbda0b7b22cfc8 (diff)
downloadiot-contact-fb24214660b60e97cc3b012fb0ac31d5a54e9e9e.tar
iot-contact-fb24214660b60e97cc3b012fb0ac31d5a54e9e9e.tar.zst
iot-contact-fb24214660b60e97cc3b012fb0ac31d5a54e9e9e.zip
fw: nucleo: Allow custom my.conf configuration
This allows to set custom IPv6 addresses while there is not runtime configuration.
-rw-r--r--fw/.gitignore1
-rwxr-xr-xfw/nucleo.sh9
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"