|
|
@ -335,23 +335,6 @@ check_bootloader_port_and_flash () {
|
|
|
|
return 0
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
flash_over_usb () {
|
|
|
|
|
|
|
|
FLASH_CMD=$(${AVRDUDE} \
|
|
|
|
|
|
|
|
-C "${AVRDUDE_CONF}" \
|
|
|
|
|
|
|
|
-p"$(get_arduino_pref 'build.mcu')" \
|
|
|
|
|
|
|
|
-cavr109 \
|
|
|
|
|
|
|
|
-D \
|
|
|
|
|
|
|
|
-P "${DEVICE_PORT_BOOTLOADER}" \
|
|
|
|
|
|
|
|
-b57600 \
|
|
|
|
|
|
|
|
"-Uflash:w:${HEX_FILE_PATH}:i")
|
|
|
|
|
|
|
|
if [ "${ARDUINO_VERBOSE}" != "--verbose" ]; then
|
|
|
|
|
|
|
|
${FLASH_CMD} 2>&1 |grep -v ^avrdude | grep -v '^$' |grep -v '^ ' | grep -vi programmer
|
|
|
|
|
|
|
|
return "${PIPESTATUS[0]}"
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
${FLASH_CMD}
|
|
|
|
|
|
|
|
return $?
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
flash_from_bootloader() {
|
|
|
|
flash_from_bootloader() {
|
|
|
|
compile "$@"
|
|
|
|
compile "$@"
|
|
|
@ -367,20 +350,29 @@ program() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
flash_with_programmer() {
|
|
|
|
flash_with_programmer() {
|
|
|
|
${AVRDUDE} -v \
|
|
|
|
set_executable_paths
|
|
|
|
-C "${AVRDUDE_CONF}" \
|
|
|
|
${AVRDUDE_CMD}
|
|
|
|
-p"$(get_arduino_pref 'build.mcu')" \
|
|
|
|
|
|
|
|
-cusbtiny \
|
|
|
|
-cusbtiny \
|
|
|
|
-D \
|
|
|
|
|
|
|
|
-B 1 \
|
|
|
|
-B 1 \
|
|
|
|
"-Uflash:w:${HEX_FILE_PATH}:i"
|
|
|
|
"-Uflash:w:${HEX_FILE_PATH}:i"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
find_bootloader_path() {
|
|
|
|
flash_over_usb () {
|
|
|
|
: "${BOOTLOADER_PATH:=$( get_arduino_pref 'runtime.platform.path' )/bootloaders/$( get_arduino_pref 'bootloader.file' )}"
|
|
|
|
set_executable_paths
|
|
|
|
|
|
|
|
FLASH_CMD=$( ${AVRDUDE_CMD}
|
|
|
|
|
|
|
|
-cavr109 \
|
|
|
|
|
|
|
|
-P "${DEVICE_PORT_BOOTLOADER}" \
|
|
|
|
|
|
|
|
-b57600 \
|
|
|
|
|
|
|
|
"-Uflash:w:${HEX_FILE_PATH}:i")
|
|
|
|
|
|
|
|
if [ "${ARDUINO_VERBOSE}" != "--verbose" ]; then
|
|
|
|
|
|
|
|
${FLASH_CMD} 2>&1 |grep -v ^avrdude | grep -v '^$' |grep -v '^ ' | grep -vi programmer
|
|
|
|
|
|
|
|
return "${PIPESTATUS[0]}"
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
${FLASH_CMD}
|
|
|
|
|
|
|
|
return $?
|
|
|
|
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hex_with_bootloader () {
|
|
|
|
hex_with_bootloader () {
|
|
|
|
compile
|
|
|
|
compile
|
|
|
|
|
|
|
|
|
|
|
|