@@ -122,6 +122,163 @@ Where */dev/ttyUSB0* is replaced with the port that the RTK product enumerated a
122122
123123Upon completion, your RTK device will reset and power down.
124124
125+ ## SparkFun RTK Build Environment - Ubuntu 20.04
126+
127+ Execute the following commands to create the build environment for the SparkFun RTK Firmware:
128+
129+ 1 . sudo adduser $USER dialout
130+ 2 . sudo shutdown -r 0
131+
132+ Reboot to ensure that the dialout privilege is available to the user
133+
134+ 3 . sudo add-apt-repository universe
135+ 4 . sudo apt update
136+ 5 . sudo apt install -y git gitk git-cola curl minicom python2
137+ 6 . sudo ln -s /usr/bin/python2.7 /usr/bin/python
138+ 7 . curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
139+ 8 . sudo python2 get-pip.py
140+ 9 . sudo pip install pyserial
141+ 10 . mkdir ~ /SparkFun
142+ 11 . cd ~ /SparkFun
143+ 12 . mkdir esptool
144+ 13 . cd esptool
145+ 14 . git clone https://github.com/espressif/esptool .
146+ 15 . cd ~ /SparkFun
147+ 16 . nano serial-port.sh
148+
149+ Insert the following text into the file:
150+
151+ #!/bin/bash
152+ # serial-port.sh
153+ #
154+ # Shell script to read the serial data from the the RTK Express ESP32 port
155+ #
156+ # Parameters:
157+ # 1: ttyUSBn
158+ #
159+ sudo minicom -b 115200 -8 -D /dev/$1 < /dev/tty
160+
161+ 17 . chmod +x serial-port.sh
162+ 18 . nano new-firmware.sh
163+
164+ Insert the following text into the file:
165+
166+ #!/bin/bash
167+ # new-firmware.sh
168+ #
169+ # Shell script to load firmware into the RTK Express via the ESP32 port
170+ #
171+ # Parameters:
172+ # 1: ttyUSBn
173+ # 2: Firmware file
174+ #
175+ sudo python ~/SparkFun/esptool/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 \
176+ 0x1000 ~/SparkFun/RTK/Binaries/bin/RTK_Surveyor.ino.bootloader.bin \
177+ 0x8000 ~/SparkFun/RTK/Binaries/bin/RTK_Surveyor.ino.partitions.bin \
178+ 0xe000 ~/SparkFun/RTK/Binaries/bin/boot_app0.bin \
179+ 0x10000 $2
180+
181+ 19 . chmod +x new-firmware.sh
182+ 20 . mkdir ~ /SparkFun/RTK
183+ 21 . cd ~ /SparkFun/RTK
184+ 22 . git clone https://github.com/sparkfun/SparkFun_RTK_Firmware .
185+ 23 . mkdir ~ /SparkFun/arduino
186+ 24 . cd ~ /SparkFun/arduino
187+ 25 . wget https://downloads.arduino.cc/arduino-1.8.15-linux64.tar.xz
188+ 26 . tar -xvf ./arduino-1.8.15-linux64.tar.xz
189+ 27 . cd arduino-1.8.15/
190+ 28 . sudo ./install.sh
191+
192+ Add the ESP32 support
193+
194+ 29 . arduino
195+ 1 . Click on File in the menu bar
196+ 2 . Click on Preferences
197+ 3 . Go down to the Additional Boards Manager URLs text box
198+ 4 . Only if the textbox already has a value, go to the end of the value or values and add a comma
199+ 5 . Add the link: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
200+ 6 . Note the value in Sketchbook location
201+ 7 . Click the OK button
202+ 8 . Click on File in the menu bar
203+ 9 . Click on Quit
204+
205+ Get the Necessary External Libraries
206+
207+ 30 . cd ~ /Arduino/libraries
208+
209+ This path is the Sketchbook location from above
210+
211+ 31 . mkdir AsyncTCP
212+ 32 . cd AsyncTCP/
213+ 33 . git clone https://github.com/me-no-dev/AsyncTCP.git .
214+ 34 . cd ..
215+ 35 . mkdir ESPAsyncWebServer
216+ 36 . cd ESPAsyncWebServer
217+ 37 . git clone https://github.com/me-no-dev/ESPAsyncWebServer .
218+
219+ Connect the Config ESP32 port of the RTK to a USB port on the computer
220+
221+ 38 . ls /dev/ttyUSB*
222+
223+ Enable the libraries in the Arduino IDE
224+
225+ 39 . arduino
226+ 1 . From the menu, click on File
227+ 2 . Click on Open...
228+ 3 . Select the ~ /SparkFun/RTK/Firmware/RTK_Surveyor/RTK_Surveyor.ino file
229+ 4 . Click on the Open button
230+ 5 . From the menu, click on Tools
231+ 6 . Click on Board
232+ 7 . Click on Board Manager…
233+ 8 . Click on esp32
234+ 9 . Click on the Install button in the lower right
235+ 10 . Close the Board Manager...
236+ 11 . From the menu, click on Tools
237+ 12 . Click on Board
238+ 13 . Click on ESP32 Arduino
239+ 14 . Click on ESP32 Dev Module
240+ 15 . From the menu, click on Tools
241+ 16 . Click on Flash Size
242+ 17 . Select 16MB
243+ 18 . From the menu, click on Tools
244+ 19 . Click on Port, Select the port that was displayed in step 38 above
245+ 20 . Select /dev/ttyUSB0
246+ 21 . From the menu, click on Tools
247+ 22 . Click on Partition Scheme
248+ 23 . Click on 16M Flash (3MB APP/9MB FATFS)
249+ 24 . From the menu, click on Tools
250+ 25 . Click on Manage Libraries…
251+ 26 . For each of the following libraries:
252+ 27 . Locate each of the libraries in the list below
253+ 28 . Click on the library
254+ 29 . Click on the Install button in the lower right
255+
256+ * ArduinoJson
257+ * ESP32Time
258+ * JC_Button
259+ * MAX17048 - Used for “Test Sketch/Batt_Monitor”
260+ * PubSubClient
261+ * SdFat
262+ * SparkFun LIS2DH12 Accelerometer Arduino Library
263+ * SparkFun MAX1704x Fuel Gauge Arduino Library
264+ * SparkFun Qwiic OLED Graphics Library
265+ * SparkFun u-blox GNSS Arduino Library
266+
267+ 30 . Click on the Close button
268+ 31 . From the menu click on File
269+ 32 . Click on Quit
270+
271+ 40 . cd ~ /SparkFun/RTK/
272+ 41 . cp Firmware/app3M_fat9M_16MB.csv ~ /.arduino15/packages/esp32/hardware/esp32/2.0.3/tools/partitions/app3M_fat9M_16MB.csv
273+
274+ ## Build the SparkFun RTK Firmware - Linux
275+
276+ In a terminal window:
277+
278+ 1 . arduino
279+ 1 . From the menu click on Sketch
280+ 2 . Click on either Compile or Upload
281+
125282## Compiling from Source
126283
127284The SparkFun RTK firmware is compiled using Arduino (currently v1.8.15). To compile:
@@ -226,4 +383,4 @@ This binary file can be found in the [NEO Firmware](https://github.com/sparkfun/
226383
227384* v1.04 Initial release.
228385
229- As of writing, no addtional releases of the NEO-D9S firmware have been made.
386+ As of writing, no addtional releases of the NEO-D9S firmware have been made.
0 commit comments