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: 2376
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.1_Arduino
Choose a head ref

Commits on May 13, 2024

  1. Copy the full SHA
    0df4f35 View commit details

Commits on May 20, 2024

  1. Copy the full SHA
    81f7e4b View commit details

Commits on May 29, 2024

  1. sort

    Jason2866 authored May 29, 2024
    Copy the full SHA
    e3f1ece View commit details

Commits on Jun 3, 2024

  1. Update idf_component.yml

    Jason2866 authored Jun 3, 2024
    Copy the full SHA
    6c91f5d View commit details

Commits on Jun 6, 2024

  1. OPI optimize / strip *.a

    Jason2866 authored Jun 6, 2024
    Copy the full SHA
    2cbcd16 View commit details

Commits on Jun 10, 2024

  1. Copy the full SHA
    05431c6 View commit details

Commits on Jun 11, 2024

  1. Update Kconfig.projbuild

    Jason2866 authored Jun 11, 2024
    Copy the full SHA
    4d59f76 View commit details
  2. Update dcd_dwc2.c

    Jason2866 authored Jun 11, 2024
    Copy the full SHA
    9a97b17 View commit details
  3. Copy the full SHA
    126f0b5 View commit details
  4. Copy the full SHA
    2ae2ad6 View commit details

Commits on Jun 19, 2024

  1. Copy the full SHA
    013b19e View commit details

Commits on Jun 24, 2024

  1. Copy the full SHA
    b459234 View commit details
  2. rm openthread

    Jason2866 authored Jun 24, 2024
    Copy the full SHA
    e072584 View commit details
  3. Copy the full SHA
    c32f580 View commit details

