Skip to content

V1.6.0 #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 52 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
20d0a26
v1.6.0 - install the latest esptool for the build
PaulZC Nov 18, 2023
844a7ca
Update au_act_esptool.py
PaulZC Nov 18, 2023
4982679
Use serial, not pyserial
PaulZC Nov 18, 2023
34c0f37
Let esptools install pyserial
PaulZC Nov 18, 2023
4aabee7
Add intelhex
PaulZC Nov 18, 2023
23a1176
Add argparse
PaulZC Nov 19, 2023
2825f99
Use argparse 1.1
PaulZC Nov 20, 2023
f9b9f08
Add trace, comment port and baud for flash_id
PaulZC Nov 20, 2023
f4e44ab
Update build-windows.yml
PaulZC Nov 20, 2023
3357ee0
Revert to esptool 4.6.2
PaulZC Nov 20, 2023
e30b328
Find stub flasher json files (build-windows)
PaulZC Jan 2, 2024
05db9d5
Fix comment?
PaulZC Jan 2, 2024
4520956
Fix comment?
PaulZC Jan 2, 2024
88e47c2
Fix that typo!
PaulZC Jan 2, 2024
9f9f951
Fix echo. Add windows workflow_dispatch
PaulZC Jan 2, 2024
27be8ac
Update build-windows.yml
PaulZC Jan 2, 2024
bd680ba
Add non-release-build-windows_only
PaulZC Jan 2, 2024
216d669
Fix that typo. Rename non-release-build-windows-only.yml
PaulZC Jan 2, 2024
24a2b49
Update build-windows.yml
PaulZC Jan 2, 2024
7d6359c
Update build-windows.yml
PaulZC Jan 2, 2024
1b6e03f
Use powershell
PaulZC Jan 2, 2024
1cacb4b
Update build-linux.yml
PaulZC Jan 2, 2024
afd7546
Try esptool folder
PaulZC Jan 2, 2024
4e6d8ec
Update Linux and MacOS builds
PaulZC Jan 2, 2024
8f3f835
Update Linux and MacOS builds
PaulZC Jan 2, 2024
3a3e225
Delete non-release-build-windows-only.yml
PaulZC Jan 2, 2024
74ec383
Change --flash_size to keep for esptool 4.7.0
PaulZC Jan 3, 2024
0499dae
Remove unnecessary --add_binary's - the files are all in resource any…
PaulZC Jan 3, 2024
605fee7
Change --flash_size back to detect
PaulZC Jan 3, 2024
57aa9ca
Clear the sha_implies_keep (hash checksum) byte
PaulZC Jan 3, 2024
631cc2c
Update build-macos.yml
PaulZC Jan 3, 2024
fafaade
Update build-macos.yml
PaulZC Jan 3, 2024
02cc2c1
Update build-macos.yml
PaulZC Jan 3, 2024
6bd5195
Delete old screenshots
PaulZC Jan 4, 2024
3bd6fee
Manually copy stub_flasher files to Contents/MacOS
PaulZC Jan 4, 2024
0679965
Update build-macos.yml
PaulZC Jan 4, 2024
e464f9b
Update build-macos.yml
PaulZC Jan 4, 2024
ff74ca5
Add some dots
PaulZC Jan 4, 2024
ef7f5d5
Update au_act_esptool.py
PaulZC Jan 5, 2024
d3f2a0f
Update au_act_esptool.py
PaulZC Jan 5, 2024
c924845
More MacOS stub_flasher tweaks
PaulZC Jan 5, 2024
b90f730
Fix os.path
PaulZC Jan 5, 2024
5222ae5
More MacOS stub_flasher tweaks
PaulZC Jan 5, 2024
a4eaa98
More MacOS stub_flasher tweaks
PaulZC Jan 5, 2024
af1b38d
Update au_act_esptool.py
PaulZC Jan 5, 2024
d77b667
Update au_act_esptool.py
PaulZC Jan 5, 2024
87d8f73
Update au_act_esptool.py
PaulZC Jan 6, 2024
8be3000
Update au_act_esptool.py
PaulZC Jan 6, 2024
f92f755
Update au_act_esptool.py
PaulZC Jan 6, 2024
d4d23a3
Comment STUBS_DIR hackiness for now
PaulZC Jan 6, 2024
920c9d1
Limit baud rate to 460800 on Darwin (MacOS)
PaulZC Jan 6, 2024
f9d8244
Final tweaks?
PaulZC Jan 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ jobs:
# Setup python
- name: System Setup
run: |
pip3 install pyinstaller pyqt5 darkdetect pyserial
pip install pyinstaller pyqt5 darkdetect argparse intelhex esptool

