Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
a9b5dae
feat(esp-idf tests): add common CMake, download_deps.sh and run_test.sh
medexs Jan 14, 2026
65f1a3e
feat(esp-idf tests): add support for ESP32-DevKitC V4
medexs Jan 14, 2026
cc67a04
feat,build(functional tests): add LT_CAL_LINK_DEPS to be able not to …
medexs Jan 14, 2026
9986a3e
refactor(tests/functional/esp-idf/common.cmake): dont use CAL macros,…
medexs Jan 14, 2026
643cb87
feat(esp-idf tests): add support for ESP32-S3-DevKitC-1
medexs Jan 14, 2026
8e566fd
build(esp-idf tests): specify spefic driver components
medexs Jan 15, 2026
927b965
feat(esp-idf hello_world): add first version of the project
medexs Jan 15, 2026
920ba05
build(esp-idf hello_world): better comments
medexs Jan 15, 2026
372800a
refactor(ESP32-DevKitC-V4 tests): use VSPI_HOST macro for spi_host_id
medexs Jan 15, 2026
2206d4a
feat(esp-idf hello_world): add sdkconfig for from tests ESP32-DevKit-V4
medexs Jan 15, 2026
761a35f
feat(ESP32-DevKit-V4): finish hello_world
medexs Jan 15, 2026
c4b83cf
refactor(ESP32-DevKit-V4 hello_world): logging, more comments
medexs Jan 15, 2026
48f787b
feat(ESP32-DevKit-V4): implement identify_chip example
medexs Jan 15, 2026
230c61b
feat(ESP32-DevKit-V4): add sdkconfig
medexs Jan 15, 2026
72b16cc
fix(ESP32-DevKit-V4/identify_chip): project name
medexs Jan 15, 2026
58f4c70
refactor(ESP32-DevKit-V4/identify_chip): add comment about rebooting
medexs Jan 15, 2026
ba14cea
refactor(ESP32-DevKit-V4/identify_chip): add comment about my_esp_log…
medexs Jan 15, 2026
ab85c32
feat(ESP32-DevKit-V4): add fw_update example
medexs Jan 15, 2026
1c01f49
refactor(examples/ESP32-DevKit-V4): remove sdkconfig, use sdkconfig.d…
medexs Jan 15, 2026
b94e38c
feat(ESP32-S3-DevKitC-1): add examples
medexs Jan 15, 2026
5f3f6ac
feat(examples/ESP32-DevKit-V4): make sdkconfig even more minimal
medexs Jan 16, 2026
6f8a333
fi,build(esp-idf tests): set policy setting based on cmake version
medexs Jan 16, 2026
7d7a919
feat(examples/ESP32-S3-DevKitC-1): use minimal sdkconfig
medexs Jan 16, 2026
a3a0cde
fix(esp-idf examples): call gpio_install_isr_service if int pin is used
medexs Jan 16, 2026
c917284
refactor(esp-idf tests): call gpio_install_isr_service only if interr…
medexs Jan 16, 2026
c22ccca
docs(esp-idf): mention that gpio_install_isr_service has to be called…
medexs Jan 16, 2026
1b0af3e
refactor(esp32): rename examples folder to esp32
medexs Jan 19, 2026
ae504b9
refactor(esp32): rename tests folder to esp32
medexs Jan 19, 2026
a6b255d
ci(esp32): build esp32 examples
medexs Jan 19, 2026
b093315
fix,ci(esp32): change directory with idf.py -C
medexs Jan 19, 2026
08baacc
fix,ci(esp32): source esp-idf's export.sh
medexs Jan 19, 2026
34e26d7
fix,ci(esp32): fix paths
medexs Jan 19, 2026
56baffb
docs(esp32): refer to esp-idf host platform as esp32 with a an esp-id…
medexs Jan 19, 2026
9e2b80d
docs(esp32): reorder platforms
medexs Jan 19, 2026
12486b7
docs(tutorials): add ESP32 tutorial
medexs Jan 19, 2026
35abb6a
fix(esp32 tests): typo in allocating
medexs Jan 19, 2026
b451999
fix,docs(esp32): fw update instructions
medexs Jan 19, 2026
17756b4
ci(esp32): sync action name
medexs Jan 19, 2026
dcb5cf6
fix(tests CMakeLists.txt): fix if logic
medexs Jan 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/esp32_build_examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build examples for ESP32 boards
on:
push:
branches:
- 'develop'
- 'master'
pull_request:
branches:
- 'master'
- 'develop'

jobs:
build_examples:
name: Build examples for ESP32 boards
runs-on: ubuntu-latest
container: espressif/idf:v5.5.1
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7

- name: Build ESP32-DevKit-V4 examples
run: |
. /opt/esp/idf/export.sh
idf.py -C examples/esp32/ESP32-DevKit-V4/hello_world/ build
idf.py -C examples/esp32/ESP32-DevKit-V4/identify_chip/ build
idf.py -C examples/esp32/ESP32-DevKit-V4/fw_update/ build

- name: Build ESP32-S3-DevKitC-1 examples
run: |
. /opt/esp/idf/export.sh
idf.py -C examples/esp32/ESP32-S3-DevKitC-1/hello_world/ build
idf.py -C examples/esp32/ESP32-S3-DevKitC-1/identify_chip/ build
idf.py -C examples/esp32/ESP32-S3-DevKitC-1/fw_update/ build
74 changes: 74 additions & 0 deletions docs/get_started/tutorials/esp32/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# ESP32 Tutorial
This tutorial will guide you through the building of the examples in the `examples/esp32/` directory. In this directory, there are multiple subdirectories for each supported ESP32 board. Instructions in this tutorial are common for all of the boards.

## Install Dependencies and Prepare the Repository
See below for instructions based on your OS.