Commits on Jun 28, 2024

  1. Create mmu_map.diff

    Jason2866 authored Jun 28, 2024
    Copy the full SHA
    012937e View commit details
  2. Copy the full SHA
    c6714dd View commit details
  3. Allow using 3 different NTP servers and NTP over DHCP (#101)

    * allow using 3 different NTP servers and NTP over DHCP
    
    * undo wrong change
    
    ---------
    
    Co-authored-by: Jason2866 <24528715+Jason2866@users.noreply.github.com>
    vortigont and Jason2866 authored Jun 28, 2024
    Copy the full SHA
    5704442 View commit details

Commits on Jul 2, 2024

  1. Copy the full SHA
    a82459b View commit details

Commits on Jul 10, 2024

  1. Copy the full SHA
    7cf9f69 View commit details
  2. Update install-esp-idf.sh

    Jason2866 authored Jul 10, 2024
    Copy the full SHA
    24cf1c7 View commit details

Commits on Jul 12, 2024

  1. Fix i2s audio

    * enable `CONFIG_I2S_ISR_IRAM_SAFE`
    Jason2866 authored Jul 12, 2024
    Copy the full SHA
    f0e596d View commit details

Commits on Jul 13, 2024

  1. Update defconfig.esp32

    Jason2866 authored Jul 13, 2024
    Copy the full SHA
    dd17fc6 View commit details

Commits on Jul 19, 2024

  1. Copy the full SHA
    3db5a6e View commit details

Commits on Jul 23, 2024

  1. made scripts executable

    Jason2866 committed Jul 23, 2024
    Copy the full SHA
    58837ae View commit details
  2. made executable

    Jason2866 committed Jul 23, 2024
    Copy the full SHA
    8637457 View commit details
  3. make files executable

    Jason2866 committed Jul 23, 2024
    Copy the full SHA
    6a4f22b View commit details

Commits on Jul 31, 2024

  1. Update install-esp-idf.sh

    Jason2866 authored Jul 31, 2024
    Copy the full SHA
    c03ce77 View commit details
  2. Update config.sh

    Jason2866 authored Jul 31, 2024
    Copy the full SHA
    c953dce View commit details

Commits on Aug 10, 2024

  1. Update build.sh

    Jason2866 authored Aug 10, 2024
    Copy the full SHA
    8220957 View commit details
  2. Copy the full SHA
    959d6c2 View commit details

Commits on Aug 15, 2024

  1. Update pio_start.txt

    Jason2866 authored Aug 15, 2024
    Copy the full SHA
    e135e66 View commit details
  2. Update build.sh

    Jason2866 authored Aug 15, 2024
    Copy the full SHA
    5446b61 View commit details

Commits on Aug 19, 2024

  1. Update dcd_dwc2.c

    Jason2866 authored Aug 19, 2024
    Copy the full SHA
    543522b View commit details

Commits on Aug 21, 2024

  1. Update tusb_config.h

    Jason2866 authored Aug 21, 2024
    Copy the full SHA
    ac25b12 View commit details

Commits on Aug 24, 2024

  1. Update CMakeLists.txt

    Jason2866 authored Aug 24, 2024
    Copy the full SHA
    4700482 View commit details

Commits on Aug 28, 2024

  1. Copy the full SHA
    ce1721b View commit details

Commits on Aug 30, 2024

  1. Update build.sh

    Jason2866 authored Aug 30, 2024
    Copy the full SHA
    df66ca8 View commit details

Commits on Aug 31, 2024

  1. Update app.py

    Jason2866 authored Aug 31, 2024
    Copy the full SHA
    eca7e00 View commit details
  2. Create requirements.txt

    Jason2866 authored Aug 31, 2024
    Copy the full SHA
    9e5ba1c View commit details
  3. Update README.md

    Jason2866 authored Aug 31, 2024
    Copy the full SHA
    b41cf0b View commit details
  4. Update README.md

    Jason2866 authored Aug 31, 2024
    Copy the full SHA
    c7848c0 View commit details
  5. Update README.md

    Jason2866 authored Aug 31, 2024
    Copy the full SHA
    a26898f View commit details
  6. Update pio_end.txt

    Jason2866 authored Aug 31, 2024
    Copy the full SHA
    5acd5d4 View commit details

Commits on Sep 9, 2024

  1. Update defconfig.common

    Jason2866 authored Sep 9, 2024
    Copy the full SHA
    61be840 View commit details
  2. Update defconfig.common

    Jason2866 authored Sep 9, 2024
    Copy the full SHA
    26ec6e7 View commit details

Commits on Sep 10, 2024

  1. Update defconfig.common

    Jason2866 authored Sep 10, 2024
    Copy the full SHA
    aef1f37 View commit details

Commits on Sep 22, 2024

  1. Update defconfig.common

    Jason2866 authored Sep 22, 2024
    Copy the full SHA
    8a404f1 View commit details

Commits on Sep 27, 2024

  1. Fix remove Arduino defines

    Jason2866 authored Sep 27, 2024
    Copy the full SHA
    cb258fb View commit details

Commits on Oct 23, 2024

  1. Update CMakeLists.txt

    Jason2866 authored Oct 23, 2024
    Copy the full SHA
    b889ead View commit details
  2. Update dcd_dwc2.c

    Jason2866 authored Oct 23, 2024
    Copy the full SHA
    2520489 View commit details
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)
28 changes: 13 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,17 +2,17 @@

This repository contains the scripts that produce the libraries included with Tasmota esp32-arduino.

Tested on Ubuntu and MacOS.

### Build on Ubuntu
```bash
sudo apt update && sudo apt install -y git wget curl libssl-dev libncurses-dev flex bison gperf python3 cmake ninja-build ccache jq
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py && \
pip3 install setuptools pyserial click future wheel cryptography pyparsing pyelftools
git clone https://github.com/Jason2866/esp32-arduino-lib-builder
sudo apt-get install git wget curl libssl-dev libncurses-dev flex bison gperf python python-pip python-setuptools python-serial python-click python-cryptography python-future python-pyparsing python-pyelftools cmake ninja-build ccache jq
sudo pip install --upgrade pip
git clone https://github.com/espressif/esp32-arduino-lib-builder
cd esp32-arduino-lib-builder
./build.sh
```


### Using the User Interface

