Supports the different ESP32 chips:
- ESP32
- ESP32-S3
- ESP32-C3 / ESP32-C6
- ESP32-H2
-
Install ESP-IDF
Install the ESP32 toolchain. Use version 5.3. Might work on newer / older ones, but not tested.
-
Integrate BTstack into ESP32
cd ${BLUEPAD32}/external/btstack/port/esp32 # This will install BTstack as a component inside Bluepad32 source code (recommended). # Remove "IDF_PATH=../../../../src" if you want it installed in the ESP-IDF folder IDF_PATH=../../../../src ./integrate_btstack.py
-
Compile Bluepad32
# Possible options: esp32, esp32-s3, esp32-c3, esp32-c6 or esp32-h2 idf.py set-target esp32
And compile it:
idf.py build
-
Flash it
idf.py flash monitor
In case you need to debug an ESP32-S3 (or ESP32-C3 / C6) using JTAG, follow these steps: (or read ESP32 JTAG Debugging).
Note: If you have a standard ESP32, you can do it with an ESP-PROG module.
TL;DR: Open 3 terminals, and do:
idf.py openocd
Or if you prefer the verbose way (but not both):
# Open OpenOCD
# Valid for ESP32-S3. Change it to "esp32c3-builtin.cfg" for ESP32-C3
sudo openocd -f board/esp32s3-builtin.cfg -c "adapter speed 5000"
idf.py gdb
Or if you prefer the verbose way (but not both):
xtensa-esp32s3-elf-gdb bluepad32_esp32_example_app.elf
> target remote :3333
> set remote hardware-watchpoint-limit 2
> mon reset halt
> maintenance flush register-cache
> thb app_main
> c
# macOS
tio /dev/tty.usbmodem21202
# Linux
tio /dev/ttyACM0
- Example code: licensed under Public Domain.
- Bluepad32: licensed under Apache 2.
- BTstack:
- Free to use for open source projects.
- Paid for commercial projects.
- https://github.com/bluekitchen/btstack/blob/master/LICENSE