# Build the installer
- name: Build Linux Installer
run: |
pyinstaller --onefile --clean --name RTKUploader --noconsole --distpath=. --icon=RTK_Firmware_Uploader/resource/RTK.ico --add-binary="RTK_Firmware_Uploader/resource/RTK_Surveyor_Partitions_4MB.bin:." --add-binary="RTK_Firmware_Uploader/resource/RTK_Surveyor_Partitions_16MB.bin:." --add-binary="RTK_Firmware_Uploader/resource/RTK_Surveyor.ino.bootloader.bin:." --add-binary="RTK_Firmware_Uploader/resource/boot_app0.bin:." --add-binary="RTK_Firmware_Uploader/resource/RTK.png:." --add-data="RTK_Firmware_Uploader/resource/*:resource/" RTK_Firmware_Upload.py
ESPTOOL_LOCATION=$(pip show esptool | grep "Location: " | cut -c 11- | tr -d '\n')
ESPTOOL_TARGETS=$(echo "${ESPTOOL_LOCATION}/esptool/targets/stub_flasher/*.json:./esptool/targets/stub_flasher/")
pyinstaller --onefile --clean --name RTKUploader --noconsole --distpath=. --icon=RTK_Firmware_Uploader/resource/RTK.ico --add-data="RTK_Firmware_Uploader/resource/*:resource/" --add-data="${ESPTOOL_TARGETS}" RTK_Firmware_Upload.py
gzip RTKUploader
mv RTKUploader.gz RTKUploader.linux.gz

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ jobs:
# Setup python
- name: System Setup
run: |
pip3 install pyserial pyinstaller Pillow pyqt5 darkdetect
pip install pyinstaller Pillow pyqt5 darkdetect argparse intelhex esptool
brew install create-dmg

# Build the installer
- name: Build Mac Installer
run: |
pyinstaller --windowed -n RTKUploader --noconsole --distpath=. --icon=RTK_Firmware_Uploader/resource/RTK.ico --add-binary="RTK_Firmware_Uploader/resource/RTK_Surveyor_Partitions_4MB.bin:." --add-binary="RTK_Firmware_Uploader/resource/RTK_Surveyor_Partitions_16MB.bin:." --add-binary="RTK_Firmware_Uploader/resource/RTK_Surveyor.ino.bootloader.bin:." --add-binary="RTK_Firmware_Uploader/resource/boot_app0.bin:." --add-binary="RTK_Firmware_Uploader/resource/RTK.png:." --add-data="RTK_Firmware_Uploader/resource/*:resource/" RTK_Firmware_Upload.py
ESPTOOL_LOCATION=$(pip show esptool | grep "Location: " | cut -c 11- | tr -d '\n')
ESPTOOL_TARGETS=$(echo "${ESPTOOL_LOCATION}/esptool/targets/stub_flasher/*.json:./esptool/targets/stub_flasher/")
pyinstaller --windowed -n RTKUploader --noconsole --distpath=. --icon=RTK_Firmware_Uploader/resource/RTK.ico --add-data="RTK_Firmware_Uploader/resource/*:resource/" --add-data="${ESPTOOL_TARGETS}" RTK_Firmware_Upload.py
mkdir tmp
mv "RTKUploader.app" "tmp/"
create-dmg --volicon "RTK_Firmware_Uploader/resource/sparkdisk.icns" --background "RTK_Firmware_Uploader/resource/sfe_logo_med.png" --hide-extension "RTKUploader.app" --icon "RTKUploader.app" 100 100 --window-size 600 440 --app-drop-link 400 100 "RTKUploader.dmg" "tmp/"
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ jobs:
# Setup python
- name: System Setup
run: |
pip3 install pyinstaller pyqt5 darkdetect pyserial
pip install pyinstaller pyqt5 darkdetect argparse intelhex esptool

