This commit is contained in:
Mateusz Faderewski 2023-02-24 20:40:11 +01:00
parent c03f85dcca
commit fe762ff94d
6 changed files with 31 additions and 22 deletions

View File

@ -20,22 +20,27 @@ jobs:
- name: Download SummerCart64 repository
uses: actions/checkout@v3
- name: Set SC64 version
run: SC64_VERSION=-${{ github.ref_name }}
- name: Build everything
run: ./docker_build.sh release --force-clean
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: SC64
path: SC64.zip
name: sc64-pkg${{ env.SC64_VERSION }}
path: |
sc64-extra${{ env.SC64_VERSION }}.zip
sc64-firmware${{ env.SC64_VERSION }}.bin
- name: Upload release assets
if: github.event_name == 'release' && github.event.action == 'created'
uses: softprops/action-gh-release@v0.1.15
with:
files: |
SC64.zip
sw/update/sc64_firmware.bin
sc64-extra${{ env.SC64_VERSION }}.zip
sc64-firmware${{ env.SC64_VERSION }}.bin
build-sc64-py:
strategy:
@ -101,19 +106,19 @@ jobs:
run: |
mkdir package
pushd dist
tar ${{ matrix.package-options }} ../package/${{ matrix.package-name }}.${{ matrix.package-extension }} *
tar ${{ matrix.package-options }} ../package/${{ matrix.package-name }}-${{ github.ref_name }}.${{ matrix.package-extension }} *
popd
working-directory: sw/pc
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.package-name }}
path: sw/pc/package/${{ matrix.package-name }}.${{ matrix.package-extension }}
name: ${{ matrix.package-name }}-${{ github.ref_name }}
path: sw/pc/package/${{ matrix.package-name }}-${{ github.ref_name }}.${{ matrix.package-extension }}
- name: Upload release assets
if: github.event_name == 'release' && github.event.action == 'created'
uses: softprops/action-gh-release@v0.1.15
with:
files: |
sw/pc/package/${{ matrix.package-name }}.${{ matrix.package-extension }}
sw/pc/package/${{ matrix.package-name }}-${{ github.ref_name }}.${{ matrix.package-extension }}

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
**/.DS_Store
**/.vscode/
**/*.bak
**/*.bin
**/*.zip
!**/.vscode/tasks.json

View File

