Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: espressif/esp32-arduino-lib-builder
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: release/v5.1
Choose a base ref
...
head repository: espressif/esp32-arduino-lib-builder
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
Loading
16 changes: 11 additions & 5 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -32,9 +32,15 @@ jobs:
fail-fast: false
matrix:
include:
- idf_branch: "release/v5.1"
lib_builder_branch: "release/v5.1"
targets: "esp32,esp32s2,esp32s3,esp32c3,esp32c6,esp32h2"
- idf_branch: "release/v5.3"
lib_builder_branch: "release/v5.3"
# - idf_branch: "release/v5.1"
# lib_builder_branch: "release/v5.1"
# targets: "esp32,esp32s2,esp32s3,esp32c3,esp32c6,esp32h2"
# - idf_branch: "release/v5.3"
# lib_builder_branch: "release/v5.3"
# targets: "esp32,esp32s2,esp32s3,esp32c3,esp32c6,esp32h2,esp32p4"
- idf_branch: "release/v5.4"
lib_builder_branch: "master"
targets: "esp32,esp32s2,esp32s3,esp32c3,esp32c6,esp32h2,esp32p4"
- idf_branch: "release/v5.5"
lib_builder_branch: "release/v5.5"
targets: "esp32,esp32s2,esp32s3,esp32c3,esp32c6,esp32h2,esp32p4,esp32c5"
19 changes: 11 additions & 8 deletions .github/workflows/cron_build.yml
Original file line number Diff line number Diff line change
@@ -41,7 +41,8 @@ jobs:
deploy_needed: ${{ steps.check.outputs.deploy_needed }}
targets_list: ${{ steps.check.outputs.targets_list }}
steps:
- uses: actions/checkout@v4
- name: Checkout ${{ inputs.lib_builder_branch }}
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.lib_builder_branch }}

@@ -65,7 +66,8 @@ jobs:
matrix:
target: ${{ fromJson(needs.check-if-needed.outputs.targets_list) }}
steps:
- uses: actions/checkout@v4
- name: Checkout ${{ inputs.lib_builder_branch }}
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.lib_builder_branch }}

@@ -88,13 +90,13 @@ jobs:
- name: Upload build
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: build-${{ env.libs_branch }}-${{ matrix.target }}
path: build

- name: Upload library files
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: libs-${{ env.libs_branch }}-${{ matrix.target }}
path: dist
@@ -105,7 +107,8 @@ jobs:
needs: [check-if-needed, build-libs]
if: needs.check-if-needed.outputs.deploy_needed == '1'
steps:
- uses: actions/checkout@v4
- name: Checkout ${{ inputs.lib_builder_branch }}
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.lib_builder_branch }}

@@ -115,7 +118,7 @@ jobs:
echo "libs_branch=${branch//\//_}" >> $GITHUB_ENV
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
path: dist
pattern: libs-${{ env.libs_branch }}-*
@@ -125,7 +128,7 @@ jobs:
run: bash ./tools/combine-artifacts.sh

- name: Upload full esp32-arduino-libs archive
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: esp32-arduino-libs-${{ env.libs_branch }}
path: dist/esp32-arduino-libs.zip
@@ -154,7 +157,7 @@ jobs:
bash ./tools/push-to-arduino.sh
- name: Upload package_esp32_index.template.json
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: package-esp32-index-json-${{ env.libs_branch }}
path: out/package_esp32_index.template.json
12 changes: 6 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -66,23 +66,23 @@ jobs:
echo "URL: $URL"
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Login to Docker Hub
if: ${{ github.event_name == 'push' }}
uses: docker/login-action@v3
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up QEMU for multiarch builds
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0

- name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
with:
context: tools/docker
push: ${{ github.event_name == 'push' }}
@@ -94,7 +94,7 @@ jobs:
- name: Update Docker Hub repository description (master branch)
if: ${{ github.event_name == 'push' && github.ref_type == 'branch' && github.ref_name == 'master' }}
uses: peter-evans/dockerhub-description@v4
uses: peter-evans/dockerhub-description@e98e4d1628a5f3be2be7c231e50981aee98723ae # v4.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
15 changes: 8 additions & 7 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -25,10 +25,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
target: [esp32, esp32s2, esp32s3, esp32c2, esp32c3, esp32c6, esp32h2]
target: [esp32, esp32s2, esp32s3, esp32c2, esp32c3, esp32c6, esp32h2, esp32p4]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Install dependencies
run: bash ./tools/prepare-ci.sh
@@ -38,13 +39,13 @@ jobs:

