Skip to content

Commit bcf37d5

Browse files
authored
Merge pull request #339 from LeeLeahy2/upload
Add upload target to makefile
2 parents 0d25566 + d56d3d7 commit bcf37d5

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Firmware/RTK_Everywhere/makefile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,34 @@ RTK: RTK_Everywhere.ino *.ino *.h
9999
--build-property "compiler.cpp.extra_flags=-MMD -c \"-DPOINTPERFECT_TOKEN=$(POINTPERFECT_TOKEN)\" \"-DFIRMWARE_VERSION_MAJOR=$(FIRMWARE_VERSION_MAJOR)\" \"-DFIRMWARE_VERSION_MINOR=$(FIRMWARE_VERSION_MINOR)\" \"-DENABLE_DEVELOPER=$(ENABLE_DEVELOPER)\"" \
100100
--export-binaries
101101

102+
##########
103+
# Upload the firmware
104+
##########
105+
106+
.PHONY: upload
107+
108+
SKETCH=RTK_Everywhere.ino
109+
ESPTOOL_PATH=~/Arduino/hardware/espressif/esp32/tools/esptool
110+
TERMINAL_PORT="/dev/ttyUSB0"
111+
BOOT_LOADER_PATH=~/SparkFun/SparkFun_RTK_Firmware_Uploader/RTK_Firmware_Uploader/resource
112+
113+
upload: build/esp32.esp32.esp32/$(SKETCH).bin
114+
python3 $(ESPTOOL_PATH)/esptool.py \
115+
--chip esp32 \
116+
--port $(TERMINAL_PORT) \
117+
--baud 921600 \
118+
--before default_reset \
119+
--after hard_reset \
120+
write_flash \
121+
--flash_mode dio \
122+
--flash_freq 80m \
123+
--flash_size detect \
124+
--compress \
125+
0x1000 $(BOOT_LOADER_PATH)/RTK_Surveyor.ino.bootloader.bin \
126+
0x8000 $(BOOT_LOADER_PATH)/RTK_Surveyor_Partitions_16MB.bin \
127+
0xe000 $(BOOT_LOADER_PATH)/boot_app0.bin \
128+
0x10000 $<
129+
102130
########
103131
# Clean the build directory
104132
##########

0 commit comments

Comments
 (0)