@ -2,13 +2,13 @@
set -e
PACKAGE_FILE_NAME="SC64"
PACKAGE_FILE_NAME="sc64-extra"
TOP_FILES=(
"./sw/pc/primer.py"
"./sw/pc/requirements.txt"
"./sw/pc/sc64.py"
"./sw/update/sc64_firmware.bin"
"./sw/update/sc64-firmware.bin"
)
FILES=(
@ -86,7 +86,7 @@ build_update () {
pushd sw/update > /dev/null
if [ "$FORCE_CLEAN" = true ]; then
rm -f ./sc64_firmware.bin
rm -f ./sc64-firmware.bin
fi
GIT_INFO=""
if [ ! -z "${GIT_BRANCH}" ]; then GIT_INFO+="branch: [$GIT_BRANCH] "; fi
@ -100,7 +100,7 @@ build_update () {
--fpga ../../fw/project/lcmxo2/impl1/sc64_impl1.jed \
--boot ../bootloader/build/bootloader.bin \
--primer ../controller/build/primer/primer.bin \
sc64_firmware.bin
sc64-firmware.bin
popd > /dev/null
BUILT_UPDATE=true
@ -114,10 +114,12 @@ build_release () {
if [ -e "./${PACKAGE_FILE_NAME}.zip" ]; then
rm -f "./${PACKAGE_FILE_NAME}.zip"
fi
PACKAGE="./${PACKAGE_FILE_NAME}.zip"
PACKAGE="./${PACKAGE_FILE_NAME}${SC64_VERSION}.zip"
zip -j -r $PACKAGE ${TOP_FILES[@]}
zip -r $PACKAGE ${FILES[@]}
cp sw/update/sc64-firmware.bin ./sc64-firmware${SC64_VERSION}.bin
BUILT_RELEASE=true
}

View File

@ -27,6 +27,7 @@ docker run \
-e GIT_TAG="$GIT_TAG" \
-e GIT_SHA="$GIT_SHA" \
-e GIT_MESSAGE="$GIT_MESSAGE" \
-e SC64_VERSION=${SC64_VERSION:-""} \
$BUILDER_IMAGE \
./build.sh $@

View File

@ -14,9 +14,9 @@
**Windows platform: replace `./sc64` in examples below with `sc64.exe`**
1. Download the latest `sc64-{os}` (choose OS matching your system) and `sc64_firmware.bin` from GitHub releases page
2. Extract `sc64-{os}` package contents to a folder and place `sc64_firmware.bin` inside it
3. Update SC64 firmware to the latest version with `./sc64 --update-firmware sc64_firmware.bin`
1. Download the latest `sc64-{os}-{version}` (choose OS matching your system) and `sc64-firmware-{version}.bin` from GitHub releases page
2. Extract `sc64-{os}-{version}` package contents to a folder and place `sc64-firmware-{version}.bin` inside it
3. Update SC64 firmware to the latest version with `./sc64 --update-firmware sc64-firmware-{version}.bin`
4. Run `./sc64 --print-state` to check if SC64 is detected correctly
---
@ -25,9 +25,9 @@
Keeping SC64 firmware up to date is highly recommended. `sc64` executable is tightly coupled with specific firmware versions and will error out when it detects unsupported firmware version.
To download and backup current version of SC64 firmware run `./sc64 --backup-firmware sc64_firmware_backup.bin`
To download and backup current version of SC64 firmware run `./sc64 --backup-firmware sc64-firmware-backup.bin`
To update SC64 firmware run `./sc64 --update-firmware sc64_firmware.bin`
To update SC64 firmware run `./sc64 --update-firmware sc64-firmware-{version}.bin`
---

View File

@ -11,7 +11,7 @@
## Step by step guide how to make SC64
All necessary manufacturing files are packaged in every `SC64.zip` file in GitHub releases. Please download latest release before proceeding with the instructions.
All necessary manufacturing files are packaged in every `sc64-extra-{version}.zip` file in GitHub releases. Please download latest release before proceeding with the instructions.
---
@ -85,9 +85,9 @@ Second, program FPGA, microcontroller and Flash memory:
4. Check in device manager which port number `COMx` is assigned to serial adapter
5. Connect SC64 board to the PC with USB-C cable (***IMPORTANT:*** connect it to the same computer as serial adapter)
6. Locate `primer.py` script in root folder
7. Make sure these files are located in the same folder as `primer.py` script: `requirements.txt`, `sc64.py`, `sc64_firmware.bin`
7. Make sure these files are located in the same folder as `primer.py` script: `requirements.txt`, `sc64.py`, `sc64-firmware.bin`
8. Run `pip3 install -r requirements.txt` to install required python packages
9. Run `python3 primer.py COMx sc64_firmware.bin` (replace `COMx` with port located in step **4**)
9. Run `python3 primer.py COMx sc64-firmware.bin` (replace `COMx` with port located in step **4**)
10. Follow the instructions on the screen
11. Wait until programming process has finished (**DO NOT STOP PROGRAMMING PROCESS OR DISCONNECT SC64 BOARD FROM PC**, doing so might irrecoverably break programming through UART header and you would need to program microcontroller, FPGA and bootloader with separate dedicated programming interfaces through *Tag-Connect* connector on the PCB)
@ -99,4 +99,4 @@ Congratulations! Your SC64 flashcart should be ready for use!
*`primer.py` threw error on `Bootloader -> SC64 FLASH` step*
This issue can be attributed to incorrectly programmed FT232H EEPROM in the first programming step. Check again in `FT_PROG` program if device was configured properly. Once FPGA and microcontroller has been programmed successfully `primer.py` script needs to be run in special mode. Please use command `python3 primer.py COMx sc64_firmware.bin --only-bootloader` to try programming bootloader again.
This issue can be attributed to incorrectly programmed FT232H EEPROM in the first programming step. Check again in `FT_PROG` program if device was configured properly. Once FPGA and microcontroller has been programmed successfully `primer.py` script needs to be run in special mode. Please use command `python3 primer.py COMx sc64-firmware.bin --only-bootloader` to try programming bootloader again.