- name: Upload build
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: build-${{ matrix.target }}
path: build

- name: Upload archive
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: artifacts-${{ matrix.target }}
path: dist
@@ -55,7 +56,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
path: dist
pattern: artifacts-*
@@ -69,13 +70,13 @@ jobs:
cp out/package_esp32_index.template.json dist/package_esp32_index.template.json
- name: Upload full esp32-arduino-libs archive
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: esp32-arduino-libs
path: dist/esp32-arduino-libs.tar.gz

- name: Upload package_esp32_index.template.json
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: package-esp32-index-json
path: dist/package_esp32_index.template.json
11 changes: 8 additions & 3 deletions .github/workflows/repository_dispatch.yml
Original file line number Diff line number Diff line change
@@ -7,25 +7,30 @@ jobs:
name: Dispatch Event
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Install dependencies
run: bash ./tools/prepare-ci.sh

- name: Handle Event
env:
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }}
GIT_COMMITTER_EMAIL: ${{ secrets.PUSH_EMAIL }}
run: bash ./tools/repository_dispatch.sh

- name: Upload build
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: build
path: build

- name: Upload archive
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: artifacts
path: dist
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -34,7 +34,9 @@ add_custom_command(
)
add_custom_target(mem-variant DEPENDS "mem_variant")

idf_build_set_property(COMPILE_DEFINITIONS "-DESP32_ARDUINO_LIB_BUILDER" APPEND)

##################
### ESP Matter ###
##################
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-DCHIP_HAVE_CONFIG_H" APPEND)
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++2a;-DCHIP_HAVE_CONFIG_H" APPEND)
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -305,14 +305,14 @@ if [ "$BUILD_TYPE" = "all" ]; then
if [ $? -ne 0 ]; then exit 1; fi
fi

# Generate PlatformIO manifest file
# Generate pioarduino manifest file
if [ "$BUILD_TYPE" = "all" ]; then
echo "* Generating PlatformIO manifest file..."
echo "* Generating pioarduino manifest file..."
pushd $IDF_PATH
ibr=$(git describe --all 2>/dev/null)
ic=$(git -C "$IDF_PATH" rev-parse --short HEAD)
popd
python3 ./tools/gen_platformio_manifest.py -o "$TOOLS_JSON_OUT/" -s "$ibr" -c "$ic"
python3 ./tools/gen_pioarduino_manifest.py -o "$TOOLS_JSON_OUT/" -s "$ibr" -c "$ic"
if [ $? -ne 0 ]; then exit 1; fi
fi

3 changes: 2 additions & 1 deletion components/arduino_tinyusb/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -27,7 +27,8 @@ if(CONFIG_TINYUSB_ENABLED)
# espressif:
"${COMPONENT_DIR}/src/dcd_dwc2.c"
# tusb:
#"{COMPONENT_DIR}/tinyusb/src/portable/synopsys/dwc2/dcd_dwc2.c"
#"${COMPONENT_DIR}/tinyusb/src/portable/synopsys/dwc2/dcd_dwc2.c"
"${COMPONENT_DIR}/tinyusb/src/portable/synopsys/dwc2/dwc2_common.c"
"${COMPONENT_DIR}/tinyusb/src/class/cdc/cdc_device.c"
"${COMPONENT_DIR}/tinyusb/src/class/hid/hid_device.c"
"${COMPONENT_DIR}/tinyusb/src/class/midi/midi_device.c"
36 changes: 26 additions & 10 deletions components/arduino_tinyusb/Kconfig.projbuild
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ menu "Arduino TinyUSB"
config TINYUSB_ENABLED
bool "Enable TinyUSB driver"
default y
depends on IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
depends on IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32P4
select FREERTOS_SUPPORT_STATIC_ALLOCATION
select FREERTOS_USE_AUTHENTIC_INCLUDE_PATHS
help
@@ -28,18 +28,28 @@ menu "Arduino TinyUSB"

