Skip to content

Commit eed8dbe

Browse files
authored
Patch 1.6.0: Support for Raspberry Pi PICO2 (#17)
* Initial commit Refactoring installer * Adding multimaterial case * Adding support for PICO2 * Adding hardware ID for PICO2 * Changing versions * Changing docker image * Fixing version * Changing platform * Fixing docker image name * Changing back name * Removing ref * Further removing references * Updating README.md
1 parent 317fbf4 commit eed8dbe

File tree

16 files changed

+116
-8
lines changed

16 files changed

+116
-8
lines changed

.github/workflows/build.yml

+50-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ env:
1212
BUILD_TYPE: Release
1313
PROGNAME: pico-sst39sf0x0-programmer
1414
FIRMWARE: pico-sst39sf0x0-programmer-firmware
15+
FIRMWARE2: pico2-sst39sf0x0-programmer-firmware
1516
EXEC: pico-sst39sf0x0-programmer.exe
1617

1718
jobs:
@@ -113,7 +114,9 @@ jobs:
113114
- name: Copy assets
114115
run: copy gui\assets\icon\eeprom_icon.ico gui\packaging\packages\com.vendor.product\data\eeprom_icon.ico
115116
- name: Create installer
116-
run: ${{github.workspace}}\..\Qt\Tools\QtInstallerFramework\4.7\bin\binarycreator.exe -c config\config.xml -p packages ${{env.PROGNAME}}-installer-win64.exe
117+
run: |
118+
dir ${{github.workspace}}\..\Qt\Tools\QtInstallerFramework
119+
${{github.workspace}}\..\Qt\Tools\QtInstallerFramework\4.7\bin\binarycreator.exe -c config\config.xml -p packages ${{env.PROGNAME}}-installer-win64.exe
117120
working-directory: gui/packaging
118121
- name: Upload installer
119122
uses: actions/upload-artifact@v3
@@ -164,7 +167,7 @@ jobs:
164167
build-firmware:
165168
runs-on: ubuntu-latest
166169
container:
167-
image: ghcr.io/ifilot/pico:latest
170+
image: ghcr.io/ifilot/pico:v0.2.0
168171
steps:
169172
- uses: actions/checkout@v3
170173
- name: Compile firmware
@@ -199,4 +202,49 @@ jobs:
199202
upload_url: ${{ needs.create-release.outputs.upload_url }}
200203
asset_path: ${{env.FIRMWARE}}.uf2
201204
asset_name: ${{env.FIRMWARE}}.uf2
205+
asset_content_type: application/octet-stream
206+
207+
208+
#
209+
# PICO2 firmware
210+
#
211+
build-firmware-pico2:
212+
runs-on: ubuntu-latest
213+
container:
214+
image: ghcr.io/ifilot/pico:v0.2.0
215+
steps:
216+
- uses: actions/checkout@v3
217+
- name: Compile firmware
218+
shell: bash
219+
run: |
220+
mkdir build && cd build
221+
cmake -DPICO_PLATFORM=rp2350-arm-s -DPICO_BOARD=pico2 ../firmware
222+
make -j
223+
cp -v ${{env.FIRMWARE}}.uf2 ${{env.FIRMWARE2}}.uf2
224+
- name: Upload firmware .uf2 file
225+
uses: actions/upload-artifact@v3
226+
with:
227+
name: ${{env.FIRMWARE2}}.uf2
228+
path: ./build/${{env.FIRMWARE2}}.uf2
229+
230+
deploy-firmware-pico2:
231+
runs-on: ubuntu-latest
232+
needs: [build-firmware-pico2, create-release]
233+
permissions: write-all
234+
if: startsWith(github.ref, 'refs/tags/v')
235+
steps:
236+
- name: Download artifact
237+
uses: actions/download-artifact@v3
238+
with:
239+
name: ${{env.FIRMWARE2}}.uf2
240+
path: ./
241+
- name: Upload Release Asset
242+
id: upload-release-asset
243+
uses: actions/upload-release-asset@v1
244+
env:
245+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
246+
with:
247+
upload_url: ${{ needs.create-release.outputs.upload_url }}
248+
asset_path: ${{env.FIRMWARE2}}.uf2
249+
asset_name: ${{env.FIRMWARE2}}.uf2
202250
asset_content_type: application/octet-stream

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ below.
9898

9999
Download the latest version of the binaries via the links below.
100100

101-
* [Firmware (.uf2 file)](https://github.com/ifilot/pico-sst39sf0x0-programmer/releases/latest/download/pico-sst39sf0x0-programmer-firmware.uf2)
101+
* [Firmware PICO (.uf2 file)](https://github.com/ifilot/pico-sst39sf0x0-programmer/releases/latest/download/pico-sst39sf0x0-programmer-firmware.uf2)
102+
* [Firmware PICO2 (.uf2 file)](https://github.com/ifilot/pico-sst39sf0x0-programmer/releases/latest/download/pico2-sst39sf0x0-programmer-firmware.uf2)
102103
* [GUI Installer](https://github.com/ifilot/pico-sst39sf0x0-programmer/releases/latest/download/pico-sst39sf0x0-programmer-installer-win64.exe)
103104

104105
## License
533 KB
Binary file not shown.

case/multi-material/pico-case-top.stl

1.23 MB
Binary file not shown.

case/multi-material/pico-label.stl

346 KB
Binary file not shown.
165 KB
Binary file not shown.

firmware/constants.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ GPIO19 - LOAD for A16-A19
4545
#define DELAY_READ_VERIFY 1
4646
#define DELAY_WRITE 1
4747
#define DELAY_ADDR 1
48-
#define BOARD_ID "PICOSST39-v1.5.2"
48+
#define BOARD_ID "PICOSST39-v1.6.0"
4949

5050
#define BLOCK_SIZE 0x100
5151
#define SECTOR_SIZE 0x1000

gui/packaging/config/config.xml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Installer>
3+
<Name>PICO SST39SF0x0 Programmer</Name>
4+
<Version>1.5.3</Version>
5+
<Title>PICO SST39SF0x0 Programmer Installer</Title>
6+
<Publisher>retrohacks.nl</Publisher>
7+
<StartMenuDir>retrohacks.nl</StartMenuDir>
8+
<TargetDir>@HomeDir@/retrohacks.nl/pico-sst39sf0x0-programmer-1.5.3</TargetDir>
9+
<RunProgram>@TargetDir@/pico-sst39sf0x0-programmer/</RunProgram>
10+
<RunProgramDescription>PICO SST39SF0x0 Programmer</RunProgramDescription>
11+
</Installer>

gui/packaging/package.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def main():
1414
# set names and folders
1515
variables = {
1616
'publisher': 'retrohacks.nl',
17-
'progfolder': 'PICO SST39SF0x0 Programmer',
17+
'progfolder': 'pico-sst39sf0x0-programmer-' + version,
1818
'executable': 'pico-sst39sf0x0-programmer',
1919
'progdescription': 'PICO SST39SF0x0 Programmer',
2020
'progname': 'PICO SST39SF0x0 Programmer',
@@ -55,7 +55,6 @@ def grab_version():
5555
m = re.match(ptn, line)
5656
if m:
5757
return m.group(1)
58-
5958

6059
if __name__ == '__main__':
6160
main()

gui/packaging/package.sh

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
3+
# clean any previous data
4+
rm -rvf packages/com.vendor.product/data
5+
6+
# create folder
7+
mkdir -v packages/com.vendor.product/data
8+
9+
# copy executable
10+
cp -v ../build/release/pico-sst39sf0x0-programmer.exe packages/com.vendor.product/data
11+
12+
# run windeploy
13+
/c/Qt/6.7.0/mingw_64/bin/windeployqt.exe packages/com.vendor.product/data/pico-sst39sf0x0-programmer.exe --release --force
14+
15+
# copy icon
16+
cp -v ../../gui/assets/icon/eeprom_icon.ico packages/com.vendor.product/data/eeprom_icon.ico
17+
18+
# run script generators
19+
python3 package.py
20+
21+
# run packaging tool
22+
/c/Qt/Tools/QtInstallerFramework/4.8/bin/binarycreator.exe -c config/config.xml -p packages pico-sst39sf0x0-programmer-installer-win64.exe
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
function Component()
2+
{
3+
// default constructor
4+
}
5+
6+
Component.prototype.createOperations = function()
7+
{
8+
component.createOperations();
9+
10+
if (systemInfo.productType === "windows") {
11+
component.addOperation("CreateShortcut", "@TargetDir@/pico-sst39sf0x0-programmer.exe",
12+
"@StartMenuDir@/pico-sst39sf0x0-programmer.lnk",
13+
"workingDirectory=@TargetDir@",
14+
"iconPath=@TargetDir@/eeprom_icon.ico",
15+
"description=Open PICO SST39SF0x0 Programmer");
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Package>
3+
<DisplayName>Core</DisplayName>
4+
<Description>Install PICO SST39SF0x0 Programmer.</Description>
5+
<Version>1.5.3</Version>
6+
<ReleaseDate>2024-06-14</ReleaseDate>
7+
<Default>true</Default>
8+
<Script>installscript.qs</Script>
9+
</Package>

gui/src/config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define _CONFIG_H
2323

2424
#define PROGRAM_NAME "PICO SST39sf0x0 Programmer"
25-
#define PROGRAM_VERSION "1.5.2"
25+
#define PROGRAM_VERSION "1.6.0"
2626
#define UNUSED(x) (void)(x)
2727

2828
#endif // _CONFIG_H

gui/src/mainwindow.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,8 @@ void MainWindow::scan_com_devices() {
421421

422422
// pattern to recognise COM PORTS (same ids as Raspberry Pi Pico)
423423
static const std::vector<std::pair<uint16_t, uint16_t> > patterns = {
424-
std::make_pair<uint16_t, uint16_t>(0x2E8A, 0x0A), // Raspberry PICO
424+
std::make_pair<uint16_t, uint16_t>(0x2E8A, 0x000A), // Raspberry PICO
425+
std::make_pair<uint16_t, uint16_t>(0x2E8A, 0x0009), // Raspberry PICO2
425426
//std::make_pair<uint16_t, uint16_t>(0x2341, 0x36), // Arduino Leonardo / 32u4
426427
//std::make_pair<uint16_t, uint16_t>(0x0403, 0x6001) // FTDI FT232RL
427428

0 commit comments

Comments
 (0)