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 <algernon@keyboard.io>
pull/357/head
Gergely Nagy 6 years ago
parent cddb35e172
commit f8d42b72c4

@ -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() {

Loading…
Cancel
Save