!!! example "Installation instructions"
=== ":fontawesome-brands-linux: Linux"
1. Setup ESP-IDF and its dependencies:
- Complete the first 4 steps in the [official ESP-IDF setup guide](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/linux-macos-setup.html).
- We recommend getting the 5.5.1 version, but any 5.x.x version should work.
2. Get the Libtropic repository:
- Using git: `git clone https://github.com/tropicsquare/libtropic.git`
- Or you can download the [latest release](https://github.com/tropicsquare/libtropic/releases/latest).

=== ":fontawesome-brands-apple: macOS"
TBA

=== ":fontawesome-brands-windows: Windows"
TBA

## Start with our Examples!
Now, let's build and flash the available examples.

### Build and Run Hello World Example
!!! example "Building and running the Hello World example"
=== ":fontawesome-brands-linux: Linux"
```bash
cd examples/esp32/<your_board>/hello_world/
idf.py build flash monitor
```

=== ":fontawesome-brands-apple: macOS"
TBA

=== ":fontawesome-brands-windows: Windows"
TBA

After this, you should see a colored output in your terminal.

### Build and Run Chip Identification Example
!!! example "Building and running the Identify Chip example"
=== ":fontawesome-brands-linux: Linux"
```bash
cd examples/esp32/<your_board>/identify_chip/
idf.py build flash monitor
```

=== ":fontawesome-brands-apple: macOS"
TBA

=== ":fontawesome-brands-windows: Windows"
TBA

After this, you should see a colored output in your terminal.

### Build and Run a Firmware Update Example
!!! example "Building and running the Firmware Update example"
=== ":fontawesome-brands-linux: Linux"
```bash
cd examples/esp32/<your_board>/fw_update/
idf.py build flash monitor
```

=== ":fontawesome-brands-apple: macOS"
TBA

=== ":fontawesome-brands-windows: Windows"
TBA

After this, you should see a colored output in your terminal.

## FAQ
If you encounter any issues, please check the [FAQ](../../../faq.md) before filing an issue or reaching out to our [support](https://support.desk.tropicsquare.com/).
3 changes: 2 additions & 1 deletion docs/get_started/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ Pick a tutorial based on your host platform and a development kit you want to us

- :fontawesome-brands-linux: Linux
- [:fontawesome-solid-microchip: Raspberry Pi / Arduino devkit (raw SPI interface)](linux/arduino_rpi_shield.md)
- [:fontawesome-brands-usb: USB devkit](linux/usb_devkit.md)
- [:fontawesome-brands-usb: USB devkit](linux/usb_devkit.md)
- [ESP32](esp32/index.md)
13 changes: 13 additions & 0 deletions docs/other/supported_host_platforms/esp32.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ESP32
To support the widest range of Espressif SoCs possible, we provide a HAL directly for the [Espressif IoT Development Framework](https://github.com/espressif/esp-idf) (ESP-IDF). The HAL is available in the `libtropic/hal/esp-idf/` directory.

!!! info "ESP-IDF Version"
The ESP-IDF version tested with Libtropic is 5.5.1.

Currently tested ESP32 boards are:

- [ESP32-DevKitC-V4](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32/esp32-devkitc/user_guide.html)
- [ESP32-S3-DevKitC-1](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-devkitc-1/index.html)

## Initialization
If Libtropic's [LT_USE_INT_PIN](../../get_started/integrating_libtropic/how_to_configure/index.md#lt_use_int_pin) CMake option is used, the ESP-IDF HAL will use GPIO interrupts. This puts a requirement on your application β€” in your code, call the [`gpio_install_isr_service`](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/gpio.html#_CPPv424gpio_install_isr_servicei) function with parameter `0` before calling `lt_init`. This function has to be called **exactly once** in your application. See the ESP32 examples in the `examples/esp32/` directory for inspiration.
13 changes: 0 additions & 13 deletions docs/other/supported_host_platforms/esp_idf.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/other/supported_host_platforms/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
These are the currently supported host platforms:

- [STM32](stm32.md)
- [ESP32](esp32.md)
- [Linux](linux.md)
- [POSIX](posix.md)
- [ESP-IDF](esp_idf.md)
- [Arduino](arduino.md)

All HAL files can be found in the `libtropic/hal/` directory.
Expand Down
27 changes: 27 additions & 0 deletions examples/esp32/ESP32-DevKit-V4/fw_update/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
cmake_minimum_required(VERSION 3.16)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
idf_build_set_property(MINIMAL_BUILD ON)
project(fw_update)

# Add libtropic top-level project so its 'tropic' target is available to components.
# Add it after including IDF's project.cmake so IDF toolchain variables are configured.
set(PATH_LIBTROPIC ${CMAKE_CURRENT_LIST_DIR}/../../../../)
add_subdirectory(${PATH_LIBTROPIC} ${CMAKE_CURRENT_BINARY_DIR}/libtropic_build)

# Add libtropic's MbedTLS CAL.
add_subdirectory("${PATH_LIBTROPIC}cal/mbedtls_v4" ${CMAKE_CURRENT_BINARY_DIR}/mbedtls_v4_cal)
target_sources(tropic PRIVATE ${LT_CAL_SRCS})
target_include_directories(tropic PUBLIC ${LT_CAL_INC_DIRS})

# Add libtropic's ESP-IDF HAL.
add_subdirectory("${PATH_LIBTROPIC}hal/esp-idf" ${CMAKE_CURRENT_BINARY_DIR}/esp_idf_hal)
target_sources(tropic PRIVATE ${LT_HAL_SRCS})
target_include_directories(tropic PUBLIC ${LT_HAL_INC_DIRS})

# Link IDF components to libtropic's HAL and CAL, because they depend on them.
target_link_libraries(tropic PUBLIC
idf::mbedtls
idf::esp_driver_spi
idf::esp_driver_gpio
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.16)

# Path from this file to the libtropic repo root.
set(PATH_LIBTROPIC ${CMAKE_CURRENT_LIST_DIR}/../../../../../../)

# Register the libtropic component and list its dependencies.
idf_component_register(REQUIRES mbedtls esp_driver_spi esp_driver_gpio)

# Link the component library to the 'tropic' target from libtropic.
target_link_libraries(${COMPONENT_LIB} INTERFACE tropic)

3 changes: 3 additions & 0 deletions examples/esp32/ESP32-DevKit-V4/fw_update/main/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
idf_component_register(SRCS "main.c"
INCLUDE_DIRS "."
REQUIRES mbedtls libtropic)
Loading