You can more easily build the libraries using the user interface found in the `tools/config_editor/` folder.
@@ -22,25 +22,23 @@ For more information and troubleshooting, please refer to the [UI README](tools/

To use it, follow these steps:

1. Make sure you have the required dependencies installed:
1. Make sure you have the following prerequisites:
- Python 3.9 or later
- The [Textual](https://github.com/textualize/textual/) library
- All the dependencies listed in the previous section

2. Execute the script `tools/config_editor/app.py` from any folder. It will automatically detect the path to the root of the repository.
2. Install the required UI packages using `pip install -r tools/config_editor/requirements.txt`.

3. Configure the compilation and ESP-IDF options as desired.
3. Execute the script `tools/config_editor/app.py` from any folder. It will automatically detect the path to the root of the repository.

4. Click on the "Compile Static Libraries" button to start the compilation process.
4. Configure the compilation and ESP-IDF options as desired.

5. The script will show the compilation output in a new screen. Note that the compilation process can take many hours, depending on the number of libraries selected and the options chosen.
5. Click on the "Compile Static Libraries" button to start the compilation process.

6. If the compilation is successful you can find the Platformio framework in the `dist` folder alongside this repository.
6. The script will show the compilation output in a new screen. Note that the compilation process can take many hours, depending on the number of libraries selected and the options chosen.

7. If the compilation is successful and the option to copy the libraries to the Arduino Core folder is enabled, it will already be available for use in the Arduino IDE. Otherwise, you can find the compiled libraries in the `esp32-arduino-libs` folder alongside this repository.
- Note that the copy operation doesn't currently support the core downloaded from the Arduino IDE Boards Manager, only the manual installation from the [`arduino-esp32`](https://github.com/espressif/arduino-esp32) repository.

### Documentation

For more information about how to use the Library builder, please refer to this [Documentation page](https://docs.espressif.com/projects/arduino-esp32/en/latest/lib_builder.html?highlight=lib%20builder)

### Development builds
Look in release and download a version. There is the Info of the used commits of IDF / Arduino.
22 changes: 19 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
#!/bin/bash

if ! [ -x "$(command -v python3)" ]; then
echo "ERROR: python is not installed! Please install python first."
echo "ERROR: python is not installed or not in PATH! Please install python first."
exit 1
fi

if ! [ -x "$(command -v git)" ]; then
echo "ERROR: git is not installed! Please install git first."
echo "ERROR: git is not installed or not in PATH! Please install git first."
exit 1
fi

if ! [ -x "$(command -v ninja)" ]; then
echo "ERROR: ninja is not installed or not in PATH! Please install ninja first."
exit 1
fi

# Fixes building some components. See https://github.com/espressif/arduino-esp32/issues/10167
export IDF_COMPONENT_OVERWRITE_MANAGED_COMPONENTS=1

CCACHE_ENABLE=1

export TARGET="all"
BUILD_TYPE="all"
SKIP_ENV=0
@@ -18,8 +28,9 @@ ARCHIVE_OUT=1
DEPLOY_OUT=0

function print_help() {
echo "Usage: build.sh [-s] [-A <arduino_branch>] [-I <idf_branch>] [-i <idf_commit>] [-c <path>] [-t <target>] [-b <build|menuconfig|reconfigure|idf-libs|copy-bootloader|mem-variant>] [config ...]"
echo "Usage: build.sh [-s] [-n] [-A <arduino_branch>] [-I <idf_branch>] [-i <idf_commit>] [-c <path>] [-t <target>] [-b <build|menuconfig|reconfigure|idf-libs|copy-bootloader|mem-variant>] [config ...]"
echo " -s Skip installing/updating of ESP-IDF and all components"
echo " -n Disable ccache"
echo " -A Set which branch of arduino-esp32 to be used for compilation"
echo " -I Set which branch of ESP-IDF to be used for compilation"
echo " -i Set which commit of ESP-IDF to be used for compilation"
@@ -35,6 +46,9 @@ while getopts ":A:I:i:c:t:b:sde" opt; do
s )
SKIP_ENV=1
;;
n )
CCACHE_ENABLE=0
;;
e )
ARCHIVE_OUT=1
;;
@@ -75,6 +89,8 @@ done
shift $((OPTIND -1))
CONFIGS=$@

export IDF_CCACHE_ENABLE=$CCACHE_ENABLE

# Output the TARGET array
echo "TARGET(s): ${TARGET[@]}"

31 changes: 18 additions & 13 deletions components/arduino_tinyusb/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -15,15 +15,20 @@ if(CONFIG_TINYUSB_ENABLED)
"-DCFG_TUSB_DEBUG=${CONFIG_TINYUSB_DEBUG_LEVEL}"
"-Wno-type-limits" # needed for the vanila tinyusb with turned off classes
)
elseif(IDF_TARGET STREQUAL "esp32p4")
set(compile_options
"-DCFG_TUSB_MCU=OPT_MCU_ESP32P4"
"-DCFG_TUSB_DEBUG=${CONFIG_TINYUSB_DEBUG_LEVEL}"
"-Wno-type-limits" # needed for the vanila tinyusb with turned off classes
)
endif()

set(srcs
# espressif:
"${COMPONENT_DIR}/src/dcd_esp32sx.c"
#"${COMPONENT_DIR}/src/dcd_dwc2.c"
"${COMPONENT_DIR}/src/dcd_dwc2.c"
# tusb:
#"${COMPONENT_DIR}/tinyusb/src/portable/espressif/esp32sx/dcd_esp32sx.c"
#"{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"
@@ -32,6 +37,7 @@ if(CONFIG_TINYUSB_ENABLED)
"${COMPONENT_DIR}/tinyusb/src/class/dfu/dfu_rt_device.c"
"${COMPONENT_DIR}/tinyusb/src/class/dfu/dfu_device.c"
"${COMPONENT_DIR}/tinyusb/src/class/vendor/vendor_device.c"
"${COMPONENT_DIR}/tinyusb/src/class/net/ncm_device.c"
"${COMPONENT_DIR}/tinyusb/src/common/tusb_fifo.c"
"${COMPONENT_DIR}/tinyusb/src/device/usbd_control.c"
"${COMPONENT_DIR}/tinyusb/src/device/usbd.c"
@@ -56,16 +62,15 @@ if(CONFIG_TINYUSB_ENABLED)

set(requires esp_rom freertos soc)
set(priv_requires arduino main)
### tinyusb lib ###
###################
idf_component_register(INCLUDE_DIRS ${includes_public} PRIV_INCLUDE_DIRS ${includes_private} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires})
# add_library(${COMPONENT_TARGET} STATIC ${srcs})
# target_include_directories(
# ${COMPONENT_TARGET}
# PUBLIC ${includes_public}
# PRIVATE ${includes_private})

idf_component_register(
INCLUDE_DIRS ${includes_public}
PRIV_INCLUDE_DIRS ${includes_private}
SRCS ${srcs}
REQUIRES ${requires}
PRIV_REQUIRES ${priv_requires}
)
target_compile_options(${COMPONENT_TARGET} PRIVATE ${compile_options})
#target_link_libraries(${COMPONENT_TARGET} INTERFACE ${COMPONENT_TARGET})

else()

48 changes: 38 additions & 10 deletions components/arduino_tinyusb/Kconfig.projbuild
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
menu "Arduino TinyUSB"
depends on ENABLE_ARDUINO_DEPENDS && SOC_USB_OTG_SUPPORTED

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
@@ -27,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"
@@ -85,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
@@ -110,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
@@ -142,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
@@ -218,20 +233,33 @@ 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

endmenu

menu "NCM driver"
depends on TINYUSB_ENABLED

config TINYUSB_NCM_ENABLED
bool "Enable USB NCM TinyUSB driver"
default y
help
Enable USB NCM TinyUSB driver.

endmenu

config TINYUSB_DEBUG_LEVEL
int "TinyUSB log level (0-3)"
default 0
21 changes: 19 additions & 2 deletions components/arduino_tinyusb/include/tusb_config.h
Original file line number Diff line number Diff line change
@@ -72,11 +72,16 @@ extern "C" {
# define CONFIG_TINYUSB_VENDOR_ENABLED 0
#endif

#ifndef CONFIG_TINYUSB_NCM_ENABLED
# define CONFIG_TINYUSB_NCM_ENABLED 0
#endif

/* */
/* COMMON CONFIGURATION */
/* */

#ifndef CFG_TUSB_MCU
#define CFG_TUSB_MCU OPT_MCU_ESP32S2
#endif
#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE
#define CFG_TUSB_OS OPT_OS_FREERTOS

@@ -95,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
@@ -112,6 +128,7 @@ extern "C" {
#define CFG_TUD_DFU_RUNTIME CONFIG_TINYUSB_DFU_RT_ENABLED
#define CFG_TUD_DFU CONFIG_TINYUSB_DFU_ENABLED
#define CFG_TUD_VENDOR CONFIG_TINYUSB_VENDOR_ENABLED
#define CFG_TUD_NCM CONFIG_TINYUSB_NCM_ENABLED

// CDC FIFO size of TX and RX
#define CFG_TUD_CDC_RX_BUFSIZE CONFIG_TINYUSB_CDC_RX_BUFSIZE
Loading