Merge pull request #328 from keyboardio/f/kaleidoscope-builder/ergodox-support

kaleidoscope-builder: Improvements for easier ErgoDox support
pull/330/head
Jesse Vincent 7 years ago committed by GitHub
commit 887e015afb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,8 +30,7 @@ firmware_size () {
## This is a terrible hack, please don't hurt me. - algernon ## This is a terrible hack, please don't hurt me. - algernon
MAX_PROG_SIZE=28672 find_max_prog_size
output="$("$@" | grep "\\(Program\\|Data\\):" | sed -e 's,^, - ,' && echo)" output="$("$@" | grep "\\(Program\\|Data\\):" | sed -e 's,^, - ,' && echo)"
PROGSIZE="$(echo "${output}" | grep "Program:" | cut -d: -f2 | awk '{print $1}')" PROGSIZE="$(echo "${output}" | grep "Program:" | cut -d: -f2 | awk '{print $1}')"

@ -26,6 +26,17 @@ fi
# Shamelessly stolen from git's Makefile # Shamelessly stolen from git's Makefile
uname_S=$(uname -s 2>/dev/null || echo not) uname_S=$(uname -s 2>/dev/null || echo not)
find_max_prog_size() {
VPIDS=$(${ARDUINO_BUILDER} \
-hardware "${ARDUINO_PATH}/hardware" \
-hardware "${BOARD_HARDWARE_PATH}" \
${ARDUINO_TOOLS_PARAM} \
-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)}
}
find_device_vid_pid() { find_device_vid_pid() {
VPIDS=$(${ARDUINO_BUILDER} \ VPIDS=$(${ARDUINO_BUILDER} \
-hardware "${ARDUINO_PATH}/hardware" \ -hardware "${ARDUINO_PATH}/hardware" \
@ -47,7 +58,9 @@ find_device_port() {
} }
reset_device_cmd() { reset_device_cmd() {
if [ -z ${NO_RESET} ]; then
stty -F ${DEVICE_PORT} 1200 hupcl stty -F ${DEVICE_PORT} 1200 hupcl
fi
} }
find_bootloader_ports() { find_bootloader_ports() {

Loading…
Cancel
Save