espressif: Add ESP32-S2 initial basic support
ESP32S2 target added to the Espressif port, modified CMakeLists,
and added the bootloader related files to esp32s2 target directory.
Signed-off-by: Almir Okato <almir.okato@espressif.com>
diff --git a/boot/espressif/tools/toolchain-esp32s2.cmake b/boot/espressif/tools/toolchain-esp32s2.cmake
new file mode 100644
index 0000000..77ea65c
--- /dev/null
+++ b/boot/espressif/tools/toolchain-esp32s2.cmake
@@ -0,0 +1,10 @@
+set(CMAKE_SYSTEM_NAME Generic)
+
+set(CMAKE_C_COMPILER xtensa-esp32s2-elf-gcc)
+set(CMAKE_CXX_COMPILER xtensa-esp32s2-elf-g++)
+set(CMAKE_ASM_COMPILER xtensa-esp32s2-elf-gcc)
+
+set(CMAKE_C_FLAGS "-mlongcalls" CACHE STRING "C Compiler Base Flags")
+set(CMAKE_CXX_FLAGS "-mlongcalls" CACHE STRING "C++ Compiler Base Flags")
+
+set(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections" CACHE STRING "Linker Base Flags")