summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-04-03 17:44:05 +0700
committerhathach <[email protected]>2023-04-03 17:44:05 +0700
commit5ef260d5fceeef49c8d1eb08fe39a12712b1ae53 (patch)
treeee6ac3165de956cf284202bcdfc34844e3baf43a
parent1911c613c7f66d13bf22a1252144cadae1264533 (diff)
fix build for esp32
-rw-r--r--.github/workflows/build_esp.yml2
-rw-r--r--examples/CMakeLists.txt1
-rw-r--r--hw/bsp/espressif/boards/adafruit_feather_esp32s2/board.cmake1
-rw-r--r--hw/bsp/espressif/boards/adafruit_magtag_29gray/board.cmake1
-rw-r--r--hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.cmake1
-rw-r--r--hw/bsp/espressif/boards/espressif_addax_1/board.cmake1
-rw-r--r--hw/bsp/espressif/boards/espressif_kaluga_1/board.cmake1
-rw-r--r--hw/bsp/espressif/boards/espressif_s3_devkitc/board.cmake1
-rw-r--r--hw/bsp/espressif/boards/espressif_s3_devkitm/board.cmake1
-rw-r--r--hw/bsp/espressif/boards/espressif_saola_1/board.cmake1
-rw-r--r--hw/bsp/espressif/family.cmake6
-rw-r--r--tools/build_esp32.py (renamed from tools/build_esp32sx.py)0
-rw-r--r--tools/build_utils.py7
13 files changed, 15 insertions, 9 deletions
diff --git a/.github/workflows/build_esp.yml b/.github/workflows/build_esp.yml
index dbc51a60f..0a6815ea2 100644
--- a/.github/workflows/build_esp.yml
+++ b/.github/workflows/build_esp.yml
@@ -54,7 +54,7 @@ jobs:
path: linkermap
- name: Build
- run: docker run --rm -v $PWD:/project -w /project espressif/idf:latest python3 tools/build_esp32sx.py ${{ matrix.board }}
+ run: docker run --rm -v $PWD:/project -w /project espressif/idf:latest python3 tools/build_esp32.py ${{ matrix.board }}
- name: Linker Map
run: |
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 8f5626fa9..d91d8ca62 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 3.5)
+#set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include(${CMAKE_CURRENT_SOURCE_DIR}/../hw/bsp/family_support.cmake)
project(tinyusb_examples)
diff --git a/hw/bsp/espressif/boards/adafruit_feather_esp32s2/board.cmake b/hw/bsp/espressif/boards/adafruit_feather_esp32s2/board.cmake
index fcd2f6e9f..abbdf7abc 100644
--- a/hw/bsp/espressif/boards/adafruit_feather_esp32s2/board.cmake
+++ b/hw/bsp/espressif/boards/adafruit_feather_esp32s2/board.cmake
@@ -1,3 +1,2 @@
# Apply board specific content here
set(IDF_TARGET "esp32s2")
-set(FAMILY_MCUS ESP32S2)
diff --git a/hw/bsp/espressif/boards/adafruit_magtag_29gray/board.cmake b/hw/bsp/espressif/boards/adafruit_magtag_29gray/board.cmake
index fcd2f6e9f..abbdf7abc 100644
--- a/hw/bsp/espressif/boards/adafruit_magtag_29gray/board.cmake
+++ b/hw/bsp/espressif/boards/adafruit_magtag_29gray/board.cmake
@@ -1,3 +1,2 @@
# Apply board specific content here
set(IDF_TARGET "esp32s2")
-set(FAMILY_MCUS ESP32S2)
diff --git a/hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.cmake b/hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.cmake
index fcd2f6e9f..abbdf7abc 100644
--- a/hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.cmake
+++ b/hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.cmake
@@ -1,3 +1,2 @@
# Apply board specific content here
set(IDF_TARGET "esp32s2")
-set(FAMILY_MCUS ESP32S2)
diff --git a/hw/bsp/espressif/boards/espressif_addax_1/board.cmake b/hw/bsp/espressif/boards/espressif_addax_1/board.cmake
index bc528e9fa..9bac46d64 100644
--- a/hw/bsp/espressif/boards/espressif_addax_1/board.cmake
+++ b/hw/bsp/espressif/boards/espressif_addax_1/board.cmake
@@ -1,3 +1,2 @@
# Apply board specific content here
set(IDF_TARGET "esp32s3")
-set(FAMILY_MCUS ESP32S3)
diff --git a/hw/bsp/espressif/boards/espressif_kaluga_1/board.cmake b/hw/bsp/espressif/boards/espressif_kaluga_1/board.cmake
index fcd2f6e9f..abbdf7abc 100644
--- a/hw/bsp/espressif/boards/espressif_kaluga_1/board.cmake
+++ b/hw/bsp/espressif/boards/espressif_kaluga_1/board.cmake
@@ -1,3 +1,2 @@
# Apply board specific content here
set(IDF_TARGET "esp32s2")
-set(FAMILY_MCUS ESP32S2)
diff --git a/hw/bsp/espressif/boards/espressif_s3_devkitc/board.cmake b/hw/bsp/espressif/boards/espressif_s3_devkitc/board.cmake
index bc528e9fa..9bac46d64 100644
--- a/hw/bsp/espressif/boards/espressif_s3_devkitc/board.cmake
+++ b/hw/bsp/espressif/boards/espressif_s3_devkitc/board.cmake
@@ -1,3 +1,2 @@
# Apply board specific content here
set(IDF_TARGET "esp32s3")
-set(FAMILY_MCUS ESP32S3)
diff --git a/hw/bsp/espressif/boards/espressif_s3_devkitm/board.cmake b/hw/bsp/espressif/boards/espressif_s3_devkitm/board.cmake
index bc528e9fa..9bac46d64 100644
--- a/hw/bsp/espressif/boards/espressif_s3_devkitm/board.cmake
+++ b/hw/bsp/espressif/boards/espressif_s3_devkitm/board.cmake
@@ -1,3 +1,2 @@
# Apply board specific content here
set(IDF_TARGET "esp32s3")
-set(FAMILY_MCUS ESP32S3)
diff --git a/hw/bsp/espressif/boards/espressif_saola_1/board.cmake b/hw/bsp/espressif/boards/espressif_saola_1/board.cmake
index fcd2f6e9f..abbdf7abc 100644
--- a/hw/bsp/espressif/boards/espressif_saola_1/board.cmake
+++ b/hw/bsp/espressif/boards/espressif_saola_1/board.cmake
@@ -1,3 +1,2 @@
# Apply board specific content here
set(IDF_TARGET "esp32s2")
-set(FAMILY_MCUS ESP32S2)
diff --git a/hw/bsp/espressif/family.cmake b/hw/bsp/espressif/family.cmake
index 954dc635b..92a9bcb04 100644
--- a/hw/bsp/espressif/family.cmake
+++ b/hw/bsp/espressif/family.cmake
@@ -3,6 +3,12 @@ cmake_minimum_required(VERSION 3.5)
# Apply board specific content i.e IDF_TARGET must be set before project.cmake is included
include("${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake")
+if(IDF_TARGET STREQUAL "esp32s2")
+ set(FAMILY_MCUS ESP32S2)
+elseif(IDF_TARGET STREQUAL "esp32s3")
+ set(FAMILY_MCUS ESP32S3)
+endif()
+
# Add example src and bsp directories
set(EXTRA_COMPONENT_DIRS "src" "${CMAKE_CURRENT_LIST_DIR}/boards" "${CMAKE_CURRENT_LIST_DIR}/components")
diff --git a/tools/build_esp32sx.py b/tools/build_esp32.py
index 00783bf58..00783bf58 100644
--- a/tools/build_esp32sx.py
+++ b/tools/build_esp32.py
diff --git a/tools/build_utils.py b/tools/build_utils.py
index 905d06a86..ec850e732 100644
--- a/tools/build_utils.py
+++ b/tools/build_utils.py
@@ -53,6 +53,13 @@ def skip_example(example, board):
token = token.strip("\"")
_, opt_mcu = token.split("=")
mcu = opt_mcu[len("OPT_MCU_"):]
+ break
+ if "esp32s2" in token:
+ mcu = "ESP32S2"
+ break
+ if "esp32s3" in token:
+ mcu = "ESP32S3"
+ break
# Skip all OPT_MCU_NONE these are WIP port
if mcu == "NONE":