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: Jason2866/esp32-arduino-lib-builder
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3016
Choose a base ref
...
head repository: Jason2866/esp32-arduino-lib-builder
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.3_Arduino
Choose a head ref

Commits on Oct 10, 2024

  1. Update dcd_dwc2.c

    Jason2866 authored Oct 10, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    2ffedba View commit details
  2. Update dcd_dwc2.patch

    Jason2866 authored Oct 10, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c35acbf View commit details

Commits on Oct 14, 2024

  1. remove lib zigbee

    Jason2866 authored Oct 14, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    def45e7 View commit details
  2. rremove lib zigbee

    Jason2866 authored Oct 14, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7813acf View commit details
  3. Disable Tinyusb support

    Jason2866 authored Oct 14, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    037a712 View commit details
  4. remove no LTO

    Jason2866 authored Oct 14, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e3795f0 View commit details

Commits on Oct 15, 2024

  1. Enable TinyUSB driver

    Jason2866 authored Oct 15, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    bb62068 View commit details
  2. Update defconfig.esp32p4

    Jason2866 authored Oct 15, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    cc109a4 View commit details
  3. Update build.sh

    Jason2866 authored Oct 15, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    00fa9e2 View commit details
  4. Update defconfig.esp32p4

    Jason2866 authored Oct 15, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f92b314 View commit details
  5. temp Tinyusb compile fix

    Jason2866 authored Oct 15, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e308b1e View commit details
  6. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9804819 View commit details
  7. Update build.sh

    Jason2866 authored Oct 15, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    254ea00 View commit details
  8. changes for latest tinyusb

    Jason2866 authored Oct 15, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c1617e8 View commit details
  9. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    893b867 View commit details
  10. Update builds.json

    Jason2866 authored Oct 15, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    1f2bf02 View commit details
  11. Update defconfig.esp32p4

    Jason2866 authored Oct 15, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    20423c6 View commit details

Commits on Oct 16, 2024

  1. Update idf_component.yml

    Jason2866 authored Oct 16, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    0339ae2 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    d8ee289 View commit details

Commits on Oct 21, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    2c7c6f5 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    55103c2 View commit details

Commits on Oct 22, 2024

  1. Update defconfig.esp32c6

    Jason2866 authored Oct 22, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    3f5137f View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    fab6f6f View commit details

Commits on Oct 23, 2024

  1. Update CMakeLists.txt

    Jason2866 authored Oct 23, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    13122d0 View commit details

Commits on Oct 25, 2024

  1. CONFIG_MBEDTLS_FS_IO

    Jason2866 authored Oct 25, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    3538f21 View commit details

Commits on Oct 31, 2024

  1. Update push.yml

    Jason2866 authored Oct 31, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    98fa3d7 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7d302d8 View commit details

Commits on Nov 5, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    349a23d View commit details
  2. Update archive-build.sh

    Jason2866 authored Nov 5, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    48ea502 View commit details

Commits on Nov 6, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9e0d789 View commit details
  2. Update copy-libs.sh

    Jason2866 authored Nov 6, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    bf201df View commit details

Commits on Nov 11, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4d0119c View commit details

Commits on Nov 12, 2024

  1. again tinyusb update...

    Jason2866 authored Nov 12, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    cc89f25 View commit details
  2. Update dcd_dwc2.patch

    Jason2866 authored Nov 12, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4213909 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9f70c9f View commit details
  4. Create patch-tinyusb.sh

    Jason2866 authored Nov 12, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    a0c40d4 View commit details
  5. Update CMakeLists.txt

    Jason2866 authored Nov 12, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    52e95e2 View commit details

Commits on Nov 13, 2024

  1. Update CMakeLists.txt

    Jason2866 authored Nov 13, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    408773c View commit details

Commits on Nov 19, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8360561 View commit details
  2. Update dcd_dwc2.patch

    Jason2866 authored Nov 19, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    a668c5d View commit details

Commits on Nov 25, 2024

  1. Update dcd_dwc2.c

    Jason2866 authored Nov 25, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    a0e3e5c View commit details
  2. Update dcd_dwc2.patch

    Jason2866 authored Nov 25, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e1c616f View commit details
  3. never ending tinyusb

    Jason2866 authored Nov 25, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    3d0af90 View commit details

