From f8d42b72c4248b9a44d3613f953c06d930c5dd7c Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 12 Sep 2018 08:49:40 +0200 Subject: [PATCH] kaleidoscope-builder: Support boards with multiple max sizes With the Atreus, we have a board that has a different max upload size depending on what MCU is used. Until we figure out how to properly support that in the CLI builder, default to using the first value. That's a reasonable approximation in most cases. Signed-off-by: Gergely Nagy --- etc/kaleidoscope-builder.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/kaleidoscope-builder.conf b/etc/kaleidoscope-builder.conf index fa4d064d..c57cf09d 100644 --- a/etc/kaleidoscope-builder.conf +++ b/etc/kaleidoscope-builder.conf @@ -34,7 +34,7 @@ find_max_prog_size() { -tools "${ARDUINO_PATH}/tools-builder" \ -fqbn "${FQBN}" \ -dump-prefs | grep "upload\.maximum_size=") - MAX_PROG_SIZE=${MAX_PROG_SIZE:-$(echo "${VPIDS}" | grep upload.maximum_size | cut -d= -f2)} + MAX_PROG_SIZE=${MAX_PROG_SIZE:-$(echo "${VPIDS}" | grep upload.maximum_size | head -n 1 | cut -d= -f2)} } find_device_vid_pid() {