Compare commits
No commits in common. "master" and "prevent-s3-jtag-enumerate" have entirely different histories.
master
...
prevent-s3
308 changed files with 41360 additions and 11026 deletions
36
.github/actions/setup_toolchain/action.yml
vendored
36
.github/actions/setup_toolchain/action.yml
vendored
|
|
@ -4,8 +4,8 @@ inputs:
|
|||
toolchain:
|
||||
description: 'Toolchain name'
|
||||
required: true
|
||||
toolchain_version:
|
||||
description: 'Toolchain version'
|
||||
toolchain_url:
|
||||
description: 'Toolchain URL or version'
|
||||
required: false
|
||||
|
||||
outputs:
|
||||
|
|
@ -20,44 +20,22 @@ runs:
|
|||
if: inputs.toolchain == 'arm-gcc'
|
||||
uses: carlosperate/arm-none-eabi-gcc-action@v1
|
||||
with:
|
||||
release: '13.3.Rel1'
|
||||
# release: '12.3.Rel1'
|
||||
release: '11.2-2022.02'
|
||||
|
||||
- name: Pull ESP-IDF docker
|
||||
if: inputs.toolchain == 'esp-idf'
|
||||
uses: ./.github/actions/setup_toolchain/espressif
|
||||
with:
|
||||
toolchain: ${{ inputs.toolchain }}
|
||||
toolchain_version: ${{ inputs.toolchain_version }}
|
||||
|
||||
- name: Get Toolchain URL
|
||||
if: >-
|
||||
inputs.toolchain != 'arm-gcc' &&
|
||||
inputs.toolchain != 'esp-idf'
|
||||
id: set-toolchain-url
|
||||
run: |
|
||||
TOOLCHAIN_URL=$(jq -r '."${{ inputs.toolchain }}"' .github/actions/setup_toolchain/toolchain.json)
|
||||
echo "toolchain_url=$TOOLCHAIN_URL"
|
||||
echo "toolchain_url=$TOOLCHAIN_URL" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
toolchain_url: ${{ inputs.toolchain_url }}
|
||||
|
||||
- name: Download Toolchain
|
||||
if: >-
|
||||
inputs.toolchain != 'arm-gcc' &&
|
||||
inputs.toolchain != 'arm-iar' &&
|
||||
inputs.toolchain != 'esp-idf'
|
||||
uses: ./.github/actions/setup_toolchain/download
|
||||
with:
|
||||
toolchain: ${{ inputs.toolchain }}
|
||||
toolchain_url: ${{ steps.set-toolchain-url.outputs.toolchain_url }}
|
||||
|
||||
- name: Set toolchain option
|
||||
id: set-toolchain-option
|
||||
run: |
|
||||
BUILD_OPTION=""
|
||||
if [[ "${{ inputs.toolchain }}" == *"clang"* ]]; then
|
||||
BUILD_OPTION="--toolchain clang"
|
||||
elif [[ "${{ inputs.toolchain }}" == "arm-iar" ]]; then
|
||||
BUILD_OPTION="--toolchain iar"
|
||||
fi
|
||||
echo "build_option=$BUILD_OPTION"
|
||||
echo "build_option=$BUILD_OPTION" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
toolchain_url: ${{ inputs.toolchain_url }}
|
||||
|
|
|
|||
|
|
@ -23,25 +23,11 @@ runs:
|
|||
if: steps.cache-toolchain-download.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
mkdir -p ~/cache/${{ inputs.toolchain }}
|
||||
|
||||
if [[ ${{ inputs.toolchain }} == rx-gcc ]]; then
|
||||
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.run
|
||||
chmod +x toolchain.run
|
||||
./toolchain.run -p ~/cache/${{ inputs.toolchain }}/gnurx -y
|
||||
elif [[ ${{ inputs.toolchain }} == arm-iar ]]; then
|
||||
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O ~/cache/${{ inputs.toolchain }}/cxarm.deb
|
||||
else
|
||||
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.tar.gz
|
||||
tar -C ~/cache/${{ inputs.toolchain }} -xaf toolchain.tar.gz
|
||||
fi
|
||||
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.tar.gz
|
||||
tar -C ~/cache/${{ inputs.toolchain }} -xaf toolchain.tar.gz
|
||||
shell: bash
|
||||
|
||||
- name: Setup Toolchain
|
||||
- name: Set Toolchain Path
|
||||
run: |
|
||||
if [[ ${{ inputs.toolchain }} == arm-iar ]]; then
|
||||
sudo apt-get install -y ~/cache/${{ inputs.toolchain }}/cxarm.deb
|
||||
echo >> $GITHUB_PATH "/opt/iar/cxarm/arm/bin"
|
||||
else
|
||||
echo >> $GITHUB_PATH `echo ~/cache/${{ inputs.toolchain }}/*/bin`
|
||||
fi
|
||||
echo >> $GITHUB_PATH `echo ~/cache/${{ inputs.toolchain }}/*/bin`
|
||||
shell: bash
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ inputs:
|
|||
toolchain:
|
||||
description: 'Toolchain name'
|
||||
required: true
|
||||
toolchain_version:
|
||||
description: 'Toolchain version'
|
||||
toolchain_url:
|
||||
description: 'Toolchain URL or version'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
|
|
@ -22,14 +22,14 @@ runs:
|
|||
id: cache-toolchain-espressif
|
||||
with:
|
||||
path: ${{ env.DOCKER_ESP_IDF }}
|
||||
key: ${{ inputs.toolchain }}-${{ inputs.toolchain_version }}
|
||||
key: ${{ inputs.toolchain }}-${{ inputs.toolchain_url }}
|
||||
|
||||
- name: Pull and Save Docker Image
|
||||
if: steps.cache-toolchain-espressif.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
docker pull espressif/idf:${{ inputs.toolchain_version }}
|
||||
docker pull espressif/idf:${{ inputs.toolchain_url }}
|
||||
mkdir -p $(dirname $DOCKER_ESP_IDF)
|
||||
docker save -o $DOCKER_ESP_IDF espressif/idf:${{ inputs.toolchain_version }}
|
||||
docker save -o $DOCKER_ESP_IDF espressif/idf:${{ inputs.toolchain_url }}
|
||||
du -sh $DOCKER_ESP_IDF
|
||||
shell: bash
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"aarch64-gcc": "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz",
|
||||
"arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-19.1.1/LLVM-ET-Arm-19.1.1-Linux-x86_64.tar.xz",
|
||||
"arm-gcc": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v14.2.1-1.1/xpack-arm-none-eabi-gcc-14.2.1-1.1-linux-x64.tar.gz",
|
||||
"msp430-gcc": "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2",
|
||||
"riscv-gcc": "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz",
|
||||
"rx-gcc": "https://github.com/hathach/rx_device/releases/download/0.0.1/gcc-8.3.0.202411-GNURX-ELF.run",
|
||||
"arm-iar": "https://netstorage.iar.com/FileStore/STANDARD/001/003/583/cxarm-9.60.4.deb"
|
||||
}
|
||||
72
.github/workflows/build.yml
vendored
72
.github/workflows/build.yml
vendored
|
|
@ -53,7 +53,8 @@ jobs:
|
|||
# ---------------------------------------
|
||||
# Build ARM
|
||||
# ---------------------------------------
|
||||
arm-make:
|
||||
arm:
|
||||
#if: false
|
||||
needs: set-matrix
|
||||
uses: ./.github/workflows/build_util.yml
|
||||
strategy:
|
||||
|
|
@ -65,7 +66,7 @@ jobs:
|
|||
- 'lpc55'
|
||||
- 'mimxrt10xx'
|
||||
- 'stm32f3'
|
||||
- 'stm32h7'
|
||||
- 'stm32f4'
|
||||
- 'stm32l4'
|
||||
with:
|
||||
port: ${{ matrix.port }}
|
||||
|
|
@ -73,41 +74,19 @@ jobs:
|
|||
build-system: 'make'
|
||||
toolchain: 'arm-gcc'
|
||||
|
||||
# ---------------------------------------
|
||||
# Build ARM with CMake
|
||||
# ---------------------------------------
|
||||
arm-cmake:
|
||||
needs: set-matrix
|
||||
uses: ./.github/workflows/build_util.yml
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
port:
|
||||
# Alphabetical order by family
|
||||
- 'maxim'
|
||||
# - 'stm32f303disco' # overflows flash
|
||||
- 'stm32f4'
|
||||
- 'stm32h5'
|
||||
with:
|
||||
port: ${{ matrix.port }}
|
||||
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.port].board) }}
|
||||
build-system: 'cmake'
|
||||
toolchain: 'arm-gcc'
|
||||
|
||||
|
||||
# ---------------------------------------
|
||||
# Build ESP
|
||||
# ---------------------------------------
|
||||
espressif:
|
||||
esp:
|
||||
#if: false
|
||||
needs: set-matrix
|
||||
uses: ./.github/workflows/build_util.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
port: 'espressif'
|
||||
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)['espressif'].board) }}
|
||||
build-system: 'make'
|
||||
toolchain: 'esp-idf'
|
||||
toolchain_version: 'v5.3.2'
|
||||
toolchain_url: 'v5.1.1'
|
||||
|
||||
# ---------------------------------------
|
||||
# Build RISC-V
|
||||
|
|
@ -127,6 +106,7 @@ jobs:
|
|||
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.port].board) }}
|
||||
build-system: 'make'
|
||||
toolchain: 'riscv-gcc'
|
||||
toolchain_url: 'https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz'
|
||||
|
||||
# ---------------------------------------
|
||||
# Unit testing with ghostfat
|
||||
|
|
@ -136,3 +116,41 @@ jobs:
|
|||
uses: ./.github/workflows/build_ghostfat.yml
|
||||
with:
|
||||
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)['test_ghostfat'].board) }}
|
||||
|
||||
# ---------------------------------------
|
||||
# Build ARM with CMake
|
||||
# ---------------------------------------
|
||||
arm-cmake:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
board:
|
||||
# Alphabetical order by family
|
||||
- 'metro_m7_1011'
|
||||
# - 'stm32f303disco' # overflows flash
|
||||
- 'stm32f411ve_discovery'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Fetch tags
|
||||
run: git fetch --tags
|
||||
|
||||
- name: Install ARM GCC
|
||||
uses: carlosperate/arm-none-eabi-gcc-action@v1
|
||||
with:
|
||||
release: '11.2-2022.02'
|
||||
|
||||
- name: Get Dependencies
|
||||
run: |
|
||||
sudo apt install -y ninja-build
|
||||
python tools/get_deps.py --board ${{ matrix.board }}
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake . -B _build -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DBOARD=${{ matrix.board }}
|
||||
cmake --build _build
|
||||
|
|
|
|||
4
.github/workflows/build_ghostfat.yml
vendored
4
.github/workflows/build_ghostfat.yml
vendored
|
|
@ -45,7 +45,7 @@ jobs:
|
|||
working-directory: ports/test_ghostfat/_build/${{ matrix.board }}
|
||||
|
||||
- name: Save newly generated self-test images as CI artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ghostfat_${{ matrix.board }}_image
|
||||
name: ghostfat_selftest_images
|
||||
path: ./ports/test_ghostfat/_build/${{ matrix.board }}/ghostfat_${{ matrix.board }}.img.gz.gz
|
||||
|
|
|
|||
43
.github/workflows/build_util.yml
vendored
43
.github/workflows/build_util.yml
vendored
|
|
@ -16,7 +16,7 @@ on:
|
|||
toolchain:
|
||||
required: true
|
||||
type: string
|
||||
toolchain_version:
|
||||
toolchain_url:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ jobs:
|
|||
uses: ./.github/actions/setup_toolchain
|
||||
with:
|
||||
toolchain: ${{ inputs.toolchain }}
|
||||
toolchain_version: ${{ inputs.toolchain_version }}
|
||||
toolchain_url: ${{ inputs.toolchain_url }}
|
||||
|
||||
- name: Get Dependencies
|
||||
run: |
|
||||
|
|
@ -51,19 +51,14 @@ jobs:
|
|||
- name: Build
|
||||
if: inputs.toolchain != 'esp-idf'
|
||||
run: |
|
||||
if [[ ${{ inputs.build-system }} == cmake ]]; then
|
||||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DBOARD=${{ matrix.board }} ports/${{ inputs.port }}
|
||||
cmake --build build
|
||||
else
|
||||
make -C ports/${{ inputs.port }} BOARD=${{ matrix.board }} all self-update copy-artifact
|
||||
if [ -d "ports/${{ inputs.port }}/apps" ]; then
|
||||
for app in ports/${{ inputs.port }}/apps/*/; do if [ $app != 'apps/self_update/' ]; then make -C $app BOARD=${{ matrix.board }} all; fi done
|
||||
fi
|
||||
make -C ports/${{ inputs.port }} BOARD=${{ matrix.board }} all self-update copy-artifact
|
||||
if [ -d "ports/${{ inputs.port }}/apps" ]; then
|
||||
for app in ports/${{ inputs.port }}/apps/*/; do if [ $app != 'apps/self_update/' ]; then make -C $app BOARD=${{ matrix.board }} all; fi done
|
||||
fi
|
||||
|
||||
- name: Build using ESP-IDF docker
|
||||
if: inputs.toolchain == 'esp-idf'
|
||||
run: docker run --rm -v $PWD:/project -w /project espressif/idf:${{ inputs.toolchain_version }} /bin/bash -c "git config --global --add safe.directory /project && idf.py -C ports/espressif -DBOARD=${{ matrix.board }} build"
|
||||
run: docker run --rm -v $PWD:/project -w /project espressif/idf:${{ inputs.toolchain_url }} /bin/bash -c "git config --global --add safe.directory /project && make -C ports/espressif/ BOARD=${{ matrix.board }} all self-update copy-artifact"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
|
@ -73,27 +68,21 @@ jobs:
|
|||
- name: Prepare Release Asset
|
||||
if: github.event_name == 'release'
|
||||
run: |
|
||||
if [ ${{ inputs.toolchain }} == esp-idf ]; then
|
||||
if [ ${{ inputs.toolchain }} == 'esp-idf' ]; then
|
||||
zip -jr tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.zip ${{ env.BIN_PATH }}
|
||||
cp ${{ env.BIN_PATH }}/combined.bin combined.bin
|
||||
[ -f ${{ env.BIN_PATH }}/combined-ota.bin ] && cp ${{ env.BIN_PATH }}/combined-ota.bin combined-ota.bin
|
||||
cp ${{ env.BIN_PATH }}/apps/update-tinyuf2.uf2 update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2
|
||||
cp ${{ env.BIN_PATH }}/update-tinyuf2.uf2 update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2
|
||||
else
|
||||
if [[ ${{ inputs.build-system }} == cmake ]]; then
|
||||
[ -f ${{ env.BIN_PATH }}/apps/update-tinyuf2.uf2 ] && cp ${{ env.BIN_PATH }}/apps/update-tinyuf2.uf2 update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2
|
||||
else
|
||||
[ -f ${{ env.BIN_PATH }}/apps/update-tinyuf2-${{ matrix.board }}.uf2] && cp ${{ env.BIN_PATH }}/apps/update-tinyuf2-${{ matrix.board }}.uf2 update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2
|
||||
fi
|
||||
for f in ${{ env.BIN_PATH }}/*; do mv $f ${f%.*}-${{ github.event.release.tag_name }}."${f#*.}"; done
|
||||
zip -jr tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.zip ${{ env.BIN_PATH }}
|
||||
fi
|
||||
|
||||
- name: Upload Release Asset
|
||||
uses: softprops/action-gh-release@v2
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: github.event_name == 'release'
|
||||
with:
|
||||
files: |
|
||||
tinyuf2-${{ matrix.board }}-*.zip
|
||||
update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2
|
||||
${{ env.BIN_PATH }}/update-tinyuf2-${{ matrix.board }}-*.uf2
|
||||
|
||||
- name: Upload Release Assets To AWS S3
|
||||
env:
|
||||
|
|
@ -101,11 +90,5 @@ jobs:
|
|||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
if: github.event_name == 'release' && inputs.port == 'espressif'
|
||||
run: |
|
||||
if [ -n \"$AWS_ACCESS_KEY_ID\" ]; then
|
||||
aws s3 cp tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.zip s3://adafruit-circuit-python/bootloaders/esp32/${{ matrix.board }}/tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.zip --no-progress --region us-east-1
|
||||
aws s3 cp update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2 s3://adafruit-circuit-python/bootloaders/esp32/${{ matrix.board }}/update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2 --no-progress --region us-east-1
|
||||
aws s3 cp combined.bin s3://adafruit-circuit-python/bootloaders/esp32/${{ matrix.board }}/tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}-combined.bin --no-progress --region us-east-1
|
||||
if [ -f combined-ota.bin ]; then
|
||||
aws s3 cp combined-ota.bin s3://adafruit-circuit-python/bootloaders/esp32/${{ matrix.board }}/tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}-combined-ota.bin --no-progress --region us-east-1
|
||||
fi
|
||||
fi
|
||||
[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.zip s3://adafruit-circuit-python/bootloaders/esp32/tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.zip --no-progress --region us-east-1
|
||||
[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2 s3://adafruit-circuit-python/bootloaders/esp32/update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2 --no-progress --region us-east-1
|
||||
|
|
|
|||
2
.github/workflows/ci_set_matrix.py
vendored
2
.github/workflows/ci_set_matrix.py
vendored
|
|
@ -18,7 +18,7 @@ def set_matrix_json():
|
|||
if b.is_dir():
|
||||
matrix[p.name]['board'].append(b.name)
|
||||
# For quick testing by only build 1 espressif board
|
||||
# if p.name == 'espressif':
|
||||
#if p.name == 'espressif':
|
||||
# break
|
||||
print(json.dumps(matrix))
|
||||
|
||||
|
|
|
|||
2
.github/workflows/codeql-buildscript.sh
vendored
2
.github/workflows/codeql-buildscript.sh
vendored
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
sudo apt-get -y install gcc-arm-none-eabi
|
||||
|
||||
cd ports/stm32f4
|
||||
make BOARD=feather_stm32f405_express get-deps
|
||||
make BOARD=feather_stm32f405_express all
|
||||
|
|
|
|||
25
.github/workflows/codeql.yml
vendored
25
.github/workflows/codeql.yml
vendored
|
|
@ -27,8 +27,8 @@ jobs:
|
|||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners
|
||||
# Consider using larger runners for possible analysis time improvements.
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 360
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-20.04' }}
|
||||
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
|
|
@ -37,7 +37,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'c-cpp' ]
|
||||
language: [ 'cpp' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
|
||||
# Use only 'java' to analyze code written in Java, Kotlin or both
|
||||
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
||||
|
|
@ -49,14 +49,9 @@ jobs:
|
|||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Toolchain
|
||||
uses: ./.github/actions/setup_toolchain
|
||||
with:
|
||||
toolchain: 'arm-gcc'
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
|
|
@ -83,7 +78,7 @@ jobs:
|
|||
./.github/workflows/codeql-buildscript.sh
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
upload: false
|
||||
|
|
@ -112,18 +107,20 @@ jobs:
|
|||
output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
|
||||
|
||||
- name: Upload CodeQL results to code scanning
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
with:
|
||||
sarif_file: ${{ steps.step1.outputs.sarif-output }}
|
||||
category: "/language:${{matrix.language}}"
|
||||
|
||||
- name: Upload CodeQL results as an artifact
|
||||
if: success() || failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: codeql-results
|
||||
path: ${{ steps.step1.outputs.sarif-output }}
|
||||
retention-days: 5
|
||||
|
||||
# - name: Fail if an error is found
|
||||
# run: |
|
||||
# ./.github/workflows/fail_on_error.py ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
|
||||
- name: Fail if an error is found
|
||||
run: |
|
||||
./.github/workflows/fail_on_error.py \
|
||||
${{ steps.step1.outputs.sarif-output }}/cpp.sarif
|
||||
|
|
|
|||
|
|
@ -2,14 +2,7 @@
|
|||
<project version="4">
|
||||
<component name="CMakeSharedSettings">
|
||||
<configurations>
|
||||
<configuration PROFILE_NAME="espressif_esp32s2_devkitc_1" ENABLED="false" TOOLCHAIN_NAME="ESP-IDF" GENERATION_OPTIONS="-DBOARD=espressif_esp32s2_devkitc_1">
|
||||
<ADDITIONAL_GENERATION_ENVIRONMENT>
|
||||
<envs>
|
||||
<env name="ESPBAUD" value="1500000" />
|
||||
</envs>
|
||||
</ADDITIONAL_GENERATION_ENVIRONMENT>
|
||||
</configuration>
|
||||
<configuration PROFILE_NAME="adafruit_feather_esp32s2" ENABLED="false" CONFIG_NAME="Debug" TOOLCHAIN_NAME="ESP-IDF" GENERATION_OPTIONS="-DBOARD=adafruit_feather_esp32s2">
|
||||
<configuration PROFILE_NAME="espressif_esp32s2_devkitc_1" ENABLED="false" CONFIG_NAME="Debug" TOOLCHAIN_NAME="ESP-IDF" GENERATION_OPTIONS="-DBOARD=espressif_esp32s2_devkitc_1">
|
||||
<ADDITIONAL_GENERATION_ENVIRONMENT>
|
||||
<envs>
|
||||
<env name="ESPBAUD" value="1500000" />
|
||||
|
|
@ -23,13 +16,6 @@
|
|||
</envs>
|
||||
</ADDITIONAL_GENERATION_ENVIRONMENT>
|
||||
</configuration>
|
||||
<configuration PROFILE_NAME="adafruit_funhouse_esp32s2" ENABLED="false" CONFIG_NAME="Debug" TOOLCHAIN_NAME="ESP-IDF" GENERATION_OPTIONS="-DBOARD=adafruit_funhouse_esp32s2">
|
||||
<ADDITIONAL_GENERATION_ENVIRONMENT>
|
||||
<envs>
|
||||
<env name="ESPBAUD" value="1500000" />
|
||||
</envs>
|
||||
</ADDITIONAL_GENERATION_ENVIRONMENT>
|
||||
</configuration>
|
||||
<configuration PROFILE_NAME="espressif_esp32s3_devkitc_1" ENABLED="false" CONFIG_NAME="Debug" TOOLCHAIN_NAME="ESP-IDF" GENERATION_OPTIONS="-DBOARD=espressif_esp32s3_devkitc_1">
|
||||
<ADDITIONAL_GENERATION_ENVIRONMENT>
|
||||
<envs>
|
||||
|
|
@ -37,13 +23,6 @@
|
|||
</envs>
|
||||
</ADDITIONAL_GENERATION_ENVIRONMENT>
|
||||
</configuration>
|
||||
<configuration PROFILE_NAME="espressif_esp32s3_devkitm_1" ENABLED="false" TOOLCHAIN_NAME="ESP-IDF" GENERATION_OPTIONS="-DBOARD=espressif_esp32s3_devkitm_1">
|
||||
<ADDITIONAL_GENERATION_ENVIRONMENT>
|
||||
<envs>
|
||||
<env name="ESPBAUD" value="1500000" />
|
||||
</envs>
|
||||
</ADDITIONAL_GENERATION_ENVIRONMENT>
|
||||
</configuration>
|
||||
<configuration PROFILE_NAME="adafruit_feather_esp32s3" ENABLED="false" CONFIG_NAME="Debug" TOOLCHAIN_NAME="ESP-IDF" GENERATION_OPTIONS="-DBOARD=adafruit_feather_esp32s3">
|
||||
<ADDITIONAL_GENERATION_ENVIRONMENT>
|
||||
<envs>
|
||||
|
|
@ -74,15 +53,9 @@
|
|||
</configuration>
|
||||
<configuration PROFILE_NAME="metro_m7_1011" ENABLED="false" CONFIG_NAME="Release" GENERATION_OPTIONS="-DBOARD=metro_m7_1011" BUILD_OPTIONS="-v" />
|
||||
<configuration PROFILE_NAME="metro_m7_1011_sd" ENABLED="false" CONFIG_NAME="Release" GENERATION_OPTIONS="-DBOARD=metro_m7_1011_sd" />
|
||||
<configuration PROFILE_NAME="stm32f303disco" ENABLED="false" CONFIG_NAME="MinSizeRel" GENERATION_OPTIONS="-DBOARD=stm32f303disco" BUILD_OPTIONS="-v" />
|
||||
<configuration PROFILE_NAME="stm32f303disco" ENABLED="false" CONFIG_NAME="MinSizeRel" GENERATION_OPTIONS="-DBOARD=stm32f303disco" />
|
||||
<configuration PROFILE_NAME="stm32f411ve_discovery" ENABLED="false" CONFIG_NAME="MinSizeRel" GENERATION_OPTIONS="-DBOARD=stm32f411ve_discovery" />
|
||||
<configuration PROFILE_NAME="test 4k" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=4k" />
|
||||
<configuration PROFILE_NAME="stm32h503_nucleo" ENABLED="false" CONFIG_NAME="MinSizeRel" GENERATION_OPTIONS="-DBOARD=stm32h503_nucleo" />
|
||||
<configuration PROFILE_NAME="stm32h563_nucleo" ENABLED="false" CONFIG_NAME="MinSizeRel" GENERATION_OPTIONS="-DBOARD=stm32h563_nucleo -DLOGGER=RTT" />
|
||||
<configuration PROFILE_NAME="max32650fthr" ENABLED="false" CONFIG_NAME="MinSizeRel" GENERATION_OPTIONS="-DBOARD=max32650fthr" />
|
||||
<configuration PROFILE_NAME="max32666fthr" ENABLED="false" CONFIG_NAME="MinSizeRel" GENERATION_OPTIONS="-DBOARD=max32666fthr" />
|
||||
<configuration PROFILE_NAME="max32690evkit" ENABLED="false" CONFIG_NAME="MinSizeRel" GENERATION_OPTIONS="-DBOARD=max32690evkit" />
|
||||
<configuration PROFILE_NAME="max78002evkit" ENABLED="false" CONFIG_NAME="MinSizeRel" GENERATION_OPTIONS="-DBOARD=max78002evkit" />
|
||||
</configurations>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<component name="DebugServers">
|
||||
<jlink-debug-target name="imxrt1011" uniqueID="c89c1f7c-1ad4-4697-81c0-0dd105e56880">
|
||||
<debugger version="1">
|
||||
<debugger kind="GDB" isBundled="true" />
|
||||
<env />
|
||||
</debugger>
|
||||
<gdbserver exe="/usr/bin/JLinkGDBServerCLExe" />
|
||||
<console port="19021" />
|
||||
<target device="MIMXRT1011xxx5A" reset-before="false" frequency="16000" />
|
||||
<connection extended-remote="false" port="4444" warmup-ms="500" />
|
||||
<swo />
|
||||
</jlink-debug-target>
|
||||
</component>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<component name="DebugServers">
|
||||
<jlink-debug-target name="stm32f411" uniqueID="a5715613-24cc-4e22-b0c6-21af297cb4cc" selected="true">
|
||||
<debugger version="1">
|
||||
<debugger kind="GDB" isBundled="true" />
|
||||
<env />
|
||||
</debugger>
|
||||
<gdbserver exe="/usr/bin/JLinkGDBServerCLExe" />
|
||||
<console port="19021" />
|
||||
<target device="STM32F411VE" reset-before="false" />
|
||||
<connection extended-remote="false" port="4444" warmup-ms="500" />
|
||||
<swo />
|
||||
</jlink-debug-target>
|
||||
</component>
|
||||
|
|
@ -29,14 +29,13 @@ Supported features are
|
|||
Not all features are implemented for all MCUs, following is supported MCUs and its feature
|
||||
|
||||
| MCU | MSC | Double Reset | Self-update | Write Protection | Neopixel | TFT |
|
||||
|:------------| :--: | :----------: |:-----------:| :--------------: |:--------:| :--: |
|
||||
| :---------- | :--: | :----------: | :---------: | :--------------: | :------: | :--: |
|
||||
| ESP32 S2/S3 | ✔ | Need RC | ✔ | | ✔ | ✔ |
|
||||
| K32L2 | ✔ | ✔ | | | | |
|
||||
| LPC55 | ✔ | ✔ | | | ✔ | |
|
||||
| iMXRT | ✔ | ✔ | ✔ | | ✔ | |
|
||||
| STM32F3 | ✔ | ✔ | ✔ | ✔ | ✔ | |
|
||||
| STM32F4 | ✔ | ✔ | ✔ | ✔ | ✔ | |
|
||||
| STM32H5 | ✔ | ✔ | ✔ | ✔ | | |
|
||||
|
||||
## Build and Flash
|
||||
|
||||
|
|
@ -109,7 +108,12 @@ By default log message is printed via on-board UART which is slow and take lots
|
|||
- Cons: requires jlink as the debugger.
|
||||
- Pros: work with most if not all MCUs
|
||||
- Software viewer is JLink RTT Viewer/Client/Logger which is bundled with JLink driver package.
|
||||
- `LOGGER=swo`: Use dedicated SWO pin of ARM Cortex SWD debug header.
|
||||
- Cons: only work with ARM Cortex MCUs minus M0
|
||||
- Pros: should be compatible with more debugger that support SWO.
|
||||
- Software viewer should be provided along with your debugger driver.
|
||||
|
||||
```
|
||||
$ make BOARD=feather_stm32f405_express LOG=2 LOGGER=rtt all
|
||||
$ make BOARD=feather_stm32f405_express LOG=2 LOGGER=swo all
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
#------------------------------------
|
||||
# Application
|
||||
# This file is meant to be include by add_subdirectory() in the root CMakeLists.txt
|
||||
#------------------------------------
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
include(${FAMILY_PATH}/app.cmake)
|
||||
|
||||
add_executable(blinky
|
||||
src/blinky.c
|
||||
${FAMILY_PATH}/boards.c
|
||||
# ${FAMILY_PATH}/board_flash.c
|
||||
)
|
||||
target_include_directories(blinky PUBLIC
|
||||
${TOP}/src
|
||||
)
|
||||
target_compile_definitions(blinky PUBLIC
|
||||
BUILD_APPLICATION
|
||||
BUILD_NO_TINYUSB
|
||||
)
|
||||
|
||||
family_configure_app(blinky)
|
||||
family_gen_uf2(blinky ${UF2_FAMILY_ID})
|
||||
family_flash_uf2(blinky ${UF2_FAMILY_ID})
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2020 Ha Thach (tinyusb.org) for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "board_api.h"
|
||||
|
||||
// Blinky app to test tinyuf2 bootloader
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// MACRO TYPEDEF CONSTANT ENUM DECLARATION
|
||||
//--------------------------------------------------------------------+
|
||||
uint8_t const RGB_WRITING[] = { 0xcc, 0x66, 0x00 };
|
||||
uint8_t const RGB_OFF[] = { 0x00, 0x00, 0x00 };
|
||||
static volatile uint32_t _timer_count = 0;
|
||||
|
||||
int main(void) {
|
||||
board_init();
|
||||
board_timer_start(1);
|
||||
|
||||
while (1) {
|
||||
// nothing to do
|
||||
}
|
||||
}
|
||||
|
||||
void board_timer_handler(void) {
|
||||
_timer_count++;
|
||||
if ((_timer_count & 0xfful) == 0) {
|
||||
const uint32_t is_on = (_timer_count >> 8) & 0x1u;
|
||||
|
||||
board_led_write(is_on ? 0xff : 0x000);
|
||||
board_rgb_write(is_on ? RGB_WRITING : RGB_OFF);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Logger newlib retarget
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Enable only with LOG is enabled (Note: ESP32-S2 has built-in support already)
|
||||
#if TUF2_LOG // && (CFG_TUSB_MCU != OPT_MCU_ESP32S2)
|
||||
|
||||
#if defined(LOGGER_RTT)
|
||||
#include "SEGGER_RTT.h"
|
||||
#endif
|
||||
|
||||
__attribute__ ((used)) int _write(int fhdl, const void* buf, size_t count) {
|
||||
(void)fhdl;
|
||||
|
||||
#if defined(LOGGER_RTT)
|
||||
SEGGER_RTT_Write(0, (char*) buf, (int) count);
|
||||
return count;
|
||||
#else
|
||||
return board_uart_write(buf, count);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
#------------------------------------
|
||||
# Application
|
||||
# This file is meant to be include by add_subdirectory() in the root CMakeLists.txt
|
||||
#------------------------------------
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
include(${FAMILY_PATH}/app.cmake)
|
||||
|
||||
# Generate bootloader_bin.c
|
||||
add_custom_command(OUTPUT bootloader_bin.c
|
||||
COMMAND ${Python_EXECUTABLE} ${UF2CONV_PY} --carray -o ${CMAKE_CURRENT_BINARY_DIR}/bootloader_bin.c $<TARGET_FILE_DIR:tinyuf2>/tinyuf2.bin
|
||||
DEPENDS tinyuf2
|
||||
)
|
||||
|
||||
add_executable(update-tinyuf2
|
||||
self_update.c
|
||||
${FAMILY_PATH}/boards.c
|
||||
${FAMILY_PATH}/board_flash.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/bootloader_bin.c
|
||||
)
|
||||
|
||||
target_include_directories(update-tinyuf2 PUBLIC
|
||||
${TOP}/src
|
||||
)
|
||||
target_compile_definitions(update-tinyuf2 PUBLIC
|
||||
TINYUF2_SELF_UPDATE
|
||||
BUILD_NO_TINYUSB
|
||||
BUILD_APPLICATION
|
||||
)
|
||||
|
||||
family_configure_app(update-tinyuf2)
|
||||
family_gen_uf2(update-tinyuf2 ${UF2_FAMILY_ID})
|
||||
family_flash_uf2(update-tinyuf2 ${UF2_FAMILY_ID})
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 2a364ca272d8219f47aece3232aa2e9ab8738655
|
||||
Subproject commit d10b65ada4be7d5754b3128e80a9b4db72bdb23f
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
include_guard(GLOBAL)
|
||||
include_guard()
|
||||
|
||||
set(UF2_FAMILY_ID 0x699b62ec)
|
||||
set(CH32_FAMILY ch32v20x)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../family_support.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake)
|
||||
|
||||
# Must be set before including IDF project.cmake
|
||||
set(EXTRA_COMPONENT_DIRS ${TOP}/src ${CMAKE_CURRENT_LIST_DIR}/boards)
|
||||
|
|
@ -10,7 +11,6 @@ set(SDKCONFIG_DEFAULTS ${CMAKE_CURRENT_LIST_DIR}/sdkconfig.defaults ${CMAKE_CURR
|
|||
set(SDKCONFIG ${CMAKE_BINARY_DIR}/sdkconfig)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
idf_build_set_property(EXTRA_CMAKE_ARGS -DBOARD=${BOARD}) # Pass BOARD to bootloader
|
||||
|
||||
execute_process(COMMAND git describe --dirty --always --tags
|
||||
OUTPUT_VARIABLE GIT_VERSION)
|
||||
|
|
@ -23,113 +23,43 @@ string(REPLACE ../ "" GIT_SUBMODULE_VERSIONS ${GIT_SUBMODULE_VERSIONS})
|
|||
string(REPLACE lib/ "" GIT_SUBMODULE_VERSIONS ${GIT_SUBMODULE_VERSIONS})
|
||||
string(STRIP ${GIT_SUBMODULE_VERSIONS} GIT_SUBMODULE_VERSIONS)
|
||||
|
||||
add_compile_definitions(
|
||||
UF2_VERSION_BASE="${GIT_VERSION}"
|
||||
UF2_VERSION="${GIT_VERSION} - ${GIT_SUBMODULE_VERSIONS}"
|
||||
)
|
||||
add_compile_definitions(UF2_VERSION_BASE="${GIT_VERSION}")
|
||||
add_compile_definitions(UF2_VERSION="${GIT_VERSION} - ${GIT_SUBMODULE_VERSIONS}")
|
||||
|
||||
cmake_print_variables(GIT_VERSION GIT_SUBMODULE_VERSIONS)
|
||||
|
||||
project(tinyuf2)
|
||||
|
||||
# Create post-build script for combined.bin / combined-ota.bin
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/tinyuf2.postbuild.sh
|
||||
"#!/bin/bash\n"
|
||||
"echo \"Creating combined.bin\"\n"
|
||||
"esptool.py --chip ${IDF_TARGET} merge_bin --output combined.bin $(tr '\\n' ' ' < ${CMAKE_BINARY_DIR}/flash_args)\n"
|
||||
)
|
||||
|
||||
# check if board is 4MB flash and create combined-ota.bin
|
||||
file(READ ${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/sdkconfig BOARD_SDKCONFIG_CONTENTS)
|
||||
string(FIND ${BOARD_SDKCONFIG_CONTENTS} "partitions-4MB-noota.csv" MATCH_INDEX)
|
||||
if(NOT MATCH_INDEX EQUAL -1)
|
||||
file(APPEND ${CMAKE_BINARY_DIR}/tinyuf2.postbuild.sh
|
||||
"echo \"Creating combined-ota.bin\"\n"
|
||||
"gen_esp32part.py ${CMAKE_CURRENT_LIST_DIR}/partitions-4MB.csv ${CMAKE_BINARY_DIR}/partition_table/partitions-table-ota.bin\n"
|
||||
"esptool.py --chip ${IDF_TARGET} merge_bin --output combined-ota.bin $(tr '\\n' ' ' < ${CMAKE_BINARY_DIR}/flash_args | sed 's/partition-table.bin/partitions-table-ota.bin/g')\n"
|
||||
"cp ${CMAKE_BINARY_DIR}/partition_table/partitions-table-ota.bin ${ARTIFACT_PATH}/partitions-table-ota.bin\n"
|
||||
"cp combined-ota.bin ${ARTIFACT_PATH}/combined-ota.bin\n"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Post build: generate bootloader_bin.c for self-update and combined.bin
|
||||
add_custom_command(TARGET app POST_BUILD
|
||||
COMMAND bash ${CMAKE_BINARY_DIR}/tinyuf2.postbuild.sh
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
VERBATIM
|
||||
COMMAND ${Python_EXECUTABLE} ${UF2CONV_PY} --carray -o ${CMAKE_CURRENT_LIST_DIR}/apps/self_update/main/bootloader_bin.c ${CMAKE_BINARY_DIR}/tinyuf2.bin
|
||||
)
|
||||
|
||||
# Post build: copy binaries for artifact
|
||||
add_custom_command(TARGET app POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "Copy binaries for artifact"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/flash_args ${ARTIFACT_PATH}/flash_args
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/bootloader/bootloader.bin ${ARTIFACT_PATH}/bootloader.bin
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/ota_data_initial.bin ${ARTIFACT_PATH}/ota_data_initial.bin
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/partition_table/partition-table.bin ${ARTIFACT_PATH}/partition-table.bin
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/tinyuf2.bin ${ARTIFACT_PATH}/tinyuf2.bin
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/combined.bin ${ARTIFACT_PATH}/combined.bin
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
# flash combined.bin
|
||||
add_custom_target(combined-flash
|
||||
DEPENDS tinyuf2.elf
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "Flashing combined.bin"
|
||||
COMMAND esptool.py --chip ${IDF_TARGET} write_flash 0x0 combined.bin
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
#------------------------------
|
||||
# External project (update_tinyuf2, blinky etc ...)
|
||||
#------------------------------
|
||||
|
||||
# Post build: generate bootloader_bin.c for update-tinyuf2 and combined.bin
|
||||
add_custom_command(TARGET app POST_BUILD
|
||||
COMMAND ${Python_EXECUTABLE} ${UF2CONV_PY} --carray -o ${CMAKE_CURRENT_LIST_DIR}/apps/update_tinyuf2/main/bootloader_bin.c ${CMAKE_BINARY_DIR}/tinyuf2.bin
|
||||
)
|
||||
|
||||
externalproject_add(update-tinyuf2
|
||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/apps/update_tinyuf2
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}/apps/update_tinyuf2
|
||||
# Modifying the list separator for the arguments, as such, we won't need to manually
|
||||
# replace the new separator by the default ';' in the subproject
|
||||
CMAKE_ARGS -DBOARD=${BOARD}
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_ALWAYS 1
|
||||
DEPENDS tinyuf2.elf
|
||||
)
|
||||
|
||||
externalproject_add(blinky
|
||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/apps/blinky
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}/apps/blinky
|
||||
# Modifying the list separator for the arguments, as such, we won't need to manually
|
||||
# replace the new separator by the default ';' in the subproject
|
||||
CMAKE_ARGS -DBOARD=${BOARD}
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_ALWAYS 1
|
||||
)
|
||||
|
||||
# erase firmware need to use reset reason, not implemented yet
|
||||
#externalproject_add(erase_firmware
|
||||
# SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/apps/erase_firmware
|
||||
# BINARY_DIR ${CMAKE_BINARY_DIR}/apps/erase_firmware
|
||||
# # Modifying the list separator for the arguments, as such, we won't need to manually
|
||||
# # replace the new separator by the default ';' in the subproject
|
||||
# CMAKE_ARGS -DBOARD=${BOARD}
|
||||
# INSTALL_COMMAND ""
|
||||
# BUILD_ALWAYS 1
|
||||
# )
|
||||
|
||||
# -------------------------------------------------------------
|
||||
# Post build: update arduino-esp32 bootloader for debug purpose
|
||||
# -------------------------------------------------------------
|
||||
if (0)
|
||||
set(ARDUINO_VARIANT_DIR $ENV{HOME}/code/arduino-esp32/variants/${BOARD})
|
||||
#set(ARDUINO_VARIANT_DIR $ENV{HOME}/code/arduino-esp32/variants/adafruit_feather_esp32s3_nopsram)
|
||||
#set(ARDUINO_VARIANT_DIR $ENV{HOME}/code/arduino-esp32/variants/adafruit_feather_esp32s3)
|
||||
|
||||
add_custom_command(TARGET bootloader POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/bootloader/bootloader.bin ${ARDUINO_VARIANT_DIR}/bootloader-tinyuf2.bin
|
||||
)
|
||||
|
||||
add_custom_command(TARGET tinyuf2.elf POST_BUILD
|
||||
add_custom_command(TARGET app POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/tinyuf2.bin ${ARDUINO_VARIANT_DIR}/tinyuf2.bin
|
||||
)
|
||||
|
||||
file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/sdkconfig SDKCONFIG_CONTENTS)
|
||||
foreach (line ${SDKCONFIG_CONTENTS})
|
||||
if (line MATCHES "CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"(.*).csv\"")
|
||||
set(PARTITION_TABLE_CSV ${CMAKE_MATCH_1})
|
||||
cmake_print_variables(PARTITION_TABLE_CSV)
|
||||
break()
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
add_custom_command(TARGET app POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/${PARTITION_TABLE_CSV}.csv ${ARDUINO_VARIANT_DIR}/${PARTITION_TABLE_CSV}-tinyuf2.csv
|
||||
)
|
||||
endif ()
|
||||
|
|
|
|||
|
|
@ -3,16 +3,21 @@
|
|||
.PHONY: all build clean flash monitor erase
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
# Set default python interpreters
|
||||
PYTHON3 ?= python3
|
||||
|
||||
# Build directory
|
||||
BUILD = _build/$(BOARD)
|
||||
BIN = _bin/$(BOARD)
|
||||
TOP = ../..
|
||||
SELF_BUILD = ${BUILD}/update_tinyuf2
|
||||
|
||||
ifdef SERIAL
|
||||
SERIAL_OPT = --port $(SERIAL)
|
||||
endif
|
||||
|
||||
UF2_FAMILY_ID_esp32s2 = 0xbfdd4eee
|
||||
UF2_FAMILY_ID_esp32s3 = 0xc47e5767
|
||||
|
||||
BOARD_CMAKE := $(file < boards/$(BOARD)/board.cmake)
|
||||
ifneq ($(findstring esp32s2,$(BOARD_CMAKE)),)
|
||||
IDF_TARGET = esp32s2
|
||||
|
|
@ -35,7 +40,38 @@ fullclean:
|
|||
app bootloader clean flash bootloader-flash app-flash erase-flash monitor dfu-flash dfu size size-components size-files:
|
||||
idf.py -B$(BUILD) -DBOARD=$(BOARD) $(SERIAL_OPT) $@
|
||||
|
||||
# combined.bin is POST build step, generated by cmake app target
|
||||
combined.bin: $(BUILD)/combined.bin
|
||||
|
||||
$(BUILD)/combined.bin: app
|
||||
cd $(BUILD); \
|
||||
esptool.py --chip $(IDF_TARGET) merge_bin --output combined.bin $(strip $(file < $(BUILD)/flash_args))
|
||||
|
||||
combined-flash: $(BUILD)/combined.bin
|
||||
esptool.py --chip $(IDF_TARGET) write_flash 0x0 $<
|
||||
|
||||
#-------------- Self Update --------------
|
||||
SELF_APP = apps/self_update
|
||||
SELF_BUILD = ${SELF_APP}/${BUILD}
|
||||
|
||||
# cmake post build of tinyuf2's app will generate bootloader_bin.c
|
||||
# cmake post build of self-update's app will generate update-tinyuf2.uf2
|
||||
$(SELF_BUILD)/update-tinyuf2.uf2: app
|
||||
idf.py -C ${SELF_APP} -B${SELF_BUILD} -DBOARD=${BOARD} app
|
||||
|
||||
self-update: $(SELF_BUILD)/update-tinyuf2.uf2
|
||||
|
||||
#-------------- Artifacts --------------
|
||||
$(BIN):
|
||||
@mkdir -p $@
|
||||
|
||||
# get the partition csv from sdkconfig
|
||||
PARTITION_CSV := $(strip $(foreach csv,$(wildcard partitions-*.csv),$(findstring $(csv),$(file < boards/$(BOARD)/sdkconfig))))
|
||||
|
||||
copy-artifact: $(BIN) all self-update $(BUILD)/combined.bin
|
||||
@cp $(BUILD)/bootloader/bootloader.bin $<
|
||||
@cp $(BUILD)/partition_table/partition-table.bin $<
|
||||
@cp $(BUILD)/ota_data_initial.bin $<
|
||||
@cp $(BUILD)/tinyuf2.bin $<
|
||||
@cp $(BUILD)/combined.bin $<
|
||||
@cp $(SELF_BUILD)/update-tinyuf2.uf2 $<
|
||||
@cp $(PARTITION_CSV) $<
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
The project is composed of customizing the 2nd stage bootloader from IDF and UF2 factory application as 3rd stage bootloader.
|
||||
|
||||
**Note**: IDF is actively developed and change very often, TinyUF2 is developed and tested with IDF v5.3.2. Should you have a problem please try to change your IDF version.
|
||||
**Note**: IDF is actively developed and change very often, TinyUF2 is developed and tested with IDF v5.1.1. Should you have a problem please try to change your IDF version.
|
||||
|
||||
Following boards are supported:
|
||||
|
||||
|
|
@ -22,7 +22,6 @@ Following boards are supported:
|
|||
- [LILYGO® TTGO T8 ESP32-S2-WROOM](http://www.lilygo.cn/prod_view.aspx?TypeId=50063&Id=1320&FId=t3:50063:3)
|
||||
- [LILYGO® TTGO T-Beam Supreme](https://www.lilygo.cc/products/softrf-t-beamsupreme)
|
||||
- [LILYGO® TTGO T-TWR Plus](https://www.lilygo.cc/products/t-twr-plus)
|
||||
- [LILYGO® T-Dongle S3](https://www.lilygo.cc/products/t-dongle-s3)
|
||||
- [LOLIN Wemos® S2 Pico](https://www.wemos.cc/en/latest/s2/s2_pico.html)
|
||||
- [Maker badge](https://github.com/dronecz/maker_badge)
|
||||
- [MicroDev microS2](https://github.com/microDev1/microS2/wiki)
|
||||
|
|
@ -39,7 +38,7 @@ Following boards are supported:
|
|||
Once installed and setup ESP-IDF, you can build with all target
|
||||
|
||||
```
|
||||
idf.py -DBOARD=adafruit_feather_esp32s2 build
|
||||
make BOARD=adafruit_feather_esp32s2 all
|
||||
```
|
||||
|
||||
### Flash
|
||||
|
|
@ -47,7 +46,7 @@ idf.py -DBOARD=adafruit_feather_esp32s2 build
|
|||
You could flash it with flash target
|
||||
|
||||
```
|
||||
idf.py -DBOARD=adafruit_feather_esp32s2 flash
|
||||
make BOARD=adafruit_feather_esp32s2 flash
|
||||
```
|
||||
|
||||
or you could also use pre-built binaries from [release page](https://github.com/adafruit/tinyuf2/releases). Extract and run following esptool commands
|
||||
|
|
@ -115,4 +114,17 @@ NOTE: uf2 bootloader, customized 2nd bootloader and partition table can be overw
|
|||
|
||||
## Partition
|
||||
|
||||
Each board has its own flash size and partition table. check out the one in `boards/BOARD/sdkconfig` and `partition-xMB.csv` for details
|
||||
Following is typical partition for 4MB flash, check out the `partition-xMB.csv` for details.
|
||||
|
||||
```
|
||||
# Name, Type, SubType, Offset, Size, Flags
|
||||
# bootloader.bin,, 0x1000, 32K
|
||||
# partition table, 0x8000, 4K
|
||||
|
||||
nvs, data, nvs, 0x9000, 20K,
|
||||
otadata, data, ota, 0xe000, 8K,
|
||||
ota_0, 0, ota_0, 0x10000, 1408K,
|
||||
ota_1, 0, ota_1, 0x170000, 1408K,
|
||||
uf2, app, factory,0x2d0000, 256K,
|
||||
ffat, data, fat, 0x310000, 960K,
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
# The following five lines of boilerplate have to be in your project's
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../../../family_support.cmake)
|
||||
|
||||
# Must be set before including IDF project.cmake
|
||||
set(EXTRA_COMPONENT_DIRS "../../boards" "../../components")
|
||||
set(SDKCONFIG ${CMAKE_BINARY_DIR}/sdkconfig)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
|
||||
add_compile_definitions(
|
||||
BUILD_APPLICATION
|
||||
BUILD_NO_TINYUSB
|
||||
)
|
||||
|
||||
project(blinky)
|
||||
family_gen_uf2(blinky ${UF2_FAMILY_ID})
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
idf_component_register(SRCS ${TOP}/apps/blinky/src/blinky.c
|
||||
INCLUDE_DIRS ${TOP}/src
|
||||
REQUIRES boards)
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
# The following five lines of boilerplate have to be in your project's
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../../../family_support.cmake)
|
||||
|
||||
# Must be set before including IDF project.cmake
|
||||
set(EXTRA_COMPONENT_DIRS "../../boards" "../../components")
|
||||
set(SDKCONFIG ${CMAKE_BINARY_DIR}/sdkconfig)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
|
||||
add_compile_definitions(
|
||||
BUILD_APPLICATION
|
||||
BUILD_NO_TINYUSB
|
||||
)
|
||||
|
||||
project(erase_firmware)
|
||||
family_gen_uf2(erase_firmware ${UF2_FAMILY_ID})
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# Note: bootloader_bin.c is generated by tinyuf2 app target
|
||||
idf_component_register(
|
||||
SRCS ${TOP}/apps/erase_firmware/src/erase_firmware.c
|
||||
INCLUDE_DIRS ${TOP}/src
|
||||
REQUIRES boards
|
||||
)
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
CONFIG_IDF_CMAKE=y
|
||||
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y
|
||||
CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y
|
||||
|
||||
# Compiler options
|
||||
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y
|
||||
|
||||
# Newlib
|
||||
CONFIG_NEWLIB_NANO_FORMAT=y
|
||||
|
||||
# Virtual file system
|
||||
CONFIG_VFS_SUPPORT_IO=n
|
||||
|
||||
# Compatibility options
|
||||
CONFIG_FLASHMODE_QIO=y
|
||||
27
ports/espressif/apps/self_update/CMakeLists.txt
Normal file
27
ports/espressif/apps/self_update/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# The following five lines of boilerplate have to be in your project's
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../../../family_support.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../../boards/${BOARD}/board.cmake)
|
||||
|
||||
# Must be set before including IDF project.cmake
|
||||
set(EXTRA_COMPONENT_DIRS "../../boards" "../../components")
|
||||
|
||||
set(SELFUPDATE_BUILD 1)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
|
||||
add_compile_definitions(TINYUF2_SELF_UPDATE)
|
||||
|
||||
project(update-tinyuf2)
|
||||
|
||||
add_custom_command(TARGET app POST_BUILD
|
||||
COMMAND ${Python_EXECUTABLE} ${UF2CONV_PY} -f ${UF2_FAMILY_ID_${IDF_TARGET}} -b 0x0 -c -o ${CMAKE_BINARY_DIR}/update-tinyuf2.uf2 ${CMAKE_BINARY_DIR}/update-tinyuf2.bin
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_target(flash-update-tinyuf2
|
||||
DEPENDS app
|
||||
COMMAND ${Python_EXECUTABLE} ${UF2CONV_PY} -f ${UF2_FAMILY_ID_${IDF_TARGET}} --deploy ${CMAKE_BINARY_DIR}/update-tinyuf2.uf2
|
||||
VERBATIM
|
||||
)
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# The following five lines of boilerplate have to be in your project's
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../../../family_support.cmake)
|
||||
|
||||
# Must be set before including IDF project.cmake
|
||||
set(EXTRA_COMPONENT_DIRS "../../boards" "../../components")
|
||||
set(SDKCONFIG ${CMAKE_BINARY_DIR}/sdkconfig)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
|
||||
add_compile_definitions(
|
||||
TINYUF2_SELF_UPDATE
|
||||
BUILD_APPLICATION
|
||||
BUILD_NO_TINYUSB
|
||||
)
|
||||
|
||||
project(update-tinyuf2)
|
||||
family_gen_uf2(update-tinyuf2 ${UF2_FAMILY_ID})
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
CONFIG_IDF_CMAKE=y
|
||||
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y
|
||||
CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y
|
||||
|
||||
# Compiler options
|
||||
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y
|
||||
|
||||
# Newlib
|
||||
CONFIG_NEWLIB_NANO_FORMAT=y
|
||||
|
||||
# Virtual file system
|
||||
CONFIG_VFS_SUPPORT_IO=n
|
||||
|
||||
# Compatibility options
|
||||
CONFIG_FLASHMODE_QIO=y
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
idf_component_register(SRCS boards.c board_flash.c ${BOARD_SOURCES}
|
||||
INCLUDE_DIRS "." "${BOARD}" ${BOARD_INCLUDES} ${TOP}/src
|
||||
PRIV_REQUIRES driver usb
|
||||
REQUIRES esp_timer app_update spi_flash led_strip lcd ssd1306 XPowersLib tinyusb_src)
|
||||
REQUIRES driver esp_timer app_update spi_flash led_strip lcd ssd1306 XPowersLib tinyusb_src)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -27,10 +27,7 @@
|
|||
#include "freertos/semphr.h"
|
||||
|
||||
#include "hal/gpio_ll.h"
|
||||
|
||||
#include "esp_private/usb_phy.h"
|
||||
#include "soc/usb_pins.h"
|
||||
|
||||
#include "hal/usb_hal.h"
|
||||
#include "soc/usb_periph.h"
|
||||
#include "esp_private/periph_ctrl.h"
|
||||
|
||||
|
|
@ -44,7 +41,7 @@
|
|||
|
||||
#include "board_api.h"
|
||||
|
||||
#ifndef BUILD_NO_TINYUSB
|
||||
#ifndef TINYUF2_SELF_UPDATE
|
||||
#include "tusb.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -92,13 +89,14 @@ extern bool board_init_extension();
|
|||
#endif
|
||||
|
||||
extern int main(void);
|
||||
static void configure_pins(usb_hal_context_t* usb);
|
||||
static void internal_timer_cb(void* arg);
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// TinyUSB thread
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#ifdef BUILD_NO_TINYUSB
|
||||
#ifdef TINYUF2_SELF_UPDATE
|
||||
void app_main(void) {
|
||||
main();
|
||||
}
|
||||
|
|
@ -259,19 +257,16 @@ void board_init(void) {
|
|||
esp_timer_create(&periodic_timer_args, &timer_hdl);
|
||||
}
|
||||
|
||||
static usb_phy_handle_t phy_hdl;
|
||||
void board_dfu_init(void) {
|
||||
// Configure USB PHY
|
||||
usb_phy_config_t phy_conf = {
|
||||
.controller = USB_PHY_CTRL_OTG,
|
||||
.target = USB_PHY_TARGET_INT,
|
||||
.otg_mode = USB_OTG_MODE_DEVICE,
|
||||
// https://github.com/hathach/tinyusb/issues/2943#issuecomment-2601888322
|
||||
// Set speed to undefined (auto-detect) to avoid timinng/racing issue with S3 with host such as macOS
|
||||
.otg_speed = USB_PHY_SPEED_UNDEFINED,
|
||||
};
|
||||
// USB Controller Hal init
|
||||
periph_module_reset(PERIPH_USB_MODULE);
|
||||
periph_module_enable(PERIPH_USB_MODULE);
|
||||
|
||||
usb_new_phy(&phy_conf, &phy_hdl);
|
||||
usb_hal_context_t hal = {
|
||||
.use_external_phy = false // use built-in PHY
|
||||
};
|
||||
usb_hal_init(&hal);
|
||||
configure_pins(&hal);
|
||||
}
|
||||
|
||||
void board_reset(void) {
|
||||
|
|
@ -346,10 +341,11 @@ void board_timer_stop(void) {
|
|||
//--------------------------------------------------------------------+
|
||||
// CDC Touch1200
|
||||
//--------------------------------------------------------------------+
|
||||
#ifndef BUILD_NO_TINYUSB
|
||||
#ifndef TINYUF2_SELF_UPDATE
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32S3
|
||||
#include "hal/usb_serial_jtag_ll.h"
|
||||
#include "hal/usb_phy_ll.h"
|
||||
|
||||
static void hw_cdc_reset_handler(void *arg) {
|
||||
portBASE_TYPE xTaskWoken = 0;
|
||||
|
|
@ -393,7 +389,7 @@ static void usb_switch_to_cdc_jtag(void) {
|
|||
gpio_set_level((gpio_num_t)USBPHY_DP_NUM, 0);
|
||||
|
||||
// Initialize CDC+JTAG ISR to listen for BUS_RESET
|
||||
usb_serial_jtag_ll_phy_enable_external(false);
|
||||
usb_phy_ll_int_jtag_enable(&USB_SERIAL_JTAG);
|
||||
usb_serial_jtag_ll_disable_intr_mask(USB_SERIAL_JTAG_LL_INTR_MASK);
|
||||
usb_serial_jtag_ll_clr_intsts_mask(USB_SERIAL_JTAG_LL_INTR_MASK);
|
||||
usb_serial_jtag_ll_ena_intr_mask(USB_SERIAL_JTAG_INTR_BUS_RESET);
|
||||
|
|
@ -458,7 +454,7 @@ void tud_cdc_line_state_cb(uint8_t instance, bool dtr, bool rts) {
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // TINYUF2_SELF_UPDATE
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Display
|
||||
|
|
@ -583,3 +579,32 @@ void dotstar_write(uint8_t const rgb[]) {
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Helper
|
||||
//--------------------------------------------------------------------+
|
||||
static void configure_pins(usb_hal_context_t* usb) {
|
||||
/* usb_periph_iopins currently configures USB_OTG as USB Device.
|
||||
* Introduce additional parameters in usb_hal_context_t when adding support
|
||||
* for USB Host.
|
||||
*/
|
||||
for (const usb_iopin_dsc_t* iopin = usb_periph_iopins; iopin->pin != -1; ++iopin) {
|
||||
if ((usb->use_external_phy) || (iopin->ext_phy_only == 0)) {
|
||||
esp_rom_gpio_pad_select_gpio(iopin->pin);
|
||||
if (iopin->is_output) {
|
||||
esp_rom_gpio_connect_out_signal(iopin->pin, iopin->func, false, false);
|
||||
} else {
|
||||
esp_rom_gpio_connect_in_signal(iopin->pin, iopin->func, false);
|
||||
if ((iopin->pin != GPIO_MATRIX_CONST_ZERO_INPUT) && (iopin->pin != GPIO_MATRIX_CONST_ONE_INPUT)) {
|
||||
gpio_ll_input_enable(&GPIO, iopin->pin);
|
||||
}
|
||||
}
|
||||
esp_rom_gpio_pad_unhold(iopin->pin);
|
||||
}
|
||||
}
|
||||
|
||||
if (!usb->use_external_phy) {
|
||||
gpio_set_drive_capability(USBPHY_DM_NUM, GPIO_DRIVE_CAP_3);
|
||||
gpio_set_drive_capability(USBPHY_DP_NUM, GPIO_DRIVE_CAP_3);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@
|
|||
#define BOARD_UF2_FAMILY_ID 0xbfdd4eee
|
||||
#elif CONFIG_IDF_TARGET_ESP32S3
|
||||
#define BOARD_UF2_FAMILY_ID 0xc47e5767
|
||||
#elif CONFIG_IDF_TARGET_ESP32P4
|
||||
#define BOARD_UF2_FAMILY_ID 0x3d308e94
|
||||
#else
|
||||
#error unsupported MCUs
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
|
||||
#define DISPLAY_PIN_CS 39
|
||||
#define DISPLAY_PIN_DC 5
|
||||
#define DISPLAY_PIN_RST 40
|
||||
#define DISPLAY_PIN_RST 4
|
||||
|
||||
#define DISPLAY_PIN_BL 18
|
||||
#define DISPLAY_BL_ON 0 // GPIO state to enable back light
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
//--------------------------------------------------------------------+
|
||||
|
||||
// GPIO connected to Neopixel data
|
||||
#define NEOPIXEL_PIN 38
|
||||
#define NEOPIXEL_PIN 48
|
||||
|
||||
// Brightness percentage from 1 to 255
|
||||
#define NEOPIXEL_BRIGHTNESS 0x10
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
# Apply board specific content here
|
||||
set(IDF_TARGET "esp32s3")
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2020 Ha Thach (tinyusb.org) for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef GENERIC_ESP32S3_SUPER_MINI_H_
|
||||
#define GENERIC_ESP32S3_SUPER_MINI_H_
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Button
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Enter UF2 mode if GPIO is pressed while 2nd stage bootloader indicator
|
||||
// is on e.g RGB = Purple. If it is GPIO0, user should not hold this while
|
||||
// reset since that will instead run the 1st stage ROM bootloader
|
||||
#define PIN_BUTTON_UF2 0
|
||||
|
||||
// GPIO that implement 1-bit memory with RC components which hold the
|
||||
// pin value long enough for double reset detection.
|
||||
// #define PIN_DOUBLE_RESET_RC
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// LED
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// GPIO connected to Neopixel data
|
||||
#define NEOPIXEL_PIN 48
|
||||
|
||||
// Brightness percentage from 1 to 255
|
||||
#define NEOPIXEL_BRIGHTNESS 0x10
|
||||
|
||||
// Number of neopixels
|
||||
#define NEOPIXEL_NUMBER 1
|
||||
|
||||
|
||||
// LED for indicator and writing flash
|
||||
// If not defined neopixel will be use for flash writing instead
|
||||
// #define LED_PIN 13
|
||||
// #define LED_STATE_ON 1
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// USB UF2
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#define USB_VID 0x303a
|
||||
#define USB_PID 0x8248
|
||||
#define USB_MANUFACTURER "GENERIC"
|
||||
#define USB_PRODUCT "ESP32-S3-Super-Mini"
|
||||
|
||||
#define UF2_PRODUCT_NAME USB_MANUFACTURER " " USB_PRODUCT
|
||||
#define UF2_BOARD_ID "ESP32-S3-Super-Mini"
|
||||
#define UF2_VOLUME_LABEL "SprMiniBoot"
|
||||
#define UF2_INDEX_URL "https://www.nologo.tech/product/esp32/esp32s3supermini/esp32S3SuperMini.html"
|
||||
|
||||
#endif
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
CONFIG_FLASHMODE_DIO=n
|
||||
CONFIG_FLASHMODE_QIO=y
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
# Apply board specific content here
|
||||
set(IDF_TARGET "esp32s3")
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2024 Bill Sideris, Independently providing these changes
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef LILYGO_TDECK_H_
|
||||
#define LILYGO_TDECK_H_
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Button
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Enter UF2 mode if GPIO is pressed while 2nd stage bootloader indicator
|
||||
// is on e.g RGB = Purple. If it is GPIO0, user should not hold this while
|
||||
// reset since that will instead run the 1st stage ROM bootloader
|
||||
#define PIN_BUTTON_UF2 0
|
||||
|
||||
// GPIO that implement 1-bit memory with RC components which hold the
|
||||
// pin value long enough for double reset detection.
|
||||
// #define PIN_DOUBLE_RESET_RC 38
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// LED
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// No LED onboard.
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// TFT
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#define CONFIG_LCD_TYPE_ST7789V
|
||||
|
||||
#define DISPLAY_PIN_MISO -1 // required if use CONFIG_LCD_TYPE_AUTO
|
||||
#define DISPLAY_PIN_MOSI 41
|
||||
#define DISPLAY_PIN_SCK 40
|
||||
|
||||
#define DISPLAY_PIN_CS 12
|
||||
#define DISPLAY_PIN_DC 11
|
||||
#define DISPLAY_PIN_RST -1
|
||||
|
||||
#define DISPLAY_PIN_BL 42
|
||||
#define DISPLAY_BL_ON 1 // GPIO state to enable back light
|
||||
|
||||
#define DISPLAY_PIN_POWER 10
|
||||
#define DISPLAY_POWER_ON 1 // GPIO state to enable TFT
|
||||
|
||||
#define DISPLAY_WIDTH 320
|
||||
#define DISPLAY_HEIGHT 240
|
||||
|
||||
#define DISPLAY_COL_OFFSET 0
|
||||
#define DISPLAY_ROW_OFFSET 0
|
||||
|
||||
// Memory Data Access Control & // Vertical Scroll Start Address
|
||||
#define DISPLAY_MADCTL (TFT_MADCTL_MX)
|
||||
#define DISPLAY_VSCSAD 0
|
||||
|
||||
#define DISPLAY_TITLE "T-Deck"
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// USB UF2
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#define USB_VID 0x303A
|
||||
#define USB_PID 0x81B7
|
||||
|
||||
#define USB_MANUFACTURER "LILYGO"
|
||||
#define USB_PRODUCT "T-Deck"
|
||||
|
||||
#define UF2_PRODUCT_NAME USB_MANUFACTURER " " USB_PRODUCT
|
||||
#define UF2_BOARD_ID "ESP32S3-T-Deck"
|
||||
#define UF2_VOLUME_LABEL "TDECKBOOT"
|
||||
#define UF2_INDEX_URL "https://github.com/Xinyuan-LilyGO/T-Deck"
|
||||
|
||||
#endif
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-16MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
|
||||
CONFIG_FLASHMODE_DIO=n
|
||||
CONFIG_FLASHMODE_QIO=y
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# Apply board specific content here
|
||||
set(IDF_TARGET "esp32s3")
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2024 Robert Grizzell, Independently providing these changes
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef LILYGO_TDISPLAY_S3_H_
|
||||
#define LILYGO_TDISPLAY_S3_H_
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Button
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Enter UF2 mode if GPIO is pressed while 2nd stage bootloader indicator
|
||||
// is on e.g RGB = Purple. If it is GPIO0, user should not hold this while
|
||||
// reset since that will instead run the 1st stage ROM bootloader
|
||||
#define PIN_BUTTON_UF2 0
|
||||
|
||||
// GPIO that implement 1-bit memory with RC components which hold the
|
||||
// pin value long enough for double reset detection.
|
||||
// #define PIN_DOUBLE_RESET_RC 38
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// LED
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// No LED onboard.
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// TFT
|
||||
//--------------------------------------------------------------------+
|
||||
//
|
||||
//Parallel Bus Display - Enable when support is added
|
||||
//#define CONFIG_LCD_TYPE_ST7789V
|
||||
//
|
||||
//#define DISPLAY_PIN_MISO -1 // required if use CONFIG_LCD_TYPE_AUTO
|
||||
//#define DISPLAY_PIN_MOSI -1
|
||||
//#define DISPLAY_PIN_SCK -1
|
||||
//
|
||||
//#define DISPLAY_PIN_D0 39 // Data 0
|
||||
//#define DISPLAY_PIN_D1 40 // Data 1
|
||||
//#define DISPLAY_PIN_D2 41 // Data 2
|
||||
//#define DISPLAY_PIN_D3 42 // Data 3
|
||||
//#define DISPLAY_PIN_D4 45 // Data 4
|
||||
//#define DISPLAY_PIN_D5 46 // Data 5
|
||||
//#define DISPLAY_PIN_D6 47 // Data 6
|
||||
//#define DISPLAY_PIN_D7 48 // Data 7
|
||||
//#define DISPLAY_PIN_WR 08 // Write
|
||||
//#define DISPLAY_PIN_RD 09 // Read
|
||||
//#define DISPLAY_PIN_CS 06 // Chip Select
|
||||
//#define DISPLAY_PIN_DC 07 // Command
|
||||
//#define DISPLAY_PIN_RST 05 // Rest
|
||||
//
|
||||
//#define DISPLAY_PIN_BL 38
|
||||
//#define DISPLAY_BL_ON 1 // GPIO state to enable back light
|
||||
//
|
||||
//#define DISPLAY_PIN_POWER 15
|
||||
//#define DISPLAY_POWER_ON 1 // GPIO state to enable TFT
|
||||
//
|
||||
//#define DISPLAY_WIDTH 320
|
||||
//#define DISPLAY_HEIGHT 170
|
||||
//
|
||||
//#define DISPLAY_COL_OFFSET 0
|
||||
//#define DISPLAY_ROW_OFFSET 35
|
||||
//
|
||||
// Memory Data Access Control & // Vertical Scroll Start Address
|
||||
//#define DISPLAY_MADCTL (TFT_MADCTL_MX)
|
||||
//#define DISPLAY_VSCSAD 0
|
||||
//
|
||||
//#define DISPLAY_TITLE "T-Display S3"
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// USB UF2
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#define USB_VID 0x303A
|
||||
#define USB_PID 0x8140
|
||||
|
||||
#define USB_MANUFACTURER "LILYGO"
|
||||
#define USB_PRODUCT "T-Display S3"
|
||||
|
||||
#define UF2_PRODUCT_NAME USB_MANUFACTURER " " USB_PRODUCT
|
||||
#define UF2_BOARD_ID "ESP32S3-T-Display-S3"
|
||||
#define UF2_VOLUME_LABEL "TDISPBOOT"
|
||||
#define UF2_INDEX_URL "https://github.com/Xinyuan-LilyGO/T-Display-S3"
|
||||
|
||||
#endif
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-16MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
|
||||
CONFIG_FLASHMODE_DIO=n
|
||||
CONFIG_FLASHMODE_QIO=y
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# Apply board specific content here
|
||||
set(IDF_TARGET "esp32s3")
|
||||
|
|
@ -1,101 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2024 Robert Grizzell, Independently providing these changes
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef LILYGO_TDONGLE_S3_H_
|
||||
#define LILYGO_TDONGLE_S3_H_
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Button
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Enter UF2 mode if GPIO is pressed while 2nd stage bootloader indicator
|
||||
// is on e.g RGB = Purple. If it is GPIO0, user should not hold this while
|
||||
// reset since that will instead run the 1st stage ROM bootloader
|
||||
#define PIN_BUTTON_UF2 0
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// LED
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Number of Dotstar
|
||||
#define DOTSTAR_NUMBER 1
|
||||
|
||||
// GPIO connected to Dotstar
|
||||
#define DOTSTAR_PIN_DATA 40
|
||||
#define DOTSTAR_PIN_SCK 39
|
||||
|
||||
// Brightness percentage from 1 to 255
|
||||
#define DOTSTAR_BRIGHTNESS 127
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// TFT
|
||||
//--------------------------------------------------------------------+
|
||||
//
|
||||
|
||||
// LCD is ST7735 and may need a custom init cmd to use the ILI9341 driver.
|
||||
// #define CONFIG_LCD_TYPE_ILI9341
|
||||
|
||||
// #define DISPLAY_PIN_MISO -1 // required if use CONFIG_LCD_TYPE_AUTO
|
||||
// #define DISPLAY_PIN_MOSI 3
|
||||
// #define DISPLAY_PIN_SCK 5
|
||||
|
||||
// #define DISPLAY_PIN_CS 4
|
||||
// #define DISPLAY_PIN_DC 2
|
||||
// #define DISPLAY_PIN_RST 1
|
||||
|
||||
// #define DISPLAY_PIN_BL 38
|
||||
// #define DISPLAY_BL_ON 1 // GPIO state to enable back light
|
||||
|
||||
// #define DISPLAY_PIN_POWER -1
|
||||
// #define DISPLAY_POWER_ON 1 // GPIO state to enable TFT
|
||||
|
||||
// #define DISPLAY_WIDTH 160
|
||||
// #define DISPLAY_HEIGHT 80
|
||||
|
||||
// #define DISPLAY_COL_OFFSET 26
|
||||
// #define DISPLAY_ROW_OFFSET 1
|
||||
|
||||
// Memory Data Access Control & // Vertical Scroll Start Address
|
||||
// #define DISPLAY_MADCTL (TFT_MADCTL_BGR | TFT_MADCTL_MY | TFT_MADCTL_MV)
|
||||
// #define DISPLAY_VSCSAD 80
|
||||
// Display rotated 90 degrees
|
||||
|
||||
// #define DISPLAY_TITLE "T-Dongle-S3"
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// USB UF2
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#define USB_VID 0x303A
|
||||
#define USB_PID 0x82C3
|
||||
|
||||
#define USB_MANUFACTURER "LILYGO"
|
||||
#define USB_PRODUCT "T-Dongle S3"
|
||||
|
||||
#define UF2_PRODUCT_NAME USB_MANUFACTURER " " USB_PRODUCT
|
||||
#define UF2_BOARD_ID "ESP32S3-T_Dongle_S3-rev2" // Rev. 2 added a QWIIC connector
|
||||
#define UF2_VOLUME_LABEL "LILYGOBOOT"
|
||||
#define UF2_INDEX_URL "https://github.com/Xinyuan-LilyGO/T-Dongle-S3"
|
||||
|
||||
#endif
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-16MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
|
||||
CONFIG_FLASHMODE_DIO=n
|
||||
CONFIG_FLASHMODE_QIO=y
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# Apply board specific content here
|
||||
set(IDF_TARGET "esp32s3")
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2020 Ha Thach (tinyusb.org) for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef LILYGO_TQT_PRO_NOPSRAM_H_
|
||||
#define LILYGO_TQT_PRO_NOPSRAM_H_
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Button
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Enter UF2 mode if GPIO is pressed while 2nd stage bootloader indicator
|
||||
// is on e.g RGB = Purple. If it is GPIO0, user should not hold this while
|
||||
// reset since that will instead run the 1st stage ROM bootloader
|
||||
#define PIN_BUTTON_UF2 0
|
||||
|
||||
// GPIO that implement 1-bit memory with RC components which hold the
|
||||
// pin value long enough for double reset detection.
|
||||
// #define PIN_DOUBLE_RESET_RC 10
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// TFT
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#define CONFIG_LCD_TYPE_GC9107
|
||||
|
||||
#define DISPLAY_PIN_MISO -1 // required if use CONFIG_LCD_TYPE_AUTO
|
||||
#define DISPLAY_PIN_MOSI 2
|
||||
#define DISPLAY_PIN_SCK 3
|
||||
|
||||
#define DISPLAY_PIN_CS 5
|
||||
#define DISPLAY_PIN_DC 6
|
||||
#define DISPLAY_PIN_RST 1
|
||||
|
||||
#define DISPLAY_PIN_BL 10
|
||||
#define DISPLAY_BL_ON 0 // GPIO state to enable back light
|
||||
|
||||
#define DISPLAY_WIDTH 128
|
||||
#define DISPLAY_HEIGHT 128
|
||||
|
||||
#define DISPLAY_COL_OFFSET 1
|
||||
#define DISPLAY_ROW_OFFSET 2
|
||||
|
||||
// Memory Data Access Control
|
||||
#define DISPLAY_MADCTL (TFT_MADCTL_MX | TFT_MADCTL_MY | TFT_MADCTL_MV)
|
||||
// Vertical Scroll Start Address
|
||||
#define DISPLAY_VSCSAD 0
|
||||
|
||||
#define DISPLAY_TITLE "T-QT"
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// USB UF2
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#define USB_VID 0x303a
|
||||
#define USB_PID 0x8155
|
||||
|
||||
#define USB_MANUFACTURER "LILYGO"
|
||||
#define USB_PRODUCT "T-QT PRO (8M Flash, NO PSRAM)"
|
||||
|
||||
#define UF2_PRODUCT_NAME USB_MANUFACTURER " " USB_PRODUCT
|
||||
#define UF2_BOARD_ID "ESP32S3-TQTPRO-N8"
|
||||
#define UF2_VOLUME_LABEL "TQTPROBOOT"
|
||||
#define UF2_INDEX_URL "https://lilygo.cc/products/t-qt-pro"
|
||||
|
||||
#endif
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-8MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# Apply board specific content here
|
||||
set(IDF_TARGET "esp32s3")
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2020 Ha Thach (tinyusb.org) for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef LILYGO_TQT_PRO_PSRAM_H_
|
||||
#define LILYGO_TQT_PRO_PSRAM_H_
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Button
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Enter UF2 mode if GPIO is pressed while 2nd stage bootloader indicator
|
||||
// is on e.g RGB = Purple. If it is GPIO0, user should not hold this while
|
||||
// reset since that will instead run the 1st stage ROM bootloader
|
||||
#define PIN_BUTTON_UF2 0
|
||||
|
||||
// GPIO that implement 1-bit memory with RC components which hold the
|
||||
// pin value long enough for double reset detection.
|
||||
// #define PIN_DOUBLE_RESET_RC 10
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// TFT
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#define CONFIG_LCD_TYPE_GC9107
|
||||
|
||||
#define DISPLAY_PIN_MISO -1 // required if use CONFIG_LCD_TYPE_AUTO
|
||||
#define DISPLAY_PIN_MOSI 2
|
||||
#define DISPLAY_PIN_SCK 3
|
||||
|
||||
#define DISPLAY_PIN_CS 5
|
||||
#define DISPLAY_PIN_DC 6
|
||||
#define DISPLAY_PIN_RST 1
|
||||
|
||||
#define DISPLAY_PIN_BL 10
|
||||
#define DISPLAY_BL_ON 0 // GPIO state to enable back light
|
||||
|
||||
#define DISPLAY_WIDTH 128
|
||||
#define DISPLAY_HEIGHT 128
|
||||
|
||||
#define DISPLAY_COL_OFFSET 1
|
||||
#define DISPLAY_ROW_OFFSET 2
|
||||
|
||||
// Memory Data Access Control
|
||||
#define DISPLAY_MADCTL (TFT_MADCTL_MX | TFT_MADCTL_MY | TFT_MADCTL_MV)
|
||||
// Vertical Scroll Start Address
|
||||
#define DISPLAY_VSCSAD 0
|
||||
|
||||
#define DISPLAY_TITLE "T-QT"
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// USB UF2
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#define USB_VID 0x303a
|
||||
#define USB_PID 0x8155
|
||||
|
||||
#define USB_MANUFACTURER "LILYGO"
|
||||
#define USB_PRODUCT "T-QT PRO (4M Flash, 2M PSRAM)"
|
||||
|
||||
#define UF2_PRODUCT_NAME USB_MANUFACTURER " " USB_PRODUCT
|
||||
#define UF2_BOARD_ID "ESP32S3-TQTPRO-N4R2"
|
||||
#define UF2_VOLUME_LABEL "TQTPROBOOT"
|
||||
#define UF2_INDEX_URL "https://lilygo.cc/products/t-qt-pro"
|
||||
|
||||
#endif
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
# Apply board specific content here
|
||||
set(IDF_TARGET "esp32s3")
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2024 CDarius
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef M5STACK_CORES3_H_
|
||||
#define M5STACK_CORES3_H_
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Button
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Enter UF2 mode if GPIO is pressed while 2nd stage bootloader indicator
|
||||
// is on e.g RGB = Purple. If it is GPIO0, user should not hold this while
|
||||
// reset since that will instead run the 1st stage ROM bootloader
|
||||
#define PIN_BUTTON_UF2 0
|
||||
|
||||
// GPIO that implement 1-bit memory with RC components which hold the
|
||||
// pin value long enough for double reset detection.
|
||||
//#define PIN_DOUBLE_RESET_RC 41
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// USB UF2
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#define USB_VID 0x303A
|
||||
#define USB_PID 0x811B
|
||||
|
||||
#define USB_MANUFACTURER "M5Stack"
|
||||
#define USB_PRODUCT "CoreS3"
|
||||
|
||||
#define UF2_PRODUCT_NAME USB_MANUFACTURER " " USB_PRODUCT
|
||||
#define UF2_BOARD_ID "ESP32S3-AtomS3-01"
|
||||
#define UF2_VOLUME_LABEL "CORES3BOOT"
|
||||
#define UF2_INDEX_URL "https://shop.m5stack.com/products/m5stack-cores3-esp32s3-lotdevelopment-kit"
|
||||
|
||||
#endif
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-16MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Board Specific Config
|
||||
|
||||
# Partition Table
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB-noota.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
|
||||
|
||||
# Serial flasher config
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
# Apply board specific content here
|
||||
set(IDF_TARGET "esp32s3")
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2020 Ha Thach (tinyusb.org) for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef SENSEBOX_EYE_ESP32S3_H_
|
||||
#define SENSEBOX_EYE_ESP32S3_H_
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Button
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Enter UF2 mode if GPIO is pressed while 2nd stage bootloader indicator
|
||||
// is on e.g RGB = Purple. If it is GPIO0, user should not hold this while
|
||||
// reset since that will instead run the 1st stage ROM bootloader
|
||||
#define PIN_BUTTON_UF2 0
|
||||
|
||||
// GPIO that implement 1-bit memory with RC components which hold the
|
||||
// pin value long enough for double reset detection.
|
||||
// #define PIN_DOUBLE_RESET_RC
|
||||
|
||||
// GPIO connected to Neopixel data
|
||||
#define NEOPIXEL_PIN 45
|
||||
|
||||
#define NEOPIXEL_POWER_STATE 1
|
||||
|
||||
// Brightness percentage from 1 to 255
|
||||
#define NEOPIXEL_BRIGHTNESS 0x10
|
||||
|
||||
// Number of neopixels
|
||||
#define NEOPIXEL_NUMBER 1
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// USB UF2
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#define USB_VID 0x303A
|
||||
#define USB_PID 0x82D3
|
||||
#define USB_MANUFACTURER "senseBox"
|
||||
#define USB_PRODUCT "eye ESP32S3"
|
||||
|
||||
#define UF2_PRODUCT_NAME USB_MANUFACTURER " " USB_PRODUCT
|
||||
#define UF2_BOARD_ID "ESP32S3-senseBox-eye"
|
||||
#define UF2_VOLUME_LABEL "senseBox"
|
||||
#define UF2_INDEX_URL "https://sensebox.de"
|
||||
|
||||
// Use favicon
|
||||
#define TINYUF2_FAVICON_HEADER "favicon_sensebox_256.h"
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue