Skip to content

Neurotech-Hub/arduino-esp32-hub

Repository files navigation

esp32 Hub

Custom variants and patches for the ESP32 Arduino core, maintained by Neurotech Hub.

Installation

  1. Add the following URL to Arduino IDE's Additional Board Manager URLs: https://raw.githubusercontent.com/Neurotech-Hub/arduino-esp32-hub/main/package_esp32hub_index.json

  2. Open the Boards Manager in Arduino IDE

  3. Search for "ESP32 Hub"

  4. Install the package

Development Setup

  1. Ensure cached versions of packages and package_*.json are deleted (e.g., ~/Library/Arduino15).
  2. Restart Arduino IDE.
  3. Install the ESP32 Hub package from Boards Manager.

Development

Complete Workflow

Performing the operations below maintains only a single version of the boards. Managing legacy versions is not currently supported and would require re-tooling.

  1. Initial setup (only needed once). First, update the ESP32_CORE_VERSION.

    python3 tools/create_package.py setup

    This downloads the original ESP32 core files to working/original/

  2. Make modifications:

    • Copy files you want to modify from working/original/ to working/modified/
    • Maintain the same directory structure (e.g., working/modified/libraries/BLE/src/BLE2902.cpp)
    • Make your modifications in the working/modified/ files
  3. Create patches:

    # Optional: clean existing patches
    rm -rf patches/3.x.x/*.patch
    
    # Create new patches
    python3 tools/create_package.py create-patches

    This creates .patch files in patches/3.x.x/ by comparing original and modified files

  4. Update tools dependencies (if needed). First, update the CORE_VERSION.

    # Install required Python package
    pip install requests
    
    # Update tool dependencies from ESP32 core
    python3 tools/update_tools.py

    This fetches and updates the toolsDependencies in package_esp32hub_index.json

  5. Update the package_esp32hub_.json file with the updated version, url, archiveFileName, and additional boards (if needed). Build and release:

    python3 tools/create_package.py release

    This will:

    • Download a fresh copy of the ESP32 core
    • Apply your patches
    • Copy all core files to the package
    • Overwrite with custom boards.txt and variants (if present)
    • Create the package ZIP
    • Update package_esp32hub_index.json with new size and checksum

    Then create a GitHub Release:

    • Go to GitHub > Releases > "Create a new release"
    • Tag version: v3.0.7
    • Release title: ESP32 Hub v3.0.7
    • Upload the generated esp32-hub-3.0.7.zip file
    • Publish release
  6. Verify:

    python3 tools/check_variants.py
    • Check that all patches applied successfully
    • Test the package in Arduino IDE
    • Commit and push changes to GitHub

File Structure

arduino-esp32-hub/
├── working/
│   ├── original/          # Original ESP32 core files
│   └── modified/         # Your modified files (same structure as original)
├── patches/
│   └── 3.0.7/           # Generated patch files
├── boards.txt            # Optional: Custom boards configuration
├── variants/             # Optional: Custom board variants
├── package_esp32hub_index.json
└── tools/
    ├── create_package.py # Package creation tool
    └── update_tools.py   # Tools dependency updater

Notes

  • Only files that need modifications should be copied to working/modified/
  • The package will use all files from the ESP32 core and overwrite with any custom files
  • Patches are automatically generated by comparing original and modified files
  • Custom boards.txt and variants directory are optional

License

This project contains modifications to the ESP32 Arduino core, which is licensed under LGPL-2.1.

About

Arduino ESP32 Core with patched BLE.

Resources

Stars

Watchers

Forks

Packages

No packages published