summaryrefslogtreecommitdiff
path: root/hw/bsp
diff options
context:
space:
mode:
authorAlex Lisitsyn <[email protected]>2021-03-09 11:29:07 +0100
committerAlex Lisitsyn <[email protected]>2021-04-16 13:38:00 +0200
commit2f0cb8b5f1a944187635a58a748ed08738d324a5 (patch)
tree72948ac73b578aa315d37486f04fc2c3351ab9aa /hw/bsp
parentc611199632b9288eff76c1c4bfdce5d8cc024748 (diff)
tinyusb: add support of esp32s3 target
add support of new esp32s3 target and the board update the roles.mk wrapper to allow dfu flashing of espressif chip update examples to allow compilation for esp32s3_addax_1 board once the code is tested the PR to original tinyusb repo will be submitted
Diffstat (limited to 'hw/bsp')
-rw-r--r--hw/bsp/board_mcu.h3
-rw-r--r--hw/bsp/esp32s2/family.cmake6
-rw-r--r--hw/bsp/esp32s2/family.mk36
-rw-r--r--hw/bsp/esp32sx/boards/CMakeLists.txt (renamed from hw/bsp/esp32s2/boards/CMakeLists.txt)8
-rw-r--r--hw/bsp/esp32sx/boards/adafruit_feather_esp32s2/CMakeLists.txt15
-rw-r--r--hw/bsp/esp32sx/boards/adafruit_feather_esp32s2/board.h (renamed from hw/bsp/esp32s2/boards/adafruit_feather_esp32s2/board.h)0
-rw-r--r--hw/bsp/esp32sx/boards/adafruit_feather_esp32s2/board.mk3
-rw-r--r--hw/bsp/esp32sx/boards/adafruit_magtag_29gray/CMakeLists.txt15
-rw-r--r--hw/bsp/esp32sx/boards/adafruit_magtag_29gray/board.h (renamed from hw/bsp/esp32s2/boards/adafruit_magtag_29gray/board.h)0
-rw-r--r--hw/bsp/esp32sx/boards/adafruit_magtag_29gray/board.mk3
-rw-r--r--hw/bsp/esp32sx/boards/adafruit_metro_esp32s2/CMakeLists.txt15
-rw-r--r--hw/bsp/esp32sx/boards/adafruit_metro_esp32s2/board.h (renamed from hw/bsp/esp32s2/boards/adafruit_metro_esp32s2/board.h)0
-rw-r--r--hw/bsp/esp32sx/boards/adafruit_metro_esp32s2/board.mk3
-rw-r--r--hw/bsp/esp32sx/boards/esp32sx.c (renamed from hw/bsp/esp32s2/boards/esp32s2.c)0
-rw-r--r--hw/bsp/esp32sx/boards/espressif_addax_1/CMakeLists.txt15
-rw-r--r--hw/bsp/esp32sx/boards/espressif_addax_1/board.h44
-rw-r--r--hw/bsp/esp32sx/boards/espressif_addax_1/board.mk3
-rw-r--r--hw/bsp/esp32sx/boards/espressif_kaluga_1/CMakeLists.txt14
-rw-r--r--hw/bsp/esp32sx/boards/espressif_kaluga_1/board.h (renamed from hw/bsp/esp32s2/boards/espressif_kaluga_1/board.h)0
-rw-r--r--hw/bsp/esp32sx/boards/espressif_kaluga_1/board.mk3
-rw-r--r--hw/bsp/esp32sx/boards/espressif_saola_1/CMakeLists.txt14
-rw-r--r--hw/bsp/esp32sx/boards/espressif_saola_1/board.h (renamed from hw/bsp/esp32s2/boards/espressif_saola_1/board.h)0
-rw-r--r--hw/bsp/esp32sx/boards/espressif_saola_1/board.mk3
-rw-r--r--hw/bsp/esp32sx/components/led_strip/CMakeLists.txt (renamed from hw/bsp/esp32s2/components/led_strip/CMakeLists.txt)0
-rw-r--r--hw/bsp/esp32sx/components/led_strip/include/led_strip.h (renamed from hw/bsp/esp32s2/components/led_strip/include/led_strip.h)0
-rw-r--r--hw/bsp/esp32sx/components/led_strip/src/led_strip_rmt_ws2812.c (renamed from hw/bsp/esp32s2/components/led_strip/src/led_strip_rmt_ws2812.c)0
-rw-r--r--hw/bsp/esp32sx/family.cmake6
-rw-r--r--hw/bsp/esp32sx/family.mk26
28 files changed, 188 insertions, 47 deletions
diff --git a/hw/bsp/board_mcu.h b/hw/bsp/board_mcu.h
index b00958e5e..1a659c410 100644
--- a/hw/bsp/board_mcu.h
+++ b/hw/bsp/board_mcu.h
@@ -115,6 +115,9 @@
#elif CFG_TUSB_MCU == OPT_MCU_ESP32S2
// no header needed
+#elif CFG_TUSB_MCU == OPT_MCU_ESP32S3
+ // no header needed
+
#elif CFG_TUSB_MCU == OPT_MCU_DA1469X
#include "DA1469xAB.h"
diff --git a/hw/bsp/esp32s2/family.cmake b/hw/bsp/esp32s2/family.cmake
deleted file mode 100644
index c19221b14..000000000
--- a/hw/bsp/esp32s2/family.cmake
+++ /dev/null
@@ -1,6 +0,0 @@
-cmake_minimum_required(VERSION 3.5)
-
-# Add example src and bsp directories
-set(EXTRA_COMPONENT_DIRS "src" "${TOP}/hw/bsp/esp32s2/boards" "${TOP}/hw/bsp/esp32s2/components")
-include($ENV{IDF_PATH}/tools/cmake/project.cmake)
-set(SUPPORTED_TARGETS esp32s2)
diff --git a/hw/bsp/esp32s2/family.mk b/hw/bsp/esp32s2/family.mk
deleted file mode 100644
index 8bd290eb3..000000000
--- a/hw/bsp/esp32s2/family.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-#DEPS_SUBMODULES +=
-
-.PHONY: all clean flash
-
-all:
- idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) build
-
-build: all
-
-clean:
- idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) clean
-
-fullclean:
- idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) fullclean
-
-flash:
- idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) flash
-
-bootloader-flash:
- idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) bootloader-flash
-
-app-flash:
- idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) app-flash
-
-erase:
- idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) erase_flash
-
-monitor:
- idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) monitor
-
-uf2: $(BUILD)/$(PROJECT).uf2
-
-UF2_FAMILY_ID = 0xbfdd4eee
-$(BUILD)/$(PROJECT).uf2: $(BUILD)/$(PROJECT).bin
- @echo CREATE $@
- $(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f $(UF2_FAMILY_ID) -b 0x0 -c -o $@ $^
diff --git a/hw/bsp/esp32s2/boards/CMakeLists.txt b/hw/bsp/esp32sx/boards/CMakeLists.txt
index 98c929ef3..0d8de0895 100644
--- a/hw/bsp/esp32s2/boards/CMakeLists.txt
+++ b/hw/bsp/esp32sx/boards/CMakeLists.txt
@@ -1,12 +1,10 @@
-idf_component_register(SRCS esp32s2.c
+idf_component_register(SRCS esp32sx.c
INCLUDE_DIRS "." "${BOARD}"
PRIV_REQUIRES "driver"
REQUIRES freertos src led_strip)
-target_compile_options(${COMPONENT_TARGET} PUBLIC
- "-DCFG_TUSB_MCU=OPT_MCU_ESP32S2"
- "-DCFG_TUSB_OS=OPT_OS_FREERTOS"
-)
+# Apply board specific content
+add_subdirectory(${BOARD})
idf_component_get_property( FREERTOS_ORIG_INCLUDE_PATH freertos ORIG_INCLUDE_PATH)
target_include_directories(${COMPONENT_TARGET} PUBLIC
diff --git a/hw/bsp/esp32sx/boards/adafruit_feather_esp32s2/CMakeLists.txt b/hw/bsp/esp32sx/boards/adafruit_feather_esp32s2/CMakeLists.txt
new file mode 100644
index 000000000..fc7f5a43a
--- /dev/null
+++ b/hw/bsp/esp32sx/boards/adafruit_feather_esp32s2/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Apply board specific context here
+target_include_directories(${COMPONENT_LIB} PRIVATE .)
+
+message(STATUS "Apply board specific content ${BOARD}: $ENV{IDF_TARGET} " )
+idf_build_get_property(idf_target IDF_TARGET)
+
+if(NOT ${idf_target} STREQUAL "esp32s2")
+ message(STATUS "Incorrect target for board ${BOARD}: $ENV{IDF_TARGET} " )
+ set(IDF_TARGET "esp32s2" FORCE)
+endif()
+
+target_compile_options(${COMPONENT_TARGET} PUBLIC
+ "-DCFG_TUSB_MCU=OPT_MCU_ESP32S2"
+ "-DCFG_TUSB_OS=OPT_OS_FREERTOS"
+) \ No newline at end of file
diff --git a/hw/bsp/esp32s2/boards/adafruit_feather_esp32s2/board.h b/hw/bsp/esp32sx/boards/adafruit_feather_esp32s2/board.h
index 43e00901d..43e00901d 100644
--- a/hw/bsp/esp32s2/boards/adafruit_feather_esp32s2/board.h
+++ b/hw/bsp/esp32sx/boards/adafruit_feather_esp32s2/board.h
diff --git a/hw/bsp/esp32sx/boards/adafruit_feather_esp32s2/board.mk b/hw/bsp/esp32sx/boards/adafruit_feather_esp32s2/board.mk
new file mode 100644
index 000000000..7308a9f62
--- /dev/null
+++ b/hw/bsp/esp32sx/boards/adafruit_feather_esp32s2/board.mk
@@ -0,0 +1,3 @@
+IDF_TARGET = esp32s2
+
+$(info Processing of board.mk for board: $(BOARD){$(BOARD_PATH)}, family: $(FAMILY), target: $(IDF_TARGET)) \ No newline at end of file
diff --git a/hw/bsp/esp32sx/boards/adafruit_magtag_29gray/CMakeLists.txt b/hw/bsp/esp32sx/boards/adafruit_magtag_29gray/CMakeLists.txt
new file mode 100644
index 000000000..fc7f5a43a
--- /dev/null
+++ b/hw/bsp/esp32sx/boards/adafruit_magtag_29gray/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Apply board specific context here
+target_include_directories(${COMPONENT_LIB} PRIVATE .)
+
+message(STATUS "Apply board specific content ${BOARD}: $ENV{IDF_TARGET} " )
+idf_build_get_property(idf_target IDF_TARGET)
+
+if(NOT ${idf_target} STREQUAL "esp32s2")
+ message(STATUS "Incorrect target for board ${BOARD}: $ENV{IDF_TARGET} " )
+ set(IDF_TARGET "esp32s2" FORCE)
+endif()
+
+target_compile_options(${COMPONENT_TARGET} PUBLIC
+ "-DCFG_TUSB_MCU=OPT_MCU_ESP32S2"
+ "-DCFG_TUSB_OS=OPT_OS_FREERTOS"
+) \ No newline at end of file
diff --git a/hw/bsp/esp32s2/boards/adafruit_magtag_29gray/board.h b/hw/bsp/esp32sx/boards/adafruit_magtag_29gray/board.h
index 16e30b685..16e30b685 100644
--- a/hw/bsp/esp32s2/boards/adafruit_magtag_29gray/board.h
+++ b/hw/bsp/esp32sx/boards/adafruit_magtag_29gray/board.h
diff --git a/hw/bsp/esp32sx/boards/adafruit_magtag_29gray/board.mk b/hw/bsp/esp32sx/boards/adafruit_magtag_29gray/board.mk
new file mode 100644
index 000000000..7308a9f62
--- /dev/null
+++ b/hw/bsp/esp32sx/boards/adafruit_magtag_29gray/board.mk
@@ -0,0 +1,3 @@
+IDF_TARGET = esp32s2
+
+$(info Processing of board.mk for board: $(BOARD){$(BOARD_PATH)}, family: $(FAMILY), target: $(IDF_TARGET)) \ No newline at end of file
diff --git a/hw/bsp/esp32sx/boards/adafruit_metro_esp32s2/CMakeLists.txt b/hw/bsp/esp32sx/boards/adafruit_metro_esp32s2/CMakeLists.txt
new file mode 100644
index 000000000..fc7f5a43a
--- /dev/null
+++ b/hw/bsp/esp32sx/boards/adafruit_metro_esp32s2/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Apply board specific context here
+target_include_directories(${COMPONENT_LIB} PRIVATE .)
+
+message(STATUS "Apply board specific content ${BOARD}: $ENV{IDF_TARGET} " )
+idf_build_get_property(idf_target IDF_TARGET)
+
+if(NOT ${idf_target} STREQUAL "esp32s2")
+ message(STATUS "Incorrect target for board ${BOARD}: $ENV{IDF_TARGET} " )
+ set(IDF_TARGET "esp32s2" FORCE)
+endif()
+
+target_compile_options(${COMPONENT_TARGET} PUBLIC
+ "-DCFG_TUSB_MCU=OPT_MCU_ESP32S2"
+ "-DCFG_TUSB_OS=OPT_OS_FREERTOS"
+) \ No newline at end of file
diff --git a/hw/bsp/esp32s2/boards/adafruit_metro_esp32s2/board.h b/hw/bsp/esp32sx/boards/adafruit_metro_esp32s2/board.h
index 49a2474bc..49a2474bc 100644
--- a/hw/bsp/esp32s2/boards/adafruit_metro_esp32s2/board.h
+++ b/hw/bsp/esp32sx/boards/adafruit_metro_esp32s2/board.h
diff --git a/hw/bsp/esp32sx/boards/adafruit_metro_esp32s2/board.mk b/hw/bsp/esp32sx/boards/adafruit_metro_esp32s2/board.mk
new file mode 100644
index 000000000..7308a9f62
--- /dev/null
+++ b/hw/bsp/esp32sx/boards/adafruit_metro_esp32s2/board.mk
@@ -0,0 +1,3 @@
+IDF_TARGET = esp32s2
+
+$(info Processing of board.mk for board: $(BOARD){$(BOARD_PATH)}, family: $(FAMILY), target: $(IDF_TARGET)) \ No newline at end of file
diff --git a/hw/bsp/esp32s2/boards/esp32s2.c b/hw/bsp/esp32sx/boards/esp32sx.c
index 358c0c803..358c0c803 100644
--- a/hw/bsp/esp32s2/boards/esp32s2.c
+++ b/hw/bsp/esp32sx/boards/esp32sx.c
diff --git a/hw/bsp/esp32sx/boards/espressif_addax_1/CMakeLists.txt b/hw/bsp/esp32sx/boards/espressif_addax_1/CMakeLists.txt
new file mode 100644
index 000000000..b64efa399
--- /dev/null
+++ b/hw/bsp/esp32sx/boards/espressif_addax_1/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Apply board specific content here
+target_include_directories(${COMPONENT_LIB} PRIVATE .)
+
+message(STATUS "Apply board specific content ${BOARD}: $ENV{IDF_TARGET} " )
+idf_build_get_property(idf_target IDF_TARGET)
+
+if(NOT ${idf_target} STREQUAL "esp32s3")
+ message(STATUS "Incorrect target for board ${BOARD}: $ENV{IDF_TARGET} " )
+ set(IDF_TARGET "esp32s3" FORCE)
+endif()
+
+target_compile_options(${COMPONENT_TARGET} PUBLIC
+ "-DCFG_TUSB_MCU=OPT_MCU_ESP32S3"
+ "-DCFG_TUSB_OS=OPT_OS_FREERTOS"
+) \ No newline at end of file
diff --git a/hw/bsp/esp32sx/boards/espressif_addax_1/board.h b/hw/bsp/esp32sx/boards/espressif_addax_1/board.h
new file mode 100644
index 000000000..fff24ba44
--- /dev/null
+++ b/hw/bsp/esp32sx/boards/espressif_addax_1/board.h
@@ -0,0 +1,44 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020, Ha Thach (tinyusb.org)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * This file is part of the TinyUSB stack.
+ */
+
+#ifndef BOARD_H_
+#define BOARD_H_
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+// Note: On the production version (v1.1) WS2812 is connected to GPIO 47
+#define NEOPIXEL_PIN 47
+
+#define BUTTON_PIN 0
+#define BUTTON_STATE_ACTIVE 0
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* BOARD_H_ */
diff --git a/hw/bsp/esp32sx/boards/espressif_addax_1/board.mk b/hw/bsp/esp32sx/boards/espressif_addax_1/board.mk
new file mode 100644
index 000000000..6c5bda9b1
--- /dev/null
+++ b/hw/bsp/esp32sx/boards/espressif_addax_1/board.mk
@@ -0,0 +1,3 @@
+IDF_TARGET = esp32s3
+
+$(info Processing of board.mk for board: $(BOARD){$(BOARD_PATH)}, family: $(FAMILY), target: $(IDF_TARGET)) \ No newline at end of file
diff --git a/hw/bsp/esp32sx/boards/espressif_kaluga_1/CMakeLists.txt b/hw/bsp/esp32sx/boards/espressif_kaluga_1/CMakeLists.txt
new file mode 100644
index 000000000..9b76625a7
--- /dev/null
+++ b/hw/bsp/esp32sx/boards/espressif_kaluga_1/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Apply board specific context here
+target_include_directories(${COMPONENT_LIB} PRIVATE .)
+
+idf_build_get_property(idf_target IDF_TARGET)
+
+if( NOT ${idf_target} STREQUAL "esp32s2")
+ message(STATUS "Incorrect target for board ${BOARD}: $ENV{IDF_TARGET} " )
+ set(IDF_TARGET "esp32s2" FORCE)
+endif()
+
+target_compile_options(${COMPONENT_TARGET} PUBLIC
+ "-DCFG_TUSB_MCU=OPT_MCU_ESP32S2"
+ "-DCFG_TUSB_OS=OPT_OS_FREERTOS"
+) \ No newline at end of file
diff --git a/hw/bsp/esp32s2/boards/espressif_kaluga_1/board.h b/hw/bsp/esp32sx/boards/espressif_kaluga_1/board.h
index 6bb44f76d..6bb44f76d 100644
--- a/hw/bsp/esp32s2/boards/espressif_kaluga_1/board.h
+++ b/hw/bsp/esp32sx/boards/espressif_kaluga_1/board.h
diff --git a/hw/bsp/esp32sx/boards/espressif_kaluga_1/board.mk b/hw/bsp/esp32sx/boards/espressif_kaluga_1/board.mk
new file mode 100644
index 000000000..7308a9f62
--- /dev/null
+++ b/hw/bsp/esp32sx/boards/espressif_kaluga_1/board.mk
@@ -0,0 +1,3 @@
+IDF_TARGET = esp32s2
+
+$(info Processing of board.mk for board: $(BOARD){$(BOARD_PATH)}, family: $(FAMILY), target: $(IDF_TARGET)) \ No newline at end of file
diff --git a/hw/bsp/esp32sx/boards/espressif_saola_1/CMakeLists.txt b/hw/bsp/esp32sx/boards/espressif_saola_1/CMakeLists.txt
new file mode 100644
index 000000000..c034a11a6
--- /dev/null
+++ b/hw/bsp/esp32sx/boards/espressif_saola_1/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Apply board specific context here
+target_include_directories(${COMPONENT_LIB} PUBLIC .)
+
+idf_build_get_property(idf_target IDF_TARGET)
+
+if(NOT ${idf_target} STREQUAL "esp32s2")
+ message(STATUS "Incorrect target for board ${BOARD}: $ENV{IDF_TARGET} " )
+ set(IDF_TARGET "esp32s2" FORCE)
+endif()
+
+target_compile_options(${COMPONENT_TARGET} PUBLIC
+ "-DCFG_TUSB_MCU=OPT_MCU_ESP32S2"
+ "-DCFG_TUSB_OS=OPT_OS_FREERTOS"
+) \ No newline at end of file
diff --git a/hw/bsp/esp32s2/boards/espressif_saola_1/board.h b/hw/bsp/esp32sx/boards/espressif_saola_1/board.h
index f450b9a8b..f450b9a8b 100644
--- a/hw/bsp/esp32s2/boards/espressif_saola_1/board.h
+++ b/hw/bsp/esp32sx/boards/espressif_saola_1/board.h
diff --git a/hw/bsp/esp32sx/boards/espressif_saola_1/board.mk b/hw/bsp/esp32sx/boards/espressif_saola_1/board.mk
new file mode 100644
index 000000000..7308a9f62
--- /dev/null
+++ b/hw/bsp/esp32sx/boards/espressif_saola_1/board.mk
@@ -0,0 +1,3 @@
+IDF_TARGET = esp32s2
+
+$(info Processing of board.mk for board: $(BOARD){$(BOARD_PATH)}, family: $(FAMILY), target: $(IDF_TARGET)) \ No newline at end of file
diff --git a/hw/bsp/esp32s2/components/led_strip/CMakeLists.txt b/hw/bsp/esp32sx/components/led_strip/CMakeLists.txt
index 6d0fcbc86..6d0fcbc86 100644
--- a/hw/bsp/esp32s2/components/led_strip/CMakeLists.txt
+++ b/hw/bsp/esp32sx/components/led_strip/CMakeLists.txt
diff --git a/hw/bsp/esp32s2/components/led_strip/include/led_strip.h b/hw/bsp/esp32sx/components/led_strip/include/led_strip.h
index a9dffc325..a9dffc325 100644
--- a/hw/bsp/esp32s2/components/led_strip/include/led_strip.h
+++ b/hw/bsp/esp32sx/components/led_strip/include/led_strip.h
diff --git a/hw/bsp/esp32s2/components/led_strip/src/led_strip_rmt_ws2812.c b/hw/bsp/esp32sx/components/led_strip/src/led_strip_rmt_ws2812.c
index 025d3c590..025d3c590 100644
--- a/hw/bsp/esp32s2/components/led_strip/src/led_strip_rmt_ws2812.c
+++ b/hw/bsp/esp32sx/components/led_strip/src/led_strip_rmt_ws2812.c
diff --git a/hw/bsp/esp32sx/family.cmake b/hw/bsp/esp32sx/family.cmake
new file mode 100644
index 000000000..54f36e5d0
--- /dev/null
+++ b/hw/bsp/esp32sx/family.cmake
@@ -0,0 +1,6 @@
+cmake_minimum_required(VERSION 3.5)
+
+# Add example src and bsp directories
+set(EXTRA_COMPONENT_DIRS "src" "${TOP}/hw/bsp/esp32sx/boards" "${TOP}/hw/bsp/esp32sx/components")
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+set(SUPPORTED_TARGETS esp32s2 esp32s3)
diff --git a/hw/bsp/esp32sx/family.mk b/hw/bsp/esp32sx/family.mk
new file mode 100644
index 000000000..46df596ea
--- /dev/null
+++ b/hw/bsp/esp32sx/family.mk
@@ -0,0 +1,26 @@
+#DEPS_SUBMODULES +=
+
+.PHONY: all clean flash bootloader-flash app-flash erase monitor dfu-flash dfu
+
+all:
+ idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) -DIDF_TARGET=$(IDF_TARGET) build
+
+build: all
+
+clean:
+ idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) clean
+
+fullclean:
+ if test -f sdkconfig; then $(RM) -f sdkconfig ; fi
+ if test -d $(BUILD); then $(RM) -rf $(BUILD) ; fi
+
+flash bootloader-flash app-flash erase monitor dfu-flash dfu:
+ idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) $@
+
+uf2: $(BUILD)/$(PROJECT).uf2
+
+UF2_FAMILY_ID = 0xbfdd4eee
+$(BUILD)/$(PROJECT).uf2: $(BUILD)/$(PROJECT).bin
+ @echo CREATE $@
+ $(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f $(UF2_FAMILY_ID) -b 0x0 -c -o $@ $^
+