config TINYUSB_CDC_RX_BUFSIZE
int "CDC FIFO size of RX"
default 64
default 64 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 512 if IDF_TARGET_ESP32P4
depends on TINYUSB_CDC_ENABLED
help
CDC FIFO size of RX

config TINYUSB_CDC_TX_BUFSIZE
int "CDC FIFO size of TX"
default 64
default 64 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 512 if IDF_TARGET_ESP32P4
depends on TINYUSB_CDC_ENABLED
help
CDC FIFO size of TX

config TINYUSB_CDC_MAX_PORTS
int "Maximum enabled CDC ports"
range 1 2
default 1
depends on TINYUSB_CDC_ENABLED
help
Maximum enabled CDC ports

endmenu

menu "Mass Storage (MSC) driver"
@@ -86,7 +96,8 @@ menu "Arduino TinyUSB"

config TINYUSB_HID_BUFSIZE
int "HID Buffer size"
default 64
default 64 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 512 if IDF_TARGET_ESP32P4
depends on TINYUSB_HID_ENABLED
help
HID Buffer size. Should be sufficient to hold ID (if any) + Data
@@ -111,14 +122,16 @@ menu "Arduino TinyUSB"

config TINYUSB_MIDI_RX_BUFSIZE
int "MIDI FIFO size of RX"
default 64
default 64 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 512 if IDF_TARGET_ESP32P4
depends on TINYUSB_MIDI_ENABLED
help
MIDI FIFO size of RX

config TINYUSB_MIDI_TX_BUFSIZE
int "MIDI FIFO size of TX"
default 64
default 64 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 512 if IDF_TARGET_ESP32P4
depends on TINYUSB_MIDI_ENABLED
help
MIDI FIFO size of TX
@@ -143,8 +156,9 @@ menu "Arduino TinyUSB"

config TINYUSB_VIDEO_STREAMING_BUFSIZE
int "VIDEO streaming endpoint size"
range 0 64
default 64
range 0 512
default 64 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 512 if IDF_TARGET_ESP32P4
depends on TINYUSB_VIDEO_ENABLED
help
VIDEO streaming endpoint size
@@ -219,14 +233,16 @@ menu "Arduino TinyUSB"

config TINYUSB_VENDOR_RX_BUFSIZE
int "VENDOR FIFO size of RX"
default 64
default 64 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 512 if IDF_TARGET_ESP32P4
depends on TINYUSB_VENDOR_ENABLED
help
VENDOR FIFO size of RX

config TINYUSB_VENDOR_TX_BUFSIZE
int "VENDOR FIFO size of TX"
default 64
default 64 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 512 if IDF_TARGET_ESP32P4
depends on TINYUSB_VENDOR_ENABLED
help
VENDOR FIFO size of TX
13 changes: 12 additions & 1 deletion components/arduino_tinyusb/include/tusb_config.h
Original file line number Diff line number Diff line change
@@ -100,15 +100,26 @@ extern "C" {
# define CFG_TUSB_MEM_ALIGN TU_ATTR_ALIGNED(4)
#endif

#if CONFIG_IDF_TARGET_ESP32P4
#define CFG_TUD_MAX_SPEED OPT_MODE_HIGH_SPEED
#else
#define CFG_TUD_MAX_SPEED OPT_MODE_FULL_SPEED
#endif

/* */
/* DRIVER CONFIGURATION */
/* */

#define CFG_TUD_MAINTASK_SIZE 4096
#define CFG_TUD_ENDOINT_SIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
#define CFG_TUD_ENDOINT0_SIZE 64

// Enabled Drivers
#define CFG_TUD_CDC CONFIG_TINYUSB_CDC_ENABLED
#ifdef CONFIG_TINYUSB_CDC_MAX_PORTS
#define CFG_TUD_CDC CONFIG_TINYUSB_CDC_MAX_PORTS
#else
#define CFG_TUD_CDC 0
#endif
#define CFG_TUD_MSC CONFIG_TINYUSB_MSC_ENABLED
#define CFG_TUD_HID CONFIG_TINYUSB_HID_ENABLED
#define CFG_TUD_MIDI CONFIG_TINYUSB_MIDI_ENABLED
Loading