|
|
@ -55,6 +55,10 @@ find_sketch () {
|
|
|
|
flash () {
|
|
|
|
flash () {
|
|
|
|
. ${ROOT}/tools/settings.sh
|
|
|
|
. ${ROOT}/tools/settings.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -e "{HEX_FILE_PATH}" ]; then
|
|
|
|
|
|
|
|
compile
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
echo "Press ENTER when ready..."
|
|
|
|
echo "Press ENTER when ready..."
|
|
|
|
read a
|
|
|
|
read a
|
|
|
|
|
|
|
|
|
|
|
@ -66,6 +70,10 @@ flash () {
|
|
|
|
program () {
|
|
|
|
program () {
|
|
|
|
. ${ROOT}/tools/settings.sh
|
|
|
|
. ${ROOT}/tools/settings.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -e "{HEX_FILE_PATH}" ]; then
|
|
|
|
|
|
|
|
compile
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
echo "Press ENTER when ready..."
|
|
|
|
echo "Press ENTER when ready..."
|
|
|
|
read a
|
|
|
|
read a
|
|
|
|
|
|
|
|
|
|
|
@ -80,6 +88,10 @@ program () {
|
|
|
|
hex_with_bootloader () {
|
|
|
|
hex_with_bootloader () {
|
|
|
|
. ${ROOT}/tools/settings.sh
|
|
|
|
. ${ROOT}/tools/settings.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -e "{HEX_FILE_PATH}" ]; then
|
|
|
|
|
|
|
|
compile
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
cat ${HEX_FILE_PATH} | awk '/^:00000001FF/ == 0' > ${HEX_FILE_WITH_BOOTLOADER_PATH}
|
|
|
|
cat ${HEX_FILE_PATH} | awk '/^:00000001FF/ == 0' > ${HEX_FILE_WITH_BOOTLOADER_PATH}
|
|
|
|
echo "Using ${BOOTLOADER_PATH}"
|
|
|
|
echo "Using ${BOOTLOADER_PATH}"
|
|
|
|
${MD5} ${BOOTLOADER_PATH}
|
|
|
|
${MD5} ${BOOTLOADER_PATH}
|
|
|
@ -164,6 +176,10 @@ build_all () {
|
|
|
|
report_size () {
|
|
|
|
report_size () {
|
|
|
|
. ${ROOT}/tools/settings.sh
|
|
|
|
. ${ROOT}/tools/settings.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -e "{HEX_FILE_PATH}" ]; then
|
|
|
|
|
|
|
|
compile
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
echo "- Size: firmware/${LIBRARY}/${OUTPUT_FILE_PREFIX}.elf"
|
|
|
|
echo "- Size: firmware/${LIBRARY}/${OUTPUT_FILE_PREFIX}.elf"
|
|
|
|
firmware_size "${AVR_SIZE}" -C --mcu="${MCU}" "${ELF_FILE_PATH}"
|
|
|
|
firmware_size "${AVR_SIZE}" -C --mcu="${MCU}" "${ELF_FILE_PATH}"
|
|
|
|
echo
|
|
|
|
echo
|
|
|
@ -172,12 +188,20 @@ report_size () {
|
|
|
|
size_map () {
|
|
|
|
size_map () {
|
|
|
|
. ${ROOT}/tools/settings.sh
|
|
|
|
. ${ROOT}/tools/settings.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -e "{HEX_FILE_PATH}" ]; then
|
|
|
|
|
|
|
|
compile
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
"${AVR_NM}" --size-sort -C -r -l "${ELF_FILE_PATH}"
|
|
|
|
"${AVR_NM}" --size-sort -C -r -l "${ELF_FILE_PATH}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
decompile () {
|
|
|
|
decompile () {
|
|
|
|
. ${ROOT}/tools/settings.sh
|
|
|
|
. ${ROOT}/tools/settings.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -e "{HEX_FILE_PATH}" ]; then
|
|
|
|
|
|
|
|
compile
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
"${AVR_OBJDUMP}" -d "${ELF_FILE_PATH}"
|
|
|
|
"${AVR_OBJDUMP}" -d "${ELF_FILE_PATH}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|