# Build the installer
- name: Build Windows Installer
shell: powershell
run: |
pyinstaller --onefile --clean --name RTKUploader --noconsole --distpath=. --icon=RTK_Firmware_Uploader\resource\RTK.ico --add-binary="RTK_Firmware_Uploader\resource\RTK_Surveyor_Partitions_4MB.bin;." --add-binary="RTK_Firmware_Uploader\resource\RTK_Surveyor_Partitions_16MB.bin;." --add-binary="RTK_Firmware_Uploader\resource\RTK_Surveyor.ino.bootloader.bin;." --add-binary="RTK_Firmware_Uploader\resource\boot_app0.bin;." --add-binary="RTK_Firmware_Uploader\resource\RTK.png;." --add-data="RTK_Firmware_Uploader\resource\*;resource\" RTK_Firmware_Upload.py
$ESPTOOL_TARGETS = echo "$(pip show esptool | findstr "Location: ")"
$ESPTOOL_TARGETS = $ESPTOOL_TARGETS.Substring(10)
$ESPTOOL_TARGETS = echo "${ESPTOOL_TARGETS}\esptool\targets\stub_flasher\*.json;.\esptool\targets\stub_flasher\"
pyinstaller --onefile --clean --name RTKUploader --noconsole --distpath=. --icon=RTK_Firmware_Uploader\resource\RTK.ico --add-data="RTK_Firmware_Uploader\resource\*;resource\" --add-data="${ESPTOOL_TARGETS}" RTK_Firmware_Upload.py

- name: Compress Installer
shell: powershell
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#Python
__pycache__/
*.py[co]

#VSCode

/.vscode/*
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ The RTK Firmware Uploader is a simple, easy to use method for updating the firmw

If you need to install the application, see the [Installation Section](#installation) of this page.

## Notes:

From v1.6.0, this GUI does not contain a copy of ```esptool.py```. Instead the latest ```esptool.py``` is installed and used by the build workflow. If you want to run ```RTK_Firmware_Uploader.py``` locally, you will need to ```pip install esptool``` first.

# Using the RTK Firmware Uploader

Expand Down
3 changes: 2 additions & 1 deletion RTK_Firmware_Uploader/RTK_Firmware_Uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,8 @@ def update_baud_rates(self) -> None:
# Highest speed first so code defaults to that
# if settings.value(SETTING_BAUD_RATE) is None
self.baud_combobox.clear()
self.baud_combobox.addItem("921600", 921600)
if (platform.system() != "Darwin"): # 921600 fails on MacOS
self.baud_combobox.addItem("921600", 921600)
self.baud_combobox.addItem("460800", 460800)
self.baud_combobox.addItem("115200", 115200)

Expand Down
33 changes: 24 additions & 9 deletions RTK_Firmware_Uploader/au_act_esptool.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
from .au_action import AxAction, AxJob
from .esptool import main as esptool_main
from .esptool import ESPLoader
from .esptool import UnsupportedCommandError
from .esptool import NotSupportedError
from .esptool import NotImplementedInROMError
from .esptool import FatalError

import esptool # pip install esptool

# # When I couldn't get the windowed executable to work on MacOS, I suspected that esptool still could not
# # find the stub_flasher json files. Turns out it was actually the baud rate that was the issue...
# # 921600 fails on my Mac Mini, but 460800 works fine...
# # I'm leaving the following commented code for future reference. I really like the exec trick!
#
# from platform import system
# import os.path
# import sys
# if (system() == "Darwin") and hasattr(sys, '_MEIPASS'): # Fix for MacOS pyinstaller windowed executable
# head_tail = os.path.split(os.path.dirname(__file__))
# base_path = os.path.abspath(head_tail[0])
# STUBS_DIR = os.path.join(base_path, "esptool", "targets", "stub_flasher")
# # Python hackiness: change the path to stub json files in the context of the esptool
# # module, so it edits the esptool's global variables
# exec(
# "loader.STUBS_DIR = '{}'".format(STUBS_DIR),
# esptool.__dict__,
# esptool.__dict__,
# )

#--------------------------------------------------------------------------------------
# action testing
Expand All @@ -20,7 +35,7 @@ def __init__(self) -> None:
def run_job(self, job:AxJob):

try:
esptool_main(job.command)
esptool.main(job.command)

except Exception:
return 1
Expand All @@ -38,7 +53,7 @@ def __init__(self) -> None:
def run_job(self, job:AxJob):

try:
esptool_main(job.command)
esptool.main(job.command)

except Exception:
return 1
Expand All @@ -56,7 +71,7 @@ def __init__(self) -> None:
def run_job(self, job:AxJob):

try:
esptool_main(job.command)
esptool.main(job.command)

except Exception:
return 1
Expand Down
Loading