Commits on Dec 10, 2024

  1. Update copy-libs.sh

    Jason2866 authored Dec 10, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    a58edda View commit details
  2. Update defconfig.esp32p4

    Jason2866 authored Dec 10, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    878dee8 View commit details
  3. Update dcd_dwc2.c

    Jason2866 authored Dec 10, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b7b2502 View commit details
  4. Update pio_start.txt

    Jason2866 authored Dec 10, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9ebd648 View commit details
  5. Update copy-libs.sh

    Jason2866 authored Dec 10, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b079be9 View commit details
  6. Update copy-libs.sh

    Jason2866 authored Dec 10, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    aa7826c View commit details

Commits on Dec 12, 2024

  1. Update dcd_dwc2.c

    Jason2866 authored Dec 12, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    dd7d372 View commit details
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: IDF v5.3 with P4
name: IDF v5.3
on:
workflow_dispatch: # Manually start a workflow

2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -33,3 +33,5 @@ add_custom_command(
VERBATIM
)
add_custom_target(mem-variant DEPENDS "mem_variant")

idf_build_set_property(COMPILE_DEFINITIONS "-DESP32_ARDUINO_LIB_BUILDER" APPEND)
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
@@ -154,7 +154,7 @@ if [ "$BUILD_TYPE" != "all" ]; then

echo "idf.py -DIDF_TARGET=\"$target\" -DSDKCONFIG_DEFAULTS=\"$configs\" $BUILD_TYPE"
rm -rf build sdkconfig
COMPONENTS_SUBSET=full idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$configs" $BUILD_TYPE
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$configs" $BUILD_TYPE
if [ $? -ne 0 ]; then exit 1; fi
done
exit 0
@@ -217,7 +217,7 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do

echo "* Build IDF-Libs: $idf_libs_configs"
rm -rf build sdkconfig
COMPONENTS_SUBSET=full idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" idf-libs
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" idf-libs
if [ $? -ne 0 ]; then exit 1; fi

# Build Bootloaders
@@ -229,7 +229,7 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do

echo "* Build BootLoader: $bootloader_configs"
rm -rf build sdkconfig
COMPONENTS_SUBSET=none idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$bootloader_configs" copy-bootloader
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$bootloader_configs" copy-bootloader
if [ $? -ne 0 ]; then exit 1; fi
done

@@ -242,7 +242,7 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do

echo "* Build Memory Variant: $mem_configs"
rm -rf build sdkconfig
COMPONENTS_SUBSET=none idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$mem_configs" mem-variant
idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$mem_configs" mem-variant
if [ $? -ne 0 ]; then exit 1; fi
done
done
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"
8 changes: 8 additions & 0 deletions components/arduino_tinyusb/Kconfig.projbuild
Original file line number Diff line number Diff line change
@@ -42,6 +42,14 @@ menu "Arduino TinyUSB"
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"
6 changes: 5 additions & 1 deletion components/arduino_tinyusb/include/tusb_config.h
Original file line number Diff line number Diff line change
@@ -115,7 +115,11 @@ extern "C" {
#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
47 changes: 24 additions & 23 deletions components/arduino_tinyusb/patches/dcd_dwc2.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/components/arduino_tinyusb/src/dcd_dwc2.c 2024-10-02 12:17:40.000000000 +0300
+++ b/components/arduino_tinyusb/src/dcd_dwc2.c 2024-10-02 12:19:48.000000000 +0300
@@ -316,6 +316,16 @@
@@ -243,6 +243,17 @@
//--------------------------------------------------------------------
// Endpoint
//--------------------------------------------------------------------
@@ -14,14 +14,16 @@
+ return 0;
+}
+#endif
static void edpt_activate(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc) {
+
static void edpt_activate(uint8_t rhport, const tusb_desc_endpoint_t* p_endpoint_desc) {
dwc2_regs_t* dwc2 = DWC2_REG(rhport);
@@ -336,7 +346,18 @@
dwc2->epout[epnum].doepctl = dxepctl;
dwc2->daintmsk |= TU_BIT(DAINTMSK_OEPM_Pos + epnum);
} else {
- dwc2->epin[epnum].diepctl = dxepctl | (epnum << DIEPCTL_TXFNUM_Pos);
const uint8_t epnum = tu_edpt_number(p_endpoint_desc->bEndpointAddress);
@@ -266,7 +277,18 @@
depctl.set_data0_iso_even = 1;
}
if (dir == TUSB_DIR_IN) {
- depctl.tx_fifo_num = epnum;
+ //depctl.tx_fifo_num = epnum;
+ uint8_t fifo_num = epnum;
+#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3)
+ // Special Case for EP5, which is used by CDC but not actually called by the driver
@@ -31,14 +33,13 @@
+ } else {
+ fifo_num = get_free_fifo();
+ }
+ //TU_ASSERT(fifo_num != 0);
+#endif
+ dwc2->epin[epnum].diepctl = dxepctl | (fifo_num << DIEPCTL_TXFNUM_Pos);
dwc2->daintmsk |= TU_BIT(DAINTMSK_IEPM_Pos + epnum);
+ depctl.tx_fifo_num = fifo_num;
}
}
@@ -850,6 +871,10 @@
xfer_status[n][TUSB_DIR_IN].max_size = 0;

