Skip to content

Commit 07e8675

Browse files
authored
Merge pull request #361 from LeeLeahy2/burn-4mb
Docs: Updated new-firmware.sh and added new-firmware-4mb.sh
2 parents ea5ba0e + 79a5a60 commit 07e8675

File tree

1 file changed

+59
-33
lines changed

1 file changed

+59
-33
lines changed

docs/firmware_update.md

Lines changed: 59 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ Remember, all SparkFun RTK devices are open source hardware meaning you have tot
3232

3333
This GUI makes it easy to point and click your way through a firmware update. There are versions for Windows, Linux, MacOS and a Python package installer.
3434

35-
The GUI can be downloaded from its own [**dedicated repo**](https://github.com/sparkfun/SparkFun_RTK_Firmware_Uploader).
35+
The GUI can be downloaded from its own [**dedicated repo**](https://github.com/sparkfun/SparkFun_RTK_Firmware_Uploader).
3636

3737
Download the latest RTK firmware binary file located on the [**releases page**](https://github.com/sparkfun/SparkFun_RTK_Firmware/releases) or from the [**binaries repo**](https://github.com/sparkfun/SparkFun_RTK_Firmware_Binaries).
3838

3939
**To Use**
4040

41-
* Attach the RTK device to your computer using a USB cable.
41+
* Attach the RTK device to your computer using a USB cable.
4242
* Turn the RTK device on.
4343
* On Windows, open the Device Manager to confirm which COM port the device is operating on. On other platforms, check ```/dev```.
4444

@@ -116,7 +116,7 @@ Upon completion, your RTK device will reset and power down.
116116

117117
### macOS / Linux
118118

119-
Get [esptool.py](https://github.com/espressif/esptool). Connect a USB A to C cable from your computer to the ESP32 port on the RTK device. Turn the unit on. Now identify the COM port the RTK enumerated at.
119+
Get [esptool.py](https://github.com/espressif/esptool). Connect a USB A to C cable from your computer to the ESP32 port on the RTK device. Turn the unit on. Now identify the COM port the RTK enumerated at.
120120

121121
If the COM port is not showing be sure the unit is turned **On**. If an unknown device is appearing, you’ll need to [install drivers for the CH340](https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all). Once you know the COM port, run the following command:
122122

@@ -239,13 +239,13 @@ As of writing, no additional releases of the NEO-D9S firmware have been made.
239239

240240
The SparkFun RTK firmware is compiled using Arduino (currently v1.8.15). To compile:
241241

242-
1. Install [Arduino](https://www.arduino.cc/en/software).
242+
1. Install [Arduino](https://www.arduino.cc/en/software).
243243
2. Install ESP32 for Arduino. [Here](https://learn.sparkfun.com/tutorials/esp32-thing-hookup-guide#installing-via-arduino-ide-boards-manager) are some good instructions for installing it via the Arduino Boards Manager. **Note**: Use v2.0.2 of the core. **Note:** We use the 'ESP32 Dev Module' for pin numbering. Select the correct board under Tools->Board->ESP32 Arduino->ESP32 Dev Module.
244244
3. Change the Partition table. Replace 'C:\Users\\[user name]\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2\tools\partitions\app3M_fat9M_16MB.csv' with the app3M_fat9M_16MB.csv [file](https://github.com/sparkfun/SparkFun_RTK_Firmware/blob/main/Firmware/app3M_fat9M_16MB.csv?raw=true) found in the [Firmware folder](https://github.com/sparkfun/SparkFun_RTK_Firmware/tree/main/Firmware). This will increase the program partition from a maximum of 1.9MB to 3MB.
245-
4. From the Arduino IDE, set the core settings from the **Tools** menu:
246-
245+
4. From the Arduino IDE, set the core settings from the **Tools** menu:
246+
247247
A. Set the 'Partition Scheme' to *16M Flash (3MB APP/9MB FATFS)*. This will use the 'app3M_fat9M_16MB.csv' updated partition table.
248-
248+
249249
B. Set the 'Flash Size' to 16MB (128mbit)
250250

251251
5. Obtain all the required libraries. **Note:** You should click on the link next to each of the #includes at the top of RTK_Surveyor.ino within the Arduino IDE to open the library manager and download them. Getting them directly from Github also works but may not be 'official' releases:
@@ -366,32 +366,58 @@ Insert the following text into the file:
366366
# 1: ttyUSBn
367367
# 2: Firmware file
368368
#
369-
sudo python3 ~/.arduino15/packages/esp32/tools/esptool_py/*/esptool.py --chip esp32 --port /dev/$1 --baud 230400 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect \
370-
0x1000 ~/SparkFun/RTK/Binaries/bin/RTK_Surveyor.ino.bootloader.bin \
371-
0x8000 ~/SparkFun/RTK/Binaries/bin/RTK_Surveyor_Partitions_16MB.bin \
372-
0xe000 ~/SparkFun/RTK/Binaries/bin/boot_app0.bin \
369+
sudo python3 ~/SparkFun/RTK_Binaries/Uploader_GUI/esptool.py --chip esp32 --port /dev/$1 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect \
370+
0x1000 ~/SparkFun/RTK_Binaries/bin/RTK_Surveyor.ino.bootloader.bin \
371+
0x8000 ~/SparkFun/RTK_Binaries/bin/RTK_Surveyor_Partitions_16MB.bin \
372+
0xe000 ~/SparkFun/RTK_Binaries/bin/boot_app0.bin \
373373
0x10000 $2
374374

375375
14. chmod +x new-firmware.sh
376+
15. nano new-firmware-4mb.sh
377+
378+
Insert the following text into the file:
379+
380+
#!/bin/bash
381+
# new-firmware-4mb.sh
382+
#
383+
# Shell script to load firmware into the 4MB RTK Express via the ESP32 port
384+
#
385+
# Parameters:
386+
# 1: ttyUSBn
387+
# 2: Firmware file
388+
#
389+
sudo python3 ~/SparkFun/RTK_Binaries/Uploader_GUI/esptool.py --chip esp32 --port /dev/$1 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect \
390+
0x1000 ~/SparkFun/RTK_Binaries/bin/RTK_Surveyor.ino.bootloader.bin \
391+
0x8000 ~/SparkFun/RTK_Binaries/bin/RTK_Surveyor_Partitions_4MB.bin \
392+
0xe000 ~/SparkFun/RTK_Binaries/bin/boot_app0.bin \
393+
0x10000 $2
394+
395+
16. chmod +x new-firmware-4mb.sh
376396

377397
Get the SparkFun RTK Firmware sources
378398

379-
15. mkdir ~/SparkFun/RTK
380-
16. cd ~/SparkFun/RTK
381-
17. git clone https://github.com/sparkfun/SparkFun_RTK_Firmware .
399+
17. mkdir ~/SparkFun/RTK
400+
18. cd ~/SparkFun/RTK
401+
19. git clone https://github.com/sparkfun/SparkFun_RTK_Firmware .
402+
403+
Get the SparkFun RTK binaries
404+
405+
20. mkdir ~/SparkFun/RTK_Binaries
406+
21. cd ~/SparkFun/RTK_Binaries
407+
22. git clone https://github.com/sparkfun/SparkFun_RTK_Firmware_Binaries.git .
382408

383409
Install the Arduino IDE
384410

385-
18. mkdir ~/SparkFun/arduino
386-
19. cd ~/SparkFun/arduino
387-
20. wget https://downloads.arduino.cc/arduino-1.8.15-linux64.tar.xz
388-
21. tar -xvf ./arduino-1.8.15-linux64.tar.xz
389-
22. cd arduino-1.8.15/
390-
23. sudo ./install.sh
411+
23. mkdir ~/SparkFun/arduino
412+
24. cd ~/SparkFun/arduino
413+
25. wget https://downloads.arduino.cc/arduino-1.8.15-linux64.tar.xz
414+
26. tar -xvf ./arduino-1.8.15-linux64.tar.xz
415+
27. cd arduino-1.8.15/
416+
28. sudo ./install.sh
391417

392418
Add the ESP32 support
393419

394-
24. arduino
420+
29. arduino
395421
1. Click on File in the menu bar
396422
2. Click on Preferences
397423
3. Go down to the Additional Boards Manager URLs text box
@@ -404,22 +430,22 @@ Add the ESP32 support
404430

405431
Get the required external libraries, then add to the Sketchbook location from above
406432

407-
25. cd ~/Arduino/libraries
408-
26. mkdir AsyncTCP
409-
27. cd AsyncTCP/
410-
28. git clone https://github.com/me-no-dev/AsyncTCP.git .
411-
29. cd ..
412-
30. mkdir ESPAsyncWebServer
413-
31. cd ESPAsyncWebServer
414-
32. git clone https://github.com/me-no-dev/ESPAsyncWebServer .
433+
30. cd ~/Arduino/libraries
434+
31. mkdir AsyncTCP
435+
32. cd AsyncTCP/
436+
33. git clone https://github.com/me-no-dev/AsyncTCP.git .
437+
34. cd ..
438+
35. mkdir ESPAsyncWebServer
439+
36. cd ESPAsyncWebServer
440+
37. git clone https://github.com/me-no-dev/ESPAsyncWebServer .
415441

416442
Connect the Config ESP32 port of the RTK to a USB port on the computer
417443

418-
33. ls /dev/ttyUSB*
444+
38. ls /dev/ttyUSB*
419445

420446
Enable the libraries in the Arduino IDE
421447

422-
34. arduino
448+
39. arduino
423449
1. From the menu, click on File
424450
2. Click on Open...
425451
3. Select the ~/SparkFun/RTK/Firmware/RTK_Surveyor/RTK_Surveyor.ino file
@@ -483,8 +509,8 @@ Enable the libraries in the Arduino IDE
483509
30. From the menu click on File
484510
31. Click on Quit
485511

486-
35. cd ~/SparkFun/RTK/
487-
36. cp Firmware/app3M_fat9M_16MB.csv ~/.arduino15/packages/esp32/hardware/esp32/2.0.2/tools/partitions/app3M_fat9M_16MB.csv
512+
40. cd ~/SparkFun/RTK/
513+
41. cp Firmware/app3M_fat9M_16MB.csv ~/.arduino15/packages/esp32/hardware/esp32/2.0.2/tools/partitions/app3M_fat9M_16MB.csv
488514

489515
### Arduino CLI
490516

0 commit comments

Comments
 (0)