dwc2_dep_t* dep = &dwc2->ep[dir == TUSB_DIR_IN ? 0 : 1][epnum];
@@ -557,6 +579,10 @@
}
}

+#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3)
@@ -48,19 +49,19 @@
dfifo_flush_tx(dwc2, 0x10); // all tx fifo
dfifo_flush_rx(dwc2);

@@ -1204,6 +1229,9 @@
if (int_status & GINTSTS_USBRST) {
@@ -997,6 +1023,9 @@
if (gintsts & GINTSTS_USBRST) {
// USBRST is start of reset.
dwc2->gintsts = GINTSTS_USBRST;
+#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3)
+ _allocated_fifos = 1;
+#endif
bus_reset(rhport);
}

@@ -1235,7 +1263,11 @@

usbd_spin_lock(true);
handle_bus_reset(rhport);
@@ -1008,7 +1037,11 @@

if (int_status & GINTSTS_USBSUSP) {
if (gintsts & GINTSTS_USBSUSP) {
dwc2->gintsts = GINTSTS_USBSUSP;
- dcd_event_bus_signal(rhport, DCD_EVENT_SUSPEND, true);
+ //dcd_event_bus_signal(rhport, DCD_EVENT_SUSPEND, true);
@@ -70,8 +71,8 @@
+#endif
}

if (int_status & GINTSTS_WKUINT) {
@@ -1252,6 +1284,9 @@
if (gintsts & GINTSTS_WKUINT) {
@@ -1025,6 +1058,9 @@

if (otg_int & GOTGINT_SEDET) {
dcd_event_bus_signal(rhport, DCD_EVENT_UNPLUGGED, true);
1,337 changes: 564 additions & 773 deletions components/arduino_tinyusb/src/dcd_dwc2.c

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion configs/builds.json
Original file line number Diff line number Diff line change
@@ -36,6 +36,12 @@
"out":"lib/libesp_hw_support.a",
"targets":["esp32s3"]
},
{
"file":"libesp_lcd.a",
"src":"build/esp-idf/esp_lcd/libesp_lcd.a",
"out":"lib/libesp_lcd.a",
"targets":["esp32s3"]
},
{
"file":"sections.ld",
"src":"build/esp-idf/esp_system/ld/sections.ld",
@@ -88,7 +94,7 @@
},
{
"target": "esp32p4",
"features":[],
"features":["qio_ram"],
"idf_libs":["qio","80m"],
"bootloaders":[
["qio","80m"],
2 changes: 2 additions & 0 deletions configs/defconfig.40m
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
CONFIG_SPIRAM_SPEED_40M=y
CONFIG_SPIRAM_SPEED=40
2 changes: 2 additions & 0 deletions configs/defconfig.80m
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
CONFIG_SPIRAM_SPEED_80M=y
CONFIG_SPIRAM_SPEED=80
16 changes: 14 additions & 2 deletions configs/defconfig.common
Original file line number Diff line number Diff line change
@@ -38,6 +38,7 @@ CONFIG_ESP_IPC_TASK_STACK_SIZE=1024
CONFIG_ESP_MAIN_TASK_STACK_SIZE=4096
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2048
CONFIG_ESP_TASK_WDT_PANIC=y
# CONFIG_ESP_SYSTEM_HW_STACK_GUARD is not set
CONFIG_ESP_TIMER_TASK_STACK_SIZE=4096
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE=y
@@ -77,7 +78,7 @@ CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2304
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH=y
CONFIG_HAL_ASSERTION_DISABLE=y
CONFIG_HEAP_POISONING_LIGHT=y
CONFIG_HEAP_POISONING_DISABLED=y
CONFIG_HTTPD_MAX_REQ_HDR_LEN=1024
CONFIG_HTTPD_WS_SUPPORT=y
CONFIG_LOG_DEFAULT_LEVEL_NONE=y
@@ -157,7 +158,7 @@ CONFIG_MBEDTLS_ROM_MD5=y
CONFIG_MBEDTLS_HARDWARE_ECC=y
CONFIG_MBEDTLS_HARDWARE_AES=y
CONFIG_MBEDTLS_HARDWARE_MPI=y
CONFIG_MBEDTLS_HARDWARE_SHA=y
# CONFIG_MBEDTLS_HARDWARE_SHA is not set
# CONFIG_MBEDTLS_ECC_OTHER_CURVES_SOFT_FALLBACK is not set
# CONFIG_MBEDTLS_HAVE_TIME is not set
# CONFIG_MBEDTLS_ECDSA_DETERMINISTIC is not set
@@ -177,6 +178,8 @@ CONFIG_MBEDTLS_ECP_C=y
CONFIG_MBEDTLS_ECDH_C=y
CONFIG_MBEDTLS_ECDSA_C=y
CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y
# CONFIG_MBEDTLS_SHA1_C is not set
# CONFIG_MBEDTLS_SHA1_ALT is not set
# CONFIG_MBEDTLS_DHM_C is not set
# CONFIG_MBEDTLS_ECJPAKE_C is not set
# CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS is not set
@@ -210,6 +213,7 @@ CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=4096
# CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER is not set
# CONFIG_USE_WAKENET is not set
# CONFIG_USE_MULTINET is not set
# CONFIG_MBEDTLS_FS_IO is not set
# CONFIG_VFS_SUPPORT_SELECT is not set
# CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT is not set
# CONFIG_VFS_SUPPORT_TERMIOS is not set
@@ -225,6 +229,14 @@ CONFIG_LITTLEFS_MAX_PARTITIONS=2
CONFIG_LITTLEFS_MULTIVERSION=y
CONFIG_LITTLEFS_DISK_VERSION_2_0=y

#
# TinyUSB Config
#
CONFIG_TINYUSB_CDC_MAX_PORTS=2
CONFIG_USB_HOST_HUBS_SUPPORTED=y
CONFIG_USB_HOST_HUB_MULTI_LEVEL=y
CONFIG_USB_HOST_HW_BUFFER_BIAS_PERIODIC_OUT=y

#
# Disable Cameras not used
#
1 change: 0 additions & 1 deletion configs/defconfig.esp32
Original file line number Diff line number Diff line change
@@ -33,7 +33,6 @@ CONFIG_ETH_USE_SPI_ETHERNET=y

CONFIG_SPIRAM=y
CONFIG_SPIRAM_OCCUPY_HSPI_HOST=y
CONFIG_ULP_COPROC_ENABLED=y
# CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1 is not set
# CONFIG_UNITY_ENABLE_FLOAT is not set
# CONFIG_UNITY_ENABLE_DOUBLE is not set
3 changes: 3 additions & 0 deletions configs/defconfig.esp32c6
Original file line number Diff line number Diff line change
@@ -3,6 +3,9 @@

CONFIG_COMPILER_FLOAT_LIB_FROM_RVFPLIB=y

# v0.0 C6 has reg i2c rom bug
CONFIG_ESP_ROM_HAS_REGI2C_BUG=y

# Enable LP Core
CONFIG_ULP_COPROC_ENABLED=y
CONFIG_ULP_COPROC_TYPE_LP_CORE=y
16 changes: 16 additions & 0 deletions configs/defconfig.esp32p4
Original file line number Diff line number Diff line change
@@ -8,6 +8,8 @@ CONFIG_ULP_COPROC_RESERVE_MEM=8192
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_360=y
CONFIG_COMPILER_ORPHAN_SECTIONS_PLACE=y
CONFIG_SPIRAM=y
# CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1 is not set
CONFIG_LWIP_TCP_SACK_OUT=y
CONFIG_SPIRAM_SPEED_200M=y
CONFIG_SPIRAM_XIP_FROM_PSRAM=y
CONFIG_RTC_CLK_CAL_CYCLES=576
@@ -18,6 +20,20 @@ CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=3120
CONFIG_CACHE_L2_CACHE_256KB=y
CONFIG_CACHE_L2_CACHE_LINE_128B=y

# RGB Display Optimizations
CONFIG_LCD_RGB_ISR_IRAM_SAFE=y
CONFIG_LCD_RGB_RESTART_IN_VSYNC=y

CONFIG_SLAVE_IDF_TARGET_ESP32C6=y
CONFIG_ESP_SDIO_BUS_WIDTH=4
CONFIG_ESP_SDIO_CLOCK_FREQ_KHZ=40000
CONFIG_ESP_SDIO_PIN_CMD=19
CONFIG_ESP_SDIO_PIN_CLK=18
CONFIG_ESP_SDIO_PIN_D0=14
CONFIG_ESP_SDIO_PIN_D1=15
CONFIG_ESP_SDIO_PIN_D2=16
CONFIG_ESP_SDIO_PIN_D3=17

#
# PPP
#
2 changes: 2 additions & 0 deletions configs/defconfig.esp32s3
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@ CONFIG_ULP_COPROC_RESERVE_MEM=4096
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y
CONFIG_SPIRAM=y
CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=y
CONFIG_ESP32S3_INSTRUCTION_CACHE_16KB=y
CONFIG_ESP32S3_DATA_CACHE_16KB=y
CONFIG_RTC_CLK_CAL_CYCLES=576
CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_TWO=y
# CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND is not set
1 change: 1 addition & 0 deletions configs/defconfig.opi_ram
Original file line number Diff line number Diff line change
@@ -7,5 +7,6 @@ CONFIG_GDMA_CTRL_FUNC_IN_IRAM=y
# I2S_ISR_IRAM_SAFE has to be set!! Done in common config
CONFIG_GDMA_ISR_IRAM_SAFE=y
# Enable the XIP-PSRAM feature, so the ext-mem cache won't be disabled when SPI1 is operating the main flash
CONFIG_SPIRAM_XIP_FROM_PSRAM=y
CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y
CONFIG_SPIRAM_RODATA=y
1 change: 1 addition & 0 deletions configs/pio_end.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"ARDUINO_ARCH_ESP32",
"CHIP_HAVE_CONFIG_H",
("ESP32", "ESP32"),
("F_CPU", "$BOARD_F_CPU"),
("ARDUINO", 10812),
2 changes: 1 addition & 1 deletion configs/pio_start.txt
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ kinds of creative coding, interactive objects, spaces or physical experiences.
http://arduino.cc/en/Reference/HomePage
"""

# Extends: https://github.com/platformio/platform-espressif32/blob/develop/builder/main.py
# Extends: https://github.com/jason2866/platform-espressif32/blob/develop/builder/main.py

from os.path import basename, join

10 changes: 0 additions & 10 deletions main/idf_component.yml

This file was deleted.

5 changes: 4 additions & 1 deletion tools/archive-build.sh
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ cp -f ../components/arduino/pac* arduino-esp32
rm -rf arduino-esp32/docs
rm -rf arduino-esp32/tests
rm -rf arduino-esp32/idf_component_examples
rm -rf arduino-esp32/libraries/Matter
rm -rf arduino-esp32/libraries/RainMaker
rm -rf arduino-esp32/libraries/Insights
rm -rf arduino-esp32/libraries/ESP_I2S
@@ -38,8 +39,10 @@ rm -rf arduino-esp32/libraries/ESP_SR
rm -rf arduino-esp32/libraries/ESP_NOW
rm -rf arduino-esp32/libraries/TFLiteMicro
rm -rf arduino-esp32/libraries/OpenThread
rm -rf arduino-esp32/libraries/Zigbee
rm -rf arduino-esp32/libraries/ESP32
rm -rf arduino-esp32/package
rm -rf arduino-esp32/tools/pre-commit
rm -rf arduino-esp32/tools/esp32-arduino-libs
rm -rf arduino-esp32/tools/*.exe
rm -rf arduino-esp32/tools/esptool.py
@@ -58,7 +61,7 @@ mv arduino-esp32/ framework-arduinoespressif32/
cd framework-arduinoespressif32/libraries
rm -rf **/examples
cd ../tools/esp32-arduino-libs
rm -rf **/flags
# rm -rf **/flags
cd ../../../
# If the framework is needed as tar.gz uncomment next line
# tar --exclude=.* -zcf ../$pio_archive_path framework-arduinoespressif32/
92 changes: 56 additions & 36 deletions tools/copy-libs.sh
Original file line number Diff line number Diff line change
@@ -36,13 +36,20 @@ fi
if [ -e "$AR_SDK/$MEMCONF" ]; then
rm -rf "$AR_SDK/$MEMCONF"
fi
if [ -e "$AR_SDK/platformio-build.py" ]; then
rm -rf "$AR_SDK/platformio-build.py"
if [ -e "$AR_SDK/pioarduino-build.py" ]; then
rm -rf "$AR_SDK/pioarduino-build.py"
fi

mkdir -p "$AR_SDK"
mkdir -p "$AR_SDK/lib"

function get_actual_path(){
p="$PWD"; cd "$1"; r="$PWD"; cd "$p"; echo "$r";
d="$1";
if [ -d "$d" ]; then
p="$PWD"; cd "$d"; r="$PWD"; cd "$p"; echo "$r";
else
echo "";
fi
}

#
@@ -56,6 +63,8 @@ AS_FLAGS=""
INCLUDES=""
DEFINES=""

EXCLUDE_LIBS=";"

LD_FLAGS=""
LD_LIBS=""
LD_LIB_FILES=""
@@ -64,7 +73,7 @@ LD_SCRIPTS=""
LD_SCRIPT_DIRS=""

PIO_CC_FLAGS="-flto=auto "
PIO_C_FLAGS=""
PIO_C_FLAGS="-flto=auto "
PIO_CXX_FLAGS="-flto=auto "
PIO_AS_FLAGS=""
PIO_LD_FLAGS="-flto "
@@ -78,6 +87,17 @@ else
TOOLCHAIN="riscv32-esp-elf"
fi

# copy zigbee + zboss lib
if [ -d "managed_components/espressif__esp-zigbee-lib/lib/$IDF_TARGET/" ]; then
cp -r "managed_components/espressif__esp-zigbee-lib/lib/$IDF_TARGET"/* "$AR_SDK/lib/"
EXCLUDE_LIBS+="esp_zb_api_ed;"
fi

if [ -d "managed_components/espressif__esp-zboss-lib/lib/$IDF_TARGET/" ]; then
cp -r "managed_components/espressif__esp-zboss-lib/lib/$IDF_TARGET"/* "$AR_SDK/lib/"
EXCLUDE_LIBS+="zboss_stack.ed;zboss_port.debug;"
fi

#collect includes, defines and c-flags
str=`cat build/compile_commands.json | grep arduino-lib-builder-gcc.c | grep command | cut -d':' -f2 | cut -d',' -f1`
str="${str:2:${#str}-1}" #remove leading space and quotes
@@ -102,13 +122,13 @@ for item in "${@:2:${#@}-5}"; do
INCLUDES+="$item "
fi
elif [ "$prefix" = "-D" ]; then
if [[ "${item:2:7}" != "ARDUINO" ]] && [[ "$item" != "-DESP32=ESP32" ]]; then #skip ARDUINO defines
if [[ "${item:2:7}" != "ARDUINO" ]] && [[ "$item" != "-DESP32=ESP32" ]] && [[ "$item" != "-DNDEBUG" ]]; then #skip ARDUINO defines
DEFINES+="$item "
fi
elif [ "$prefix" = "-O" ]; then
PIO_CC_FLAGS+="$item "
elif [[ "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" ]]; then
if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" && "${item:0:20}" != "-fdiagnostics-color=" && "${item:0:19}" != "-fdebug-prefix-map=" ]]; then
if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" && "${item:0:20}" != "-fdiagnostics-color=" && "${item:0:19}" != "-fdebug-prefix-map=" && "${item:0:8}" != "-fno-lto" ]]; then
C_FLAGS+="$item "
fi
fi
@@ -200,12 +220,14 @@ for item; do
add_next=1
LD_FLAGS+="$item "
elif [ "${item:0:2}" = "-l" ]; then # -l[lib_name]
LD_LIBS+="$item "
exclude_libs=";m;c;gcc;stdc++;"
short_name="${item:2}"
if [[ $exclude_libs != *";$short_name;"* && $LD_LIBS_SEARCH != *"lib$short_name.a"* ]]; then
LD_LIBS_SEARCH+="lib$short_name.a "
#echo "lib add: $item"
if [[ $EXCLUDE_LIBS != *";$short_name;"* ]]; then
LD_LIBS+="$item "
exclude_libs=";m;c;gcc;stdc++;"
if [[ $exclude_libs != *";$short_name;"* && $LD_LIBS_SEARCH != *"lib$short_name.a"* ]]; then
LD_LIBS_SEARCH+="lib$short_name.a "
#echo "1. lib add: $item"
fi
fi
elif [ "$item" = "-o" ]; then
add_next=0
@@ -244,30 +266,38 @@ for item; do
if [[ $LD_LIB_FILES != *"$item"* ]]; then
# do we already have lib with the same name?
if [[ $LD_LIBS != *"-l$lname"* ]]; then
# echo "collecting lib '$lname' and file: $item"
LD_LIB_FILES+="$item "
LD_LIBS+="-l$lname "
if [[ $EXCLUDE_LIBS != *";$lname;"* ]]; then
#echo "2. collecting lib '$lname' and file: $item"
LD_LIB_FILES+="$item "
LD_LIBS+="-l$lname "
fi
else
# echo "!!! need to rename: '$lname'"
for i in {2..9}; do
n_item="${item:0:${#item}-2}_$i.a"
n_name=$lname"_$i"
if [ -f "$n_item" ]; then
# echo "renamed add: -l$n_name"
LD_LIBS+="-l$n_name "
if [[ $EXCLUDE_LIBS != *";$lname;"* ]]; then
#echo "3. renamed add: -l$n_name"
LD_LIBS+="-l$n_name "
fi
break
elif [[ $LD_LIB_FILES != *"$n_item"* && $LD_LIBS != *"-l$n_name"* ]]; then
echo "Renaming '$lname' to '$n_name': $item"
cp -f "$item" "$n_item"
LD_LIB_FILES+="$n_item "
LD_LIBS+="-l$n_name "
if [[ $EXCLUDE_LIBS != *";$lname;"* ]]; then
#echo "4. Renaming '$lname' to '$n_name': $item"
cp -f "$item" "$n_item"
LD_LIB_FILES+="$n_item "
LD_LIBS+="-l$n_name "
fi
break
fi
done
fi
else
# echo "just add: -l$lname"
LD_LIBS+="-l$lname "
if [[ $EXCLUDE_LIBS != *";$lname;"* ]]; then
#echo "5. just add: -l$lname"
LD_LIBS+="-l$lname "
fi
fi
else
echo "*** Skipping $(basename $item): size too small $lsize"
@@ -288,8 +318,8 @@ done

mkdir -p "$AR_SDK"

# start generation of platformio-build.py
AR_PLATFORMIO_PY="$AR_SDK/platformio-build.py"
# start generation of pioarduino-build.py
AR_PLATFORMIO_PY="$AR_SDK/pioarduino-build.py"
cat configs/pio_start.txt > "$AR_PLATFORMIO_PY"

echo " ASFLAGS=[" >> "$AR_PLATFORMIO_PY"
@@ -427,8 +457,6 @@ echo " join(FRAMEWORK_DIR, \"cores\", board_config.get(\"build.core\"))"
echo " ]," >> "$AR_PLATFORMIO_PY"
echo "" >> "$AR_PLATFORMIO_PY"

mkdir -p "$AR_SDK/lib"

AR_LIBS="$LD_LIBS"
PIO_LIBS=""
set -- $LD_LIBS
@@ -461,7 +489,8 @@ echo "" >> "$AR_PLATFORMIO_PY"
echo " CPPDEFINES=[" >> "$AR_PLATFORMIO_PY"
set -- $DEFINES
for item; do
item="${item:2}" #remove -D
item="${item:2}" #remove -D
item="${item/NDEBUG}" #remove NDEBUG
if [[ $item == *"="* ]]; then
item=(${item//=/ })
re='^[+-]?[0-9]+([.][0-9]+)?$'
@@ -493,15 +522,6 @@ echo -n "$LD_FLAGS" > "$FLAGS_DIR/ld_flags"
echo -n "$LD_SCRIPTS" > "$FLAGS_DIR/ld_scripts"
echo -n "$AR_LIBS" > "$FLAGS_DIR/ld_libs"

# copy zigbee + zboss lib
if [ -d "managed_components/espressif__esp-zigbee-lib/lib/$IDF_TARGET/" ]; then
cp -r "managed_components/espressif__esp-zigbee-lib/lib/$IDF_TARGET"/* "$AR_SDK/lib/"
fi

if [ -d "managed_components/espressif__esp-zboss-lib/lib/$IDF_TARGET/" ]; then
cp -r "managed_components/espressif__esp-zboss-lib/lib/$IDF_TARGET"/* "$AR_SDK/lib/"
fi

if [ -d "managed_components/espressif__esp32-camera/driver/private_include/" ]; then
cp -r "managed_components/espressif__esp32-camera/driver/private_include/cam_hal.h" "$AR_SDK/include/espressif__esp32-camera/driver/include/"
fi
3 changes: 3 additions & 0 deletions tools/install-arduino.sh
Original file line number Diff line number Diff line change
@@ -77,8 +77,10 @@ rm -rf "$AR_COMPS/arduino/docs"
rm -rf "$AR_COMPS/arduino/idf_component_examples"
rm -rf "$AR_COMPS/arduino/package"
rm -rf "$AR_COMPS/arduino/tests"
rm -rf "$AR_COMPS/arduino/tools/pre-commit"
rm -rf "$AR_COMPS/arduino/cores/esp32/chip-debug-report.cpp"
rm -rf "$AR_COMPS/arduino/cores/esp32/chip-debug-report.h"
rm -rf "$AR_COMPS/arduino/libraries/Matter"
rm -rf "$AR_COMPS/arduino/libraries/RainMaker"
rm -rf "$AR_COMPS/arduino/libraries/Insights"
rm -rf "$AR_COMPS/arduino/libraries/ESP_I2S"
@@ -94,3 +96,4 @@ rm -rf "$AR_COMPS/arduino/libraries/ESP_SR"
rm -rf "$AR_COMPS/arduino/libraries/ESP_NOW"
rm -rf "$AR_COMPS/arduino/libraries/TFLiteMicro"
rm -rf "$AR_COMPS/arduino/libraries/OpenThread"
rm -rf "$AR_COMPS/arduino/libraries/Zigbee"
14 changes: 14 additions & 0 deletions tools/install-esp-idf.sh
Original file line number Diff line number Diff line change
@@ -49,10 +49,24 @@ else
fi

if [ "$IDF_TAG" ]; then
cd $IDF_PATH
git -C "$IDF_PATH" checkout "tags/$IDF_TAG"
git reset --hard "tags/$IDF_TAG"
git submodule update --recursive
git rm -r $IDF_PATH/components/wifi_provisioning
git rm -r $IDF_PATH/components/spiffs
git commit -m "delete components SPIFFS and wifi-provisioning"
cd -
idf_was_installed="1"
elif [ "$IDF_COMMIT" ]; then
cd $IDF_PATH
git -C "$IDF_PATH" checkout "$IDF_COMMIT"
git reset --hard $IDF_COMMIT
git submodule update --recursive
git rm -r $IDF_PATH/components/wifi_provisioning
git rm -r $IDF_PATH/components/spiffs
git commit -m "delete components SPIFFS and wifi-provisioning"
cd -
commit_predefined="1"
fi

4 changes: 4 additions & 0 deletions tools/patch-tinyusb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
mv components/arduino_tinyusb/src/dcd_dwc2.c components/arduino_tinyusb/src/dcd_dwc2.c.prev
cp components/arduino_tinyusb/tinyusb/src/portable/synopsys/dwc2/dcd_dwc2.c components/arduino_tinyusb/src/dcd_dwc2.c
patch -p1 -N -i components/arduino_tinyusb/patches/dcd_dwc2.patch
2 changes: 1 addition & 1 deletion tools/prepare-ci.sh
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
brew install gsed
brew install gawk
brew install gperf
brew install ninja
#brew install ninja
brew install ccache
python -m pip install --upgrade pip
pip install wheel future pyelftools