Просмотр исходного кода

Merge esp_flasher from https://github.com/0xchocolate/flipperzero-esp-flasher

Willy-JL 2 лет назад
Родитель
Сommit
df45a1dd63
100 измененных файлов с 27 добавлено и 8042 удалено
  1. 3 0
      esp_flasher/.gitmodules
  2. 6 2
      esp_flasher/application.fam
  3. 5 0
      esp_flasher/docs/changelog.md
  4. 2 0
      esp_flasher/esp_flasher_app.c
  5. 1 1
      esp_flasher/esp_flasher_app.h
  6. 1 0
      esp_flasher/esp_flasher_app_i.h
  7. 9 9
      esp_flasher/esp_flasher_worker.c
  8. 0 366
      esp_flasher/lib/esp-serial-flasher/CMakeCache.txt
  9. 0 76
      esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CMakeCCompiler.cmake
  10. 0 88
      esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake
  11. BIN
      esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CMakeDetermineCompilerABI_C.bin
  12. BIN
      esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CMakeDetermineCompilerABI_CXX.bin
  13. 0 15
      esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CMakeSystem.cmake
  14. 0 671
      esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CompilerIdC/CMakeCCompilerId.c
  15. BIN
      esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CompilerIdC/a.out
  16. 0 660
      esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.cpp
  17. BIN
      esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CompilerIdCXX/a.out
  18. 0 463
      esp_flasher/lib/esp-serial-flasher/CMakeFiles/CMakeOutput.log
  19. 0 1
      esp_flasher/lib/esp-serial-flasher/CMakeFiles/cmake.check_cache
  20. 0 119
      esp_flasher/lib/esp-serial-flasher/CMakeLists.txt
  21. 0 34
      esp_flasher/lib/esp-serial-flasher/Kconfig
  22. 0 202
      esp_flasher/lib/esp-serial-flasher/LICENSE
  23. 0 154
      esp_flasher/lib/esp-serial-flasher/README.md
  24. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/ESP32_AT_Firmware/Firmware.bin
  25. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32/bootloader.bin
  26. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32/hello-world.bin
  27. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32/partition-table.bin
  28. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_H2/bootloader.bin
  29. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_H2/hello_world.bin
  30. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_H2/partition-table.bin
  31. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_H4/bootloader.bin
  32. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_H4/hello_world.bin
  33. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_H4/partition-table.bin
  34. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_S2/bootloader.bin
  35. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_S2/hello-world.bin
  36. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_S2/partition-table.bin
  37. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP8266/bootloader.bin
  38. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP8266/hello-world.bin
  39. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP8266/partition-table.bin
  40. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/ESP32/app.bin
  41. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/ESP32_C2/app.bin
  42. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/ESP32_C3/app.bin
  43. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/ESP32_H2/app.bin
  44. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/ESP32_H4/app.bin
  45. BIN
      esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/ESP32_S3/app.bin
  46. 0 15
      esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/source/CMakeLists.txt
  47. 0 2
      esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/source/main/CMakeLists.txt
  48. 0 16
      esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/source/main/main.c
  49. 0 10
      esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/source/sdkconfig.defaults
  50. 0 20
      esp_flasher/lib/esp-serial-flasher/examples/common/bin2array.cmake
  51. 0 322
      esp_flasher/lib/esp-serial-flasher/examples/common/example_common.c
  52. 0 63
      esp_flasher/lib/esp-serial-flasher/examples/common/example_common.h
  53. 0 7
      esp_flasher/lib/esp-serial-flasher/examples/esp32_example/CMakeLists.txt
  54. 0 78
      esp_flasher/lib/esp-serial-flasher/examples/esp32_example/README.md
  55. 0 22
      esp_flasher/lib/esp-serial-flasher/examples/esp32_example/main/CMakeLists.txt
  56. 0 54
      esp_flasher/lib/esp-serial-flasher/examples/esp32_example/main/main.c
  57. 0 4
      esp_flasher/lib/esp-serial-flasher/examples/esp32_example/partitions.csv
  58. 0 1
      esp_flasher/lib/esp-serial-flasher/examples/esp32_example/sdkconfig.defaults
  59. 0 7
      esp_flasher/lib/esp-serial-flasher/examples/esp32_load_ram_example/CMakeLists.txt
  60. 0 14
      esp_flasher/lib/esp-serial-flasher/examples/esp32_load_ram_example/main/CMakeLists.txt
  61. 0 80
      esp_flasher/lib/esp-serial-flasher/examples/esp32_load_ram_example/main/main.c
  62. 0 7
      esp_flasher/lib/esp-serial-flasher/examples/esp32_spi_load_ram_example/CMakeLists.txt
  63. 0 80
      esp_flasher/lib/esp-serial-flasher/examples/esp32_spi_load_ram_example/README.md
  64. 0 14
      esp_flasher/lib/esp-serial-flasher/examples/esp32_spi_load_ram_example/main/CMakeLists.txt
  65. 0 97
      esp_flasher/lib/esp-serial-flasher/examples/esp32_spi_load_ram_example/main/main.c
  66. 0 4
      esp_flasher/lib/esp-serial-flasher/examples/esp32_spi_load_ram_example/sdkconfig.defaults
  67. 0 17
      esp_flasher/lib/esp-serial-flasher/examples/raspberry_example/CMakeLists.txt
  68. 0 76
      esp_flasher/lib/esp-serial-flasher/examples/raspberry_example/README.md
  69. 0 81
      esp_flasher/lib/esp-serial-flasher/examples/raspberry_example/Src/main.c
  70. 0 39
      esp_flasher/lib/esp-serial-flasher/examples/stm32_example/CMakeLists.txt
  71. 0 50
      esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Inc/main.h
  72. 0 443
      esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Inc/stm32f4xx_hal_conf.h
  73. 0 42
      esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Inc/stm32f4xx_it.h
  74. 0 59
      esp_flasher/lib/esp-serial-flasher/examples/stm32_example/README.md
  75. 0 183
      esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Src/libc_compat.c
  76. 0 189
      esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Src/main.c
  77. 0 109
      esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Src/stm32f4xx_hal_msp.c
  78. 0 204
      esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Src/stm32f4xx_it.c
  79. 0 727
      esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Src/system_stm32f4xx.c
  80. 0 27
      esp_flasher/lib/esp-serial-flasher/examples/zephyr_example/CMakeLists.txt
  81. 0 84
      esp_flasher/lib/esp-serial-flasher/examples/zephyr_example/README.md
  82. 0 34
      esp_flasher/lib/esp-serial-flasher/examples/zephyr_example/boards/esp32.overlay
  83. 0 4
      esp_flasher/lib/esp-serial-flasher/examples/zephyr_example/prj.conf
  84. 0 7
      esp_flasher/lib/esp-serial-flasher/examples/zephyr_example/sample.yaml
  85. 0 81
      esp_flasher/lib/esp-serial-flasher/examples/zephyr_example/src/main.c
  86. 0 3
      esp_flasher/lib/esp-serial-flasher/idf_component.yml
  87. 0 313
      esp_flasher/lib/esp-serial-flasher/include/esp_loader.h
  88. 0 112
      esp_flasher/lib/esp-serial-flasher/include/esp_loader_io.h
  89. 0 24
      esp_flasher/lib/esp-serial-flasher/include/serial_io.h
  90. 0 181
      esp_flasher/lib/esp-serial-flasher/port/esp32_port.c
  91. 0 59
      esp_flasher/lib/esp-serial-flasher/port/esp32_port.h
  92. 0 298
      esp_flasher/lib/esp-serial-flasher/port/esp32_spi_port.c
  93. 0 60
      esp_flasher/lib/esp-serial-flasher/port/esp32_spi_port.h
  94. 0 302
      esp_flasher/lib/esp-serial-flasher/port/raspberry_port.c
  95. 0 36
      esp_flasher/lib/esp-serial-flasher/port/raspberry_port.h
  96. 0 140
      esp_flasher/lib/esp-serial-flasher/port/stm32_port.c
  97. 0 38
      esp_flasher/lib/esp-serial-flasher/port/stm32_port.h
  98. 0 170
      esp_flasher/lib/esp-serial-flasher/port/zephyr_port.c
  99. 0 39
      esp_flasher/lib/esp-serial-flasher/port/zephyr_port.h
  100. 0 33
      esp_flasher/lib/esp-serial-flasher/private_include/esp_targets.h

+ 3 - 0
esp_flasher/.gitmodules

@@ -0,0 +1,3 @@
+[submodule "lib/esp-serial-flasher"]
+	path = lib/esp-serial-flasher
+	url = git@github.com:0xchocolate/esp-serial-flasher.git

+ 6 - 2
esp_flasher/application.fam

@@ -1,7 +1,7 @@
 App(
     appid="esp_flasher",
     name="[ESP] ESP Flasher",
-    fap_version=(1, 3),
+    fap_version=(1, 4),
     apptype=FlipperAppType.EXTERNAL,
     entry_point="esp_flasher_app",
     requires=["gui"],
@@ -23,7 +23,11 @@ App(
                 "src/slip.c",
             ],
             cincludes=["lib/esp-serial-flasher/private_include"],
-            cdefines=["SERIAL_FLASHER_INTERFACE_UART=1", "MD5_ENABLED=1"],
+            cdefines=[
+                "SERIAL_FLASHER_INTERFACE_UART=1",
+                "MD5_ENABLED=1",
+                "SERIAL_FLASHER_WRITE_BLOCK_RETRIES=10",
+            ],
         ),
     ],
     cdefines=["SERIAL_FLASHER_INTERFACE_UART=1"],

+ 5 - 0
esp_flasher/docs/changelog.md

@@ -1,3 +1,8 @@
+## v1.4
+
+Turbo mode (gotta go fast)! The app now supports flashing as fast as possible (921600 baud with built-in retries). In my testing, this sped up a 1:37min flash to 23 seconds. Now we can't go back to the slow way!
+
+
 ## v1.3
 
 No functionality changes. Fixed the build by removing deprecated API calls that weren't needed.

+ 2 - 0
esp_flasher/esp_flasher_app.c

@@ -70,6 +70,8 @@ EspFlasherApp* esp_flasher_app_alloc() {
     app->boot = false;
     app->quickflash = false;
 
+    app->turbospeed = false;
+
     scene_manager_next_scene(app->scene_manager, EspFlasherSceneStart);
 
     return app;

+ 1 - 1
esp_flasher/esp_flasher_app.h

@@ -4,7 +4,7 @@
 extern "C" {
 #endif
 
-#define ESP_FLASHER_APP_VERSION "v1.3"
+#define ESP_FLASHER_APP_VERSION "v1.4"
 
 typedef struct EspFlasherApp EspFlasherApp;
 

+ 1 - 0
esp_flasher/esp_flasher_app_i.h

@@ -64,6 +64,7 @@ struct EspFlasherApp {
     Submenu* submenu;
 
     EspFlasherUart* uart;
+    bool turbospeed;
 
     bool reset;
     bool boot;

+ 9 - 9
esp_flasher/esp_flasher_worker.c

@@ -227,11 +227,10 @@ static int32_t esp_flasher_flash_bin(void* context) {
         loader_port_debug_print(err_msg);
     }
 
-#if 0 // still getting packet drops with this
     // higher BR
-    if(!err) {
+    if(!err && app->turbospeed) {
         loader_port_debug_print("Increasing speed for faster flash\n");
-        err = esp_loader_change_transmission_rate(230400);
+        err = esp_loader_change_transmission_rate(921600);
         if (err != ESP_LOADER_SUCCESS) {
             char err_msg[256];
             snprintf(
@@ -241,9 +240,8 @@ static int32_t esp_flasher_flash_bin(void* context) {
                 err);
             loader_port_debug_print(err_msg);
         }
-        furi_hal_uart_set_br(FuriHalUartIdUSART1, 230400);
+        furi_hal_uart_set_br(FuriHalUartIdUSART1, 921600);
     }
-#endif
 
     if(!err) {
         loader_port_debug_print("Connected\n");
@@ -251,10 +249,12 @@ static int32_t esp_flasher_flash_bin(void* context) {
             _flash_all_files(app);
         }
         app->switch_fw = SwitchNotSet;
-#if 0
-        loader_port_debug_print("Restoring transmission rate\n");
-        furi_hal_uart_set_br(FuriHalUartIdUSART1, 115200);
-#endif
+
+        if (app->turbospeed) {
+            loader_port_debug_print("Restoring transmission rate\n");
+            furi_hal_uart_set_br(FuriHalUartIdUSART1, 115200);
+        }
+
         loader_port_debug_print(
             "Done flashing. Please reset the board manually if it doesn't auto-reset.\n");
 

+ 0 - 366
esp_flasher/lib/esp-serial-flasher/CMakeCache.txt

@@ -1,366 +0,0 @@
-# This is the CMakeCache file.
-# For build in directory: /home/cococode/flipperzero-firmware/lib/esp-serial-flasher
-# It was generated by CMake: /usr/bin/cmake
-# You can edit this file to change values found and used by cmake.
-# If you do not want to change any of the values, simply exit the editor.
-# If you do want to change a value, simply edit, save, and exit the editor.
-# The syntax for the file is as follows:
-# KEY:TYPE=VALUE
-# KEY is the name of a variable in the cache.
-# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
-# VALUE is the current value for the KEY.
-
-########################
-# EXTERNAL cache entries
-########################
-
-//Path to a program.
-CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line
-
-//Path to a program.
-CMAKE_AR:FILEPATH=/usr/bin/ar
-
-//Choose the type of build, options are: None Debug Release RelWithDebInfo
-// MinSizeRel ...
-CMAKE_BUILD_TYPE:STRING=
-
-//Enable/Disable color output during build.
-CMAKE_COLOR_MAKEFILE:BOOL=ON
-
-//CXX compiler
-CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
-
-//A wrapper around 'ar' adding the appropriate '--plugin' option
-// for the GCC compiler
-CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-9
-
-//A wrapper around 'ranlib' adding the appropriate '--plugin' option
-// for the GCC compiler
-CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-9
-
-//Flags used by the CXX compiler during all build types.
-CMAKE_CXX_FLAGS:STRING=
-
-//Flags used by the CXX compiler during DEBUG builds.
-CMAKE_CXX_FLAGS_DEBUG:STRING=-g
-
-//Flags used by the CXX compiler during MINSIZEREL builds.
-CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
-
-//Flags used by the CXX compiler during RELEASE builds.
-CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
-
-//Flags used by the CXX compiler during RELWITHDEBINFO builds.
-CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
-
-//C compiler
-CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
-
-//A wrapper around 'ar' adding the appropriate '--plugin' option
-// for the GCC compiler
-CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-9
-
-//A wrapper around 'ranlib' adding the appropriate '--plugin' option
-// for the GCC compiler
-CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-9
-
-//Flags used by the C compiler during all build types.
-CMAKE_C_FLAGS:STRING=
-
-//Flags used by the C compiler during DEBUG builds.
-CMAKE_C_FLAGS_DEBUG:STRING=-g
-
-//Flags used by the C compiler during MINSIZEREL builds.
-CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
-
-//Flags used by the C compiler during RELEASE builds.
-CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
-
-//Flags used by the C compiler during RELWITHDEBINFO builds.
-CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
-
-//Path to a program.
-CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
-
-//Flags used by the linker during all build types.
-CMAKE_EXE_LINKER_FLAGS:STRING=
-
-//Flags used by the linker during DEBUG builds.
-CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
-
-//Flags used by the linker during MINSIZEREL builds.
-CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
-
-//Flags used by the linker during RELEASE builds.
-CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
-
-//Flags used by the linker during RELWITHDEBINFO builds.
-CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
-
-//Enable/Disable output of compile commands during generation.
-CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
-
-//Install path prefix, prepended onto install directories.
-CMAKE_INSTALL_PREFIX:PATH=/usr/local
-
-//Path to a program.
-CMAKE_LINKER:FILEPATH=/usr/bin/ld
-
-//Path to a program.
-CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
-
-//Flags used by the linker during the creation of modules during
-// all build types.
-CMAKE_MODULE_LINKER_FLAGS:STRING=
-
-//Flags used by the linker during the creation of modules during
-// DEBUG builds.
-CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
-
-//Flags used by the linker during the creation of modules during
-// MINSIZEREL builds.
-CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
-
-//Flags used by the linker during the creation of modules during
-// RELEASE builds.
-CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
-
-//Flags used by the linker during the creation of modules during
-// RELWITHDEBINFO builds.
-CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
-
-//Path to a program.
-CMAKE_NM:FILEPATH=/usr/bin/nm
-
-//Path to a program.
-CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
-
-//Path to a program.
-CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
-
-//Value Computed by CMake
-CMAKE_PROJECT_DESCRIPTION:STATIC=
-
-//Value Computed by CMake
-CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
-
-//Value Computed by CMake
-CMAKE_PROJECT_NAME:STATIC=Project
-
-//Path to a program.
-CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
-
-//Path to a program.
-CMAKE_READELF:FILEPATH=/usr/bin/readelf
-
-//Flags used by the linker during the creation of shared libraries
-// during all build types.
-CMAKE_SHARED_LINKER_FLAGS:STRING=
-
-//Flags used by the linker during the creation of shared libraries
-// during DEBUG builds.
-CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
-
-//Flags used by the linker during the creation of shared libraries
-// during MINSIZEREL builds.
-CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
-
-//Flags used by the linker during the creation of shared libraries
-// during RELEASE builds.
-CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
-
-//Flags used by the linker during the creation of shared libraries
-// during RELWITHDEBINFO builds.
-CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
-
-//If set, runtime paths are not added when installing shared libraries,
-// but are added when building.
-CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
-
-//If set, runtime paths are not added when using shared libraries.
-CMAKE_SKIP_RPATH:BOOL=NO
-
-//Flags used by the linker during the creation of static libraries
-// during all build types.
-CMAKE_STATIC_LINKER_FLAGS:STRING=
-
-//Flags used by the linker during the creation of static libraries
-// during DEBUG builds.
-CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
-
-//Flags used by the linker during the creation of static libraries
-// during MINSIZEREL builds.
-CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
-
-//Flags used by the linker during the creation of static libraries
-// during RELEASE builds.
-CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
-
-//Flags used by the linker during the creation of static libraries
-// during RELWITHDEBINFO builds.
-CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
-
-//Path to a program.
-CMAKE_STRIP:FILEPATH=/usr/bin/strip
-
-//If this value is on, makefiles will be generated without the
-// .SILENT directive, and all commands will be echoed to the console
-// during the make.  This is useful for debugging only. With Visual
-// Studio IDE projects all commands are done without /nologo.
-CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
-
-//Value Computed by CMake
-Project_BINARY_DIR:STATIC=/home/cococode/flipperzero-firmware/lib/esp-serial-flasher
-
-//Value Computed by CMake
-Project_SOURCE_DIR:STATIC=/home/cococode/flipperzero-firmware/lib/esp-serial-flasher
-
-
-########################
-# INTERNAL cache entries
-########################
-
-//ADVANCED property for variable: CMAKE_ADDR2LINE
-CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_AR
-CMAKE_AR-ADVANCED:INTERNAL=1
-//This is the directory where this CMakeCache.txt was created
-CMAKE_CACHEFILE_DIR:INTERNAL=/home/cococode/flipperzero-firmware/lib/esp-serial-flasher
-//Major version of cmake used to create the current loaded cache
-CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
-//Minor version of cmake used to create the current loaded cache
-CMAKE_CACHE_MINOR_VERSION:INTERNAL=16
-//Patch version of cmake used to create the current loaded cache
-CMAKE_CACHE_PATCH_VERSION:INTERNAL=3
-//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
-CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
-//Path to CMake executable.
-CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
-//Path to cpack program executable.
-CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
-//Path to ctest program executable.
-CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
-//ADVANCED property for variable: CMAKE_CXX_COMPILER
-CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
-CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
-CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_CXX_FLAGS
-CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
-CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
-CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
-CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
-CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_C_COMPILER
-CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_C_COMPILER_AR
-CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
-CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_C_FLAGS
-CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
-CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
-CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
-CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
-CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_DLLTOOL
-CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
-//Executable file format
-CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
-//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
-CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
-CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
-CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
-CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
-CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
-CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
-//Name of external makefile project generator.
-CMAKE_EXTRA_GENERATOR:INTERNAL=
-//Name of generator.
-CMAKE_GENERATOR:INTERNAL=Unix Makefiles
-//Generator instance identifier.
-CMAKE_GENERATOR_INSTANCE:INTERNAL=
-//Name of generator platform.
-CMAKE_GENERATOR_PLATFORM:INTERNAL=
-//Name of generator toolset.
-CMAKE_GENERATOR_TOOLSET:INTERNAL=
-//Source directory with the top level CMakeLists.txt file for this
-// project
-CMAKE_HOME_DIRECTORY:INTERNAL=/home/cococode/flipperzero-firmware/lib/esp-serial-flasher
-//Install .so files without execute permission.
-CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
-//ADVANCED property for variable: CMAKE_LINKER
-CMAKE_LINKER-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
-CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
-CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
-CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
-CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
-CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
-CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_NM
-CMAKE_NM-ADVANCED:INTERNAL=1
-//number of local generators
-CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
-//ADVANCED property for variable: CMAKE_OBJCOPY
-CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_OBJDUMP
-CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
-//Platform information initialized
-CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_RANLIB
-CMAKE_RANLIB-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_READELF
-CMAKE_READELF-ADVANCED:INTERNAL=1
-//Path to CMake installation.
-CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.16
-//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
-CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
-CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
-CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
-CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
-CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
-CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_SKIP_RPATH
-CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
-CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
-CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
-CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
-CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
-CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
-//ADVANCED property for variable: CMAKE_STRIP
-CMAKE_STRIP-ADVANCED:INTERNAL=1
-//uname command
-CMAKE_UNAME:INTERNAL=/usr/bin/uname
-//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
-CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
-

+ 0 - 76
esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CMakeCCompiler.cmake

@@ -1,76 +0,0 @@
-set(CMAKE_C_COMPILER "/usr/bin/cc")
-set(CMAKE_C_COMPILER_ARG1 "")
-set(CMAKE_C_COMPILER_ID "GNU")
-set(CMAKE_C_COMPILER_VERSION "9.4.0")
-set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
-set(CMAKE_C_COMPILER_WRAPPER "")
-set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11")
-set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert")
-set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
-set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
-set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
-
-set(CMAKE_C_PLATFORM_ID "Linux")
-set(CMAKE_C_SIMULATE_ID "")
-set(CMAKE_C_COMPILER_FRONTEND_VARIANT "")
-set(CMAKE_C_SIMULATE_VERSION "")
-
-
-
-set(CMAKE_AR "/usr/bin/ar")
-set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-9")
-set(CMAKE_RANLIB "/usr/bin/ranlib")
-set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-9")
-set(CMAKE_LINKER "/usr/bin/ld")
-set(CMAKE_MT "")
-set(CMAKE_COMPILER_IS_GNUCC 1)
-set(CMAKE_C_COMPILER_LOADED 1)
-set(CMAKE_C_COMPILER_WORKS TRUE)
-set(CMAKE_C_ABI_COMPILED TRUE)
-set(CMAKE_COMPILER_IS_MINGW )
-set(CMAKE_COMPILER_IS_CYGWIN )
-if(CMAKE_COMPILER_IS_CYGWIN)
-  set(CYGWIN 1)
-  set(UNIX 1)
-endif()
-
-set(CMAKE_C_COMPILER_ENV_VAR "CC")
-
-if(CMAKE_COMPILER_IS_MINGW)
-  set(MINGW 1)
-endif()
-set(CMAKE_C_COMPILER_ID_RUN 1)
-set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
-set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
-set(CMAKE_C_LINKER_PREFERENCE 10)
-
-# Save compiler ABI information.
-set(CMAKE_C_SIZEOF_DATA_PTR "8")
-set(CMAKE_C_COMPILER_ABI "ELF")
-set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
-
-if(CMAKE_C_SIZEOF_DATA_PTR)
-  set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
-endif()
-
-if(CMAKE_C_COMPILER_ABI)
-  set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
-endif()
-
-if(CMAKE_C_LIBRARY_ARCHITECTURE)
-  set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
-endif()
-
-set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
-if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
-  set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
-endif()
-
-
-
-
-
-set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include")
-set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s")
-set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
-set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")

+ 0 - 88
esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake

@@ -1,88 +0,0 @@
-set(CMAKE_CXX_COMPILER "/usr/bin/c++")
-set(CMAKE_CXX_COMPILER_ARG1 "")
-set(CMAKE_CXX_COMPILER_ID "GNU")
-set(CMAKE_CXX_COMPILER_VERSION "9.4.0")
-set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
-set(CMAKE_CXX_COMPILER_WRAPPER "")
-set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14")
-set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20")
-set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
-set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
-set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
-set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
-set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20")
-
-set(CMAKE_CXX_PLATFORM_ID "Linux")
-set(CMAKE_CXX_SIMULATE_ID "")
-set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "")
-set(CMAKE_CXX_SIMULATE_VERSION "")
-
-
-
-set(CMAKE_AR "/usr/bin/ar")
-set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-9")
-set(CMAKE_RANLIB "/usr/bin/ranlib")
-set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-9")
-set(CMAKE_LINKER "/usr/bin/ld")
-set(CMAKE_MT "")
-set(CMAKE_COMPILER_IS_GNUCXX 1)
-set(CMAKE_CXX_COMPILER_LOADED 1)
-set(CMAKE_CXX_COMPILER_WORKS TRUE)
-set(CMAKE_CXX_ABI_COMPILED TRUE)
-set(CMAKE_COMPILER_IS_MINGW )
-set(CMAKE_COMPILER_IS_CYGWIN )
-if(CMAKE_COMPILER_IS_CYGWIN)
-  set(CYGWIN 1)
-  set(UNIX 1)
-endif()
-
-set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
-
-if(CMAKE_COMPILER_IS_MINGW)
-  set(MINGW 1)
-endif()
-set(CMAKE_CXX_COMPILER_ID_RUN 1)
-set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP)
-set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
-
-foreach (lang C OBJC OBJCXX)
-  if (CMAKE_${lang}_COMPILER_ID_RUN)
-    foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS)
-      list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension})
-    endforeach()
-  endif()
-endforeach()
-
-set(CMAKE_CXX_LINKER_PREFERENCE 30)
-set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
-
-# Save compiler ABI information.
-set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
-set(CMAKE_CXX_COMPILER_ABI "ELF")
-set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
-
-if(CMAKE_CXX_SIZEOF_DATA_PTR)
-  set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
-endif()
-
-if(CMAKE_CXX_COMPILER_ABI)
-  set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
-endif()
-
-if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
-  set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
-endif()
-
-set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
-if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
-  set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
-endif()
-
-
-
-
-
-set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include/c++/9;/usr/include/x86_64-linux-gnu/c++/9;/usr/include/c++/9/backward;/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include")
-set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc")
-set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
-set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")

BIN
esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CMakeDetermineCompilerABI_C.bin


BIN
esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CMakeDetermineCompilerABI_CXX.bin


+ 0 - 15
esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CMakeSystem.cmake

@@ -1,15 +0,0 @@
-set(CMAKE_HOST_SYSTEM "Linux-5.10.16.3-microsoft-standard-WSL2")
-set(CMAKE_HOST_SYSTEM_NAME "Linux")
-set(CMAKE_HOST_SYSTEM_VERSION "5.10.16.3-microsoft-standard-WSL2")
-set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
-
-
-
-set(CMAKE_SYSTEM "Linux-5.10.16.3-microsoft-standard-WSL2")
-set(CMAKE_SYSTEM_NAME "Linux")
-set(CMAKE_SYSTEM_VERSION "5.10.16.3-microsoft-standard-WSL2")
-set(CMAKE_SYSTEM_PROCESSOR "x86_64")
-
-set(CMAKE_CROSSCOMPILING "FALSE")
-
-set(CMAKE_SYSTEM_LOADED 1)

+ 0 - 671
esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CompilerIdC/CMakeCCompilerId.c

@@ -1,671 +0,0 @@
-#ifdef __cplusplus
-# error "A C++ compiler has been selected for C."
-#endif
-
-#if defined(__18CXX)
-# define ID_VOID_MAIN
-#endif
-#if defined(__CLASSIC_C__)
-/* cv-qualifiers did not exist in K&R C */
-# define const
-# define volatile
-#endif
-
-
-/* Version number components: V=Version, R=Revision, P=Patch
-   Version date components:   YYYY=Year, MM=Month,   DD=Day  */
-
-#if defined(__INTEL_COMPILER) || defined(__ICC)
-# define COMPILER_ID "Intel"
-# if defined(_MSC_VER)
-#  define SIMULATE_ID "MSVC"
-# endif
-# if defined(__GNUC__)
-#  define SIMULATE_ID "GNU"
-# endif
-  /* __INTEL_COMPILER = VRP */
-# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
-# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
-# if defined(__INTEL_COMPILER_UPDATE)
-#  define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
-# else
-#  define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER   % 10)
-# endif
-# if defined(__INTEL_COMPILER_BUILD_DATE)
-  /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
-#  define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
-# endif
-# if defined(_MSC_VER)
-   /* _MSC_VER = VVRR */
-#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
-#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
-# endif
-# if defined(__GNUC__)
-#  define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
-# elif defined(__GNUG__)
-#  define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
-# endif
-# if defined(__GNUC_MINOR__)
-#  define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
-# endif
-# if defined(__GNUC_PATCHLEVEL__)
-#  define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
-# endif
-
-#elif defined(__PATHCC__)
-# define COMPILER_ID "PathScale"
-# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
-# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
-# if defined(__PATHCC_PATCHLEVEL__)
-#  define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
-# endif
-
-#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
-# define COMPILER_ID "Embarcadero"
-# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
-# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
-# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__     & 0xFFFF)
-
-#elif defined(__BORLANDC__)
-# define COMPILER_ID "Borland"
-  /* __BORLANDC__ = 0xVRR */
-# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
-# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
-
-#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
-# define COMPILER_ID "Watcom"
-   /* __WATCOMC__ = VVRR */
-# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
-# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
-# if (__WATCOMC__ % 10) > 0
-#  define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
-# endif
-
-#elif defined(__WATCOMC__)
-# define COMPILER_ID "OpenWatcom"
-   /* __WATCOMC__ = VVRP + 1100 */
-# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
-# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
-# if (__WATCOMC__ % 10) > 0
-#  define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
-# endif
-
-#elif defined(__SUNPRO_C)
-# define COMPILER_ID "SunPro"
-# if __SUNPRO_C >= 0x5100
-   /* __SUNPRO_C = 0xVRRP */
-#  define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
-#  define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
-#  define COMPILER_VERSION_PATCH HEX(__SUNPRO_C    & 0xF)
-# else
-   /* __SUNPRO_CC = 0xVRP */
-#  define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
-#  define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
-#  define COMPILER_VERSION_PATCH HEX(__SUNPRO_C    & 0xF)
-# endif
-
-#elif defined(__HP_cc)
-# define COMPILER_ID "HP"
-  /* __HP_cc = VVRRPP */
-# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
-# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
-# define COMPILER_VERSION_PATCH DEC(__HP_cc     % 100)
-
-#elif defined(__DECC)
-# define COMPILER_ID "Compaq"
-  /* __DECC_VER = VVRRTPPPP */
-# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
-# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000  % 100)
-# define COMPILER_VERSION_PATCH DEC(__DECC_VER         % 10000)
-
-#elif defined(__IBMC__) && defined(__COMPILER_VER__)
-# define COMPILER_ID "zOS"
-  /* __IBMC__ = VRP */
-# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
-# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
-# define COMPILER_VERSION_PATCH DEC(__IBMC__    % 10)
-
-#elif defined(__ibmxl__) && defined(__clang__)
-# define COMPILER_ID "XLClang"
-# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
-# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
-# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
-# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
-
-
-#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
-# define COMPILER_ID "XL"
-  /* __IBMC__ = VRP */
-# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
-# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
-# define COMPILER_VERSION_PATCH DEC(__IBMC__    % 10)
-
-#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
-# define COMPILER_ID "VisualAge"
-  /* __IBMC__ = VRP */
-# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
-# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
-# define COMPILER_VERSION_PATCH DEC(__IBMC__    % 10)
-
-#elif defined(__PGI)
-# define COMPILER_ID "PGI"
-# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
-# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
-# if defined(__PGIC_PATCHLEVEL__)
-#  define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
-# endif
-
-#elif defined(_CRAYC)
-# define COMPILER_ID "Cray"
-# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
-# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
-
-#elif defined(__TI_COMPILER_VERSION__)
-# define COMPILER_ID "TI"
-  /* __TI_COMPILER_VERSION__ = VVVRRRPPP */
-# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
-# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000   % 1000)
-# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__        % 1000)
-
-#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)
-# define COMPILER_ID "Fujitsu"
-
-#elif defined(__ghs__)
-# define COMPILER_ID "GHS"
-/* __GHS_VERSION_NUMBER = VVVVRP */
-# ifdef __GHS_VERSION_NUMBER
-# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
-# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
-# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER      % 10)
-# endif
-
-#elif defined(__TINYC__)
-# define COMPILER_ID "TinyCC"
-
-#elif defined(__BCC__)
-# define COMPILER_ID "Bruce"
-
-#elif defined(__SCO_VERSION__)
-# define COMPILER_ID "SCO"
-
-#elif defined(__ARMCC_VERSION) && !defined(__clang__)
-# define COMPILER_ID "ARMCC"
-#if __ARMCC_VERSION >= 1000000
-  /* __ARMCC_VERSION = VRRPPPP */
-  # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
-  # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
-  # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION     % 10000)
-#else
-  /* __ARMCC_VERSION = VRPPPP */
-  # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
-  # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
-  # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION    % 10000)
-#endif
-
-
-#elif defined(__clang__) && defined(__apple_build_version__)
-# define COMPILER_ID "AppleClang"
-# if defined(_MSC_VER)
-#  define SIMULATE_ID "MSVC"
-# endif
-# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
-# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
-# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
-# if defined(_MSC_VER)
-   /* _MSC_VER = VVRR */
-#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
-#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
-# endif
-# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
-
-#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
-# define COMPILER_ID "ARMClang"
-  # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
-  # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
-  # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION     % 10000)
-# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
-
-#elif defined(__clang__)
-# define COMPILER_ID "Clang"
-# if defined(_MSC_VER)
-#  define SIMULATE_ID "MSVC"
-# endif
-# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
-# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
-# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
-# if defined(_MSC_VER)
-   /* _MSC_VER = VVRR */
-#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
-#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
-# endif
-
-#elif defined(__GNUC__)
-# define COMPILER_ID "GNU"
-# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
-# if defined(__GNUC_MINOR__)
-#  define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
-# endif
-# if defined(__GNUC_PATCHLEVEL__)
-#  define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
-# endif
-
-#elif defined(_MSC_VER)
-# define COMPILER_ID "MSVC"
-  /* _MSC_VER = VVRR */
-# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
-# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
-# if defined(_MSC_FULL_VER)
-#  if _MSC_VER >= 1400
-    /* _MSC_FULL_VER = VVRRPPPPP */
-#   define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
-#  else
-    /* _MSC_FULL_VER = VVRRPPPP */
-#   define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
-#  endif
-# endif
-# if defined(_MSC_BUILD)
-#  define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
-# endif
-
-#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
-# define COMPILER_ID "ADSP"
-#if defined(__VISUALDSPVERSION__)
-  /* __VISUALDSPVERSION__ = 0xVVRRPP00 */
-# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
-# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
-# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8  & 0xFF)
-#endif
-
-#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
-# define COMPILER_ID "IAR"
-# if defined(__VER__) && defined(__ICCARM__)
-#  define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
-#  define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
-#  define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
-#  define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
-# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__))
-#  define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
-#  define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
-#  define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
-#  define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
-# endif
-
-#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
-# define COMPILER_ID "SDCC"
-# if defined(__SDCC_VERSION_MAJOR)
-#  define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
-#  define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
-#  define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
-# else
-  /* SDCC = VRP */
-#  define COMPILER_VERSION_MAJOR DEC(SDCC/100)
-#  define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
-#  define COMPILER_VERSION_PATCH DEC(SDCC    % 10)
-# endif
-
-
-/* These compilers are either not known or too old to define an
-  identification macro.  Try to identify the platform and guess that
-  it is the native compiler.  */
-#elif defined(__hpux) || defined(__hpua)
-# define COMPILER_ID "HP"
-
-#else /* unknown compiler */
-# define COMPILER_ID ""
-#endif
-
-/* Construct the string literal in pieces to prevent the source from
-   getting matched.  Store it in a pointer rather than an array
-   because some compilers will just produce instructions to fill the
-   array rather than assigning a pointer to a static array.  */
-char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
-#ifdef SIMULATE_ID
-char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
-#endif
-
-#ifdef __QNXNTO__
-char const* qnxnto = "INFO" ":" "qnxnto[]";
-#endif
-
-#if defined(__CRAYXE) || defined(__CRAYXC)
-char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
-#endif
-
-#define STRINGIFY_HELPER(X) #X
-#define STRINGIFY(X) STRINGIFY_HELPER(X)
-
-/* Identify known platforms by name.  */
-#if defined(__linux) || defined(__linux__) || defined(linux)
-# define PLATFORM_ID "Linux"
-
-#elif defined(__CYGWIN__)
-# define PLATFORM_ID "Cygwin"
-
-#elif defined(__MINGW32__)
-# define PLATFORM_ID "MinGW"
-
-#elif defined(__APPLE__)
-# define PLATFORM_ID "Darwin"
-
-#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
-# define PLATFORM_ID "Windows"
-
-#elif defined(__FreeBSD__) || defined(__FreeBSD)
-# define PLATFORM_ID "FreeBSD"
-
-#elif defined(__NetBSD__) || defined(__NetBSD)
-# define PLATFORM_ID "NetBSD"
-
-#elif defined(__OpenBSD__) || defined(__OPENBSD)
-# define PLATFORM_ID "OpenBSD"
-
-#elif defined(__sun) || defined(sun)
-# define PLATFORM_ID "SunOS"
-
-#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
-# define PLATFORM_ID "AIX"
-
-#elif defined(__hpux) || defined(__hpux__)
-# define PLATFORM_ID "HP-UX"
-
-#elif defined(__HAIKU__)
-# define PLATFORM_ID "Haiku"
-
-#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
-# define PLATFORM_ID "BeOS"
-
-#elif defined(__QNX__) || defined(__QNXNTO__)
-# define PLATFORM_ID "QNX"
-
-#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
-# define PLATFORM_ID "Tru64"
-
-#elif defined(__riscos) || defined(__riscos__)
-# define PLATFORM_ID "RISCos"
-
-#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
-# define PLATFORM_ID "SINIX"
-
-#elif defined(__UNIX_SV__)
-# define PLATFORM_ID "UNIX_SV"
-
-#elif defined(__bsdos__)
-# define PLATFORM_ID "BSDOS"
-
-#elif defined(_MPRAS) || defined(MPRAS)
-# define PLATFORM_ID "MP-RAS"
-
-#elif defined(__osf) || defined(__osf__)
-# define PLATFORM_ID "OSF1"
-
-#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
-# define PLATFORM_ID "SCO_SV"
-
-#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
-# define PLATFORM_ID "ULTRIX"
-
-#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
-# define PLATFORM_ID "Xenix"
-
-#elif defined(__WATCOMC__)
-# if defined(__LINUX__)
-#  define PLATFORM_ID "Linux"
-
-# elif defined(__DOS__)
-#  define PLATFORM_ID "DOS"
-
-# elif defined(__OS2__)
-#  define PLATFORM_ID "OS2"
-
-# elif defined(__WINDOWS__)
-#  define PLATFORM_ID "Windows3x"
-
-# else /* unknown platform */
-#  define PLATFORM_ID
-# endif
-
-#elif defined(__INTEGRITY)
-# if defined(INT_178B)
-#  define PLATFORM_ID "Integrity178"
-
-# else /* regular Integrity */
-#  define PLATFORM_ID "Integrity"
-# endif
-
-#else /* unknown platform */
-# define PLATFORM_ID
-
-#endif
-
-/* For windows compilers MSVC and Intel we can determine
-   the architecture of the compiler being used.  This is because
-   the compilers do not have flags that can change the architecture,
-   but rather depend on which compiler is being used
-*/
-#if defined(_WIN32) && defined(_MSC_VER)
-# if defined(_M_IA64)
-#  define ARCHITECTURE_ID "IA64"
-
-# elif defined(_M_X64) || defined(_M_AMD64)
-#  define ARCHITECTURE_ID "x64"
-
-# elif defined(_M_IX86)
-#  define ARCHITECTURE_ID "X86"
-
-# elif defined(_M_ARM64)
-#  define ARCHITECTURE_ID "ARM64"
-
-# elif defined(_M_ARM)
-#  if _M_ARM == 4
-#   define ARCHITECTURE_ID "ARMV4I"
-#  elif _M_ARM == 5
-#   define ARCHITECTURE_ID "ARMV5I"
-#  else
-#   define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
-#  endif
-
-# elif defined(_M_MIPS)
-#  define ARCHITECTURE_ID "MIPS"
-
-# elif defined(_M_SH)
-#  define ARCHITECTURE_ID "SHx"
-
-# else /* unknown architecture */
-#  define ARCHITECTURE_ID ""
-# endif
-
-#elif defined(__WATCOMC__)
-# if defined(_M_I86)
-#  define ARCHITECTURE_ID "I86"
-
-# elif defined(_M_IX86)
-#  define ARCHITECTURE_ID "X86"
-
-# else /* unknown architecture */
-#  define ARCHITECTURE_ID ""
-# endif
-
-#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
-# if defined(__ICCARM__)
-#  define ARCHITECTURE_ID "ARM"
-
-# elif defined(__ICCRX__)
-#  define ARCHITECTURE_ID "RX"
-
-# elif defined(__ICCRH850__)
-#  define ARCHITECTURE_ID "RH850"
-
-# elif defined(__ICCRL78__)
-#  define ARCHITECTURE_ID "RL78"
-
-# elif defined(__ICCRISCV__)
-#  define ARCHITECTURE_ID "RISCV"
-
-# elif defined(__ICCAVR__)
-#  define ARCHITECTURE_ID "AVR"
-
-# elif defined(__ICC430__)
-#  define ARCHITECTURE_ID "MSP430"
-
-# elif defined(__ICCV850__)
-#  define ARCHITECTURE_ID "V850"
-
-# elif defined(__ICC8051__)
-#  define ARCHITECTURE_ID "8051"
-
-# else /* unknown architecture */
-#  define ARCHITECTURE_ID ""
-# endif
-
-#elif defined(__ghs__)
-# if defined(__PPC64__)
-#  define ARCHITECTURE_ID "PPC64"
-
-# elif defined(__ppc__)
-#  define ARCHITECTURE_ID "PPC"
-
-# elif defined(__ARM__)
-#  define ARCHITECTURE_ID "ARM"
-
-# elif defined(__x86_64__)
-#  define ARCHITECTURE_ID "x64"
-
-# elif defined(__i386__)
-#  define ARCHITECTURE_ID "X86"
-
-# else /* unknown architecture */
-#  define ARCHITECTURE_ID ""
-# endif
-#else
-#  define ARCHITECTURE_ID
-#endif
-
-/* Convert integer to decimal digit literals.  */
-#define DEC(n)                   \
-  ('0' + (((n) / 10000000)%10)), \
-  ('0' + (((n) / 1000000)%10)),  \
-  ('0' + (((n) / 100000)%10)),   \
-  ('0' + (((n) / 10000)%10)),    \
-  ('0' + (((n) / 1000)%10)),     \
-  ('0' + (((n) / 100)%10)),      \
-  ('0' + (((n) / 10)%10)),       \
-  ('0' +  ((n) % 10))
-
-/* Convert integer to hex digit literals.  */
-#define HEX(n)             \
-  ('0' + ((n)>>28 & 0xF)), \
-  ('0' + ((n)>>24 & 0xF)), \
-  ('0' + ((n)>>20 & 0xF)), \
-  ('0' + ((n)>>16 & 0xF)), \
-  ('0' + ((n)>>12 & 0xF)), \
-  ('0' + ((n)>>8  & 0xF)), \
-  ('0' + ((n)>>4  & 0xF)), \
-  ('0' + ((n)     & 0xF))
-
-/* Construct a string literal encoding the version number components. */
-#ifdef COMPILER_VERSION_MAJOR
-char const info_version[] = {
-  'I', 'N', 'F', 'O', ':',
-  'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
-  COMPILER_VERSION_MAJOR,
-# ifdef COMPILER_VERSION_MINOR
-  '.', COMPILER_VERSION_MINOR,
-#  ifdef COMPILER_VERSION_PATCH
-   '.', COMPILER_VERSION_PATCH,
-#   ifdef COMPILER_VERSION_TWEAK
-    '.', COMPILER_VERSION_TWEAK,
-#   endif
-#  endif
-# endif
-  ']','\0'};
-#endif
-
-/* Construct a string literal encoding the internal version number. */
-#ifdef COMPILER_VERSION_INTERNAL
-char const info_version_internal[] = {
-  'I', 'N', 'F', 'O', ':',
-  'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
-  'i','n','t','e','r','n','a','l','[',
-  COMPILER_VERSION_INTERNAL,']','\0'};
-#endif
-
-/* Construct a string literal encoding the version number components. */
-#ifdef SIMULATE_VERSION_MAJOR
-char const info_simulate_version[] = {
-  'I', 'N', 'F', 'O', ':',
-  's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
-  SIMULATE_VERSION_MAJOR,
-# ifdef SIMULATE_VERSION_MINOR
-  '.', SIMULATE_VERSION_MINOR,
-#  ifdef SIMULATE_VERSION_PATCH
-   '.', SIMULATE_VERSION_PATCH,
-#   ifdef SIMULATE_VERSION_TWEAK
-    '.', SIMULATE_VERSION_TWEAK,
-#   endif
-#  endif
-# endif
-  ']','\0'};
-#endif
-
-/* Construct the string literal in pieces to prevent the source from
-   getting matched.  Store it in a pointer rather than an array
-   because some compilers will just produce instructions to fill the
-   array rather than assigning a pointer to a static array.  */
-char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
-char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
-
-
-
-
-#if !defined(__STDC__)
-# if (defined(_MSC_VER) && !defined(__clang__)) \
-  || (defined(__ibmxl__) || defined(__IBMC__))
-#  define C_DIALECT "90"
-# else
-#  define C_DIALECT
-# endif
-#elif __STDC_VERSION__ >= 201000L
-# define C_DIALECT "11"
-#elif __STDC_VERSION__ >= 199901L
-# define C_DIALECT "99"
-#else
-# define C_DIALECT "90"
-#endif
-const char* info_language_dialect_default =
-  "INFO" ":" "dialect_default[" C_DIALECT "]";
-
-/*--------------------------------------------------------------------------*/
-
-#ifdef ID_VOID_MAIN
-void main() {}
-#else
-# if defined(__CLASSIC_C__)
-int main(argc, argv) int argc; char *argv[];
-# else
-int main(int argc, char* argv[])
-# endif
-{
-  int require = 0;
-  require += info_compiler[argc];
-  require += info_platform[argc];
-  require += info_arch[argc];
-#ifdef COMPILER_VERSION_MAJOR
-  require += info_version[argc];
-#endif
-#ifdef COMPILER_VERSION_INTERNAL
-  require += info_version_internal[argc];
-#endif
-#ifdef SIMULATE_ID
-  require += info_simulate[argc];
-#endif
-#ifdef SIMULATE_VERSION_MAJOR
-  require += info_simulate_version[argc];
-#endif
-#if defined(__CRAYXE) || defined(__CRAYXC)
-  require += info_cray[argc];
-#endif
-  require += info_language_dialect_default[argc];
-  (void)argv;
-  return require;
-}
-#endif

BIN
esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CompilerIdC/a.out


+ 0 - 660
esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.cpp

@@ -1,660 +0,0 @@
-/* This source file must have a .cpp extension so that all C++ compilers
-   recognize the extension without flags.  Borland does not know .cxx for
-   example.  */
-#ifndef __cplusplus
-# error "A C compiler has been selected for C++."
-#endif
-
-
-/* Version number components: V=Version, R=Revision, P=Patch
-   Version date components:   YYYY=Year, MM=Month,   DD=Day  */
-
-#if defined(__COMO__)
-# define COMPILER_ID "Comeau"
-  /* __COMO_VERSION__ = VRR */
-# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100)
-# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100)
-
-#elif defined(__INTEL_COMPILER) || defined(__ICC)
-# define COMPILER_ID "Intel"
-# if defined(_MSC_VER)
-#  define SIMULATE_ID "MSVC"
-# endif
-# if defined(__GNUC__)
-#  define SIMULATE_ID "GNU"
-# endif
-  /* __INTEL_COMPILER = VRP */
-# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
-# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
-# if defined(__INTEL_COMPILER_UPDATE)
-#  define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
-# else
-#  define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER   % 10)
-# endif
-# if defined(__INTEL_COMPILER_BUILD_DATE)
-  /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
-#  define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
-# endif
-# if defined(_MSC_VER)
-   /* _MSC_VER = VVRR */
-#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
-#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
-# endif
-# if defined(__GNUC__)
-#  define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
-# elif defined(__GNUG__)
-#  define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
-# endif
-# if defined(__GNUC_MINOR__)
-#  define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
-# endif
-# if defined(__GNUC_PATCHLEVEL__)
-#  define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
-# endif
-
-#elif defined(__PATHCC__)
-# define COMPILER_ID "PathScale"
-# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
-# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
-# if defined(__PATHCC_PATCHLEVEL__)
-#  define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
-# endif
-
-#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
-# define COMPILER_ID "Embarcadero"
-# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
-# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
-# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__     & 0xFFFF)
-
-#elif defined(__BORLANDC__)
-# define COMPILER_ID "Borland"
-  /* __BORLANDC__ = 0xVRR */
-# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
-# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
-
-#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
-# define COMPILER_ID "Watcom"
-   /* __WATCOMC__ = VVRR */
-# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
-# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
-# if (__WATCOMC__ % 10) > 0
-#  define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
-# endif
-
-#elif defined(__WATCOMC__)
-# define COMPILER_ID "OpenWatcom"
-   /* __WATCOMC__ = VVRP + 1100 */
-# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
-# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
-# if (__WATCOMC__ % 10) > 0
-#  define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
-# endif
-
-#elif defined(__SUNPRO_CC)
-# define COMPILER_ID "SunPro"
-# if __SUNPRO_CC >= 0x5100
-   /* __SUNPRO_CC = 0xVRRP */
-#  define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12)
-#  define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF)
-#  define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC    & 0xF)
-# else
-   /* __SUNPRO_CC = 0xVRP */
-#  define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8)
-#  define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF)
-#  define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC    & 0xF)
-# endif
-
-#elif defined(__HP_aCC)
-# define COMPILER_ID "HP"
-  /* __HP_aCC = VVRRPP */
-# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
-# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
-# define COMPILER_VERSION_PATCH DEC(__HP_aCC     % 100)
-
-#elif defined(__DECCXX)
-# define COMPILER_ID "Compaq"
-  /* __DECCXX_VER = VVRRTPPPP */
-# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000)
-# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000  % 100)
-# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER         % 10000)
-
-#elif defined(__IBMCPP__) && defined(__COMPILER_VER__)
-# define COMPILER_ID "zOS"
-  /* __IBMCPP__ = VRP */
-# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
-# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
-# define COMPILER_VERSION_PATCH DEC(__IBMCPP__    % 10)
-
-#elif defined(__ibmxl__) && defined(__clang__)
-# define COMPILER_ID "XLClang"
-# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
-# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
-# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
-# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
-
-
-#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800
-# define COMPILER_ID "XL"
-  /* __IBMCPP__ = VRP */
-# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
-# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
-# define COMPILER_VERSION_PATCH DEC(__IBMCPP__    % 10)
-
-#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800
-# define COMPILER_ID "VisualAge"
-  /* __IBMCPP__ = VRP */
-# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
-# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
-# define COMPILER_VERSION_PATCH DEC(__IBMCPP__    % 10)
-
-#elif defined(__PGI)
-# define COMPILER_ID "PGI"
-# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
-# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
-# if defined(__PGIC_PATCHLEVEL__)
-#  define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
-# endif
-
-#elif defined(_CRAYC)
-# define COMPILER_ID "Cray"
-# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
-# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
-
-#elif defined(__TI_COMPILER_VERSION__)
-# define COMPILER_ID "TI"
-  /* __TI_COMPILER_VERSION__ = VVVRRRPPP */
-# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
-# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000   % 1000)
-# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__        % 1000)
-
-#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)
-# define COMPILER_ID "Fujitsu"
-
-#elif defined(__ghs__)
-# define COMPILER_ID "GHS"
-/* __GHS_VERSION_NUMBER = VVVVRP */
-# ifdef __GHS_VERSION_NUMBER
-# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
-# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
-# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER      % 10)
-# endif
-
-#elif defined(__SCO_VERSION__)
-# define COMPILER_ID "SCO"
-
-#elif defined(__ARMCC_VERSION) && !defined(__clang__)
-# define COMPILER_ID "ARMCC"
-#if __ARMCC_VERSION >= 1000000
-  /* __ARMCC_VERSION = VRRPPPP */
-  # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
-  # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
-  # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION     % 10000)
-#else
-  /* __ARMCC_VERSION = VRPPPP */
-  # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
-  # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
-  # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION    % 10000)
-#endif
-
-
-#elif defined(__clang__) && defined(__apple_build_version__)
-# define COMPILER_ID "AppleClang"
-# if defined(_MSC_VER)
-#  define SIMULATE_ID "MSVC"
-# endif
-# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
-# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
-# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
-# if defined(_MSC_VER)
-   /* _MSC_VER = VVRR */
-#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
-#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
-# endif
-# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
-
-#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
-# define COMPILER_ID "ARMClang"
-  # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
-  # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
-  # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION     % 10000)
-# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
-
-#elif defined(__clang__)
-# define COMPILER_ID "Clang"
-# if defined(_MSC_VER)
-#  define SIMULATE_ID "MSVC"
-# endif
-# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
-# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
-# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
-# if defined(_MSC_VER)
-   /* _MSC_VER = VVRR */
-#  define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
-#  define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
-# endif
-
-#elif defined(__GNUC__) || defined(__GNUG__)
-# define COMPILER_ID "GNU"
-# if defined(__GNUC__)
-#  define COMPILER_VERSION_MAJOR DEC(__GNUC__)
-# else
-#  define COMPILER_VERSION_MAJOR DEC(__GNUG__)
-# endif
-# if defined(__GNUC_MINOR__)
-#  define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
-# endif
-# if defined(__GNUC_PATCHLEVEL__)
-#  define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
-# endif
-
-#elif defined(_MSC_VER)
-# define COMPILER_ID "MSVC"
-  /* _MSC_VER = VVRR */
-# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
-# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
-# if defined(_MSC_FULL_VER)
-#  if _MSC_VER >= 1400
-    /* _MSC_FULL_VER = VVRRPPPPP */
-#   define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
-#  else
-    /* _MSC_FULL_VER = VVRRPPPP */
-#   define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
-#  endif
-# endif
-# if defined(_MSC_BUILD)
-#  define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
-# endif
-
-#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
-# define COMPILER_ID "ADSP"
-#if defined(__VISUALDSPVERSION__)
-  /* __VISUALDSPVERSION__ = 0xVVRRPP00 */
-# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
-# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
-# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8  & 0xFF)
-#endif
-
-#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
-# define COMPILER_ID "IAR"
-# if defined(__VER__) && defined(__ICCARM__)
-#  define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
-#  define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
-#  define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
-#  define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
-# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__))
-#  define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
-#  define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
-#  define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
-#  define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
-# endif
-
-
-/* These compilers are either not known or too old to define an
-  identification macro.  Try to identify the platform and guess that
-  it is the native compiler.  */
-#elif defined(__hpux) || defined(__hpua)
-# define COMPILER_ID "HP"
-
-#else /* unknown compiler */
-# define COMPILER_ID ""
-#endif
-
-/* Construct the string literal in pieces to prevent the source from
-   getting matched.  Store it in a pointer rather than an array
-   because some compilers will just produce instructions to fill the
-   array rather than assigning a pointer to a static array.  */
-char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
-#ifdef SIMULATE_ID
-char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
-#endif
-
-#ifdef __QNXNTO__
-char const* qnxnto = "INFO" ":" "qnxnto[]";
-#endif
-
-#if defined(__CRAYXE) || defined(__CRAYXC)
-char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
-#endif
-
-#define STRINGIFY_HELPER(X) #X
-#define STRINGIFY(X) STRINGIFY_HELPER(X)
-
-/* Identify known platforms by name.  */
-#if defined(__linux) || defined(__linux__) || defined(linux)
-# define PLATFORM_ID "Linux"
-
-#elif defined(__CYGWIN__)
-# define PLATFORM_ID "Cygwin"
-
-#elif defined(__MINGW32__)
-# define PLATFORM_ID "MinGW"
-
-#elif defined(__APPLE__)
-# define PLATFORM_ID "Darwin"
-
-#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
-# define PLATFORM_ID "Windows"
-
-#elif defined(__FreeBSD__) || defined(__FreeBSD)
-# define PLATFORM_ID "FreeBSD"
-
-#elif defined(__NetBSD__) || defined(__NetBSD)
-# define PLATFORM_ID "NetBSD"
-
-#elif defined(__OpenBSD__) || defined(__OPENBSD)
-# define PLATFORM_ID "OpenBSD"
-
-#elif defined(__sun) || defined(sun)
-# define PLATFORM_ID "SunOS"
-
-#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
-# define PLATFORM_ID "AIX"
-
-#elif defined(__hpux) || defined(__hpux__)
-# define PLATFORM_ID "HP-UX"
-
-#elif defined(__HAIKU__)
-# define PLATFORM_ID "Haiku"
-
-#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
-# define PLATFORM_ID "BeOS"
-
-#elif defined(__QNX__) || defined(__QNXNTO__)
-# define PLATFORM_ID "QNX"
-
-#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
-# define PLATFORM_ID "Tru64"
-
-#elif defined(__riscos) || defined(__riscos__)
-# define PLATFORM_ID "RISCos"
-
-#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
-# define PLATFORM_ID "SINIX"
-
-#elif defined(__UNIX_SV__)
-# define PLATFORM_ID "UNIX_SV"
-
-#elif defined(__bsdos__)
-# define PLATFORM_ID "BSDOS"
-
-#elif defined(_MPRAS) || defined(MPRAS)
-# define PLATFORM_ID "MP-RAS"
-
-#elif defined(__osf) || defined(__osf__)
-# define PLATFORM_ID "OSF1"
-
-#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
-# define PLATFORM_ID "SCO_SV"
-
-#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
-# define PLATFORM_ID "ULTRIX"
-
-#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
-# define PLATFORM_ID "Xenix"
-
-#elif defined(__WATCOMC__)
-# if defined(__LINUX__)
-#  define PLATFORM_ID "Linux"
-
-# elif defined(__DOS__)
-#  define PLATFORM_ID "DOS"
-
-# elif defined(__OS2__)
-#  define PLATFORM_ID "OS2"
-
-# elif defined(__WINDOWS__)
-#  define PLATFORM_ID "Windows3x"
-
-# else /* unknown platform */
-#  define PLATFORM_ID
-# endif
-
-#elif defined(__INTEGRITY)
-# if defined(INT_178B)
-#  define PLATFORM_ID "Integrity178"
-
-# else /* regular Integrity */
-#  define PLATFORM_ID "Integrity"
-# endif
-
-#else /* unknown platform */
-# define PLATFORM_ID
-
-#endif
-
-/* For windows compilers MSVC and Intel we can determine
-   the architecture of the compiler being used.  This is because
-   the compilers do not have flags that can change the architecture,
-   but rather depend on which compiler is being used
-*/
-#if defined(_WIN32) && defined(_MSC_VER)
-# if defined(_M_IA64)
-#  define ARCHITECTURE_ID "IA64"
-
-# elif defined(_M_X64) || defined(_M_AMD64)
-#  define ARCHITECTURE_ID "x64"
-
-# elif defined(_M_IX86)
-#  define ARCHITECTURE_ID "X86"
-
-# elif defined(_M_ARM64)
-#  define ARCHITECTURE_ID "ARM64"
-
-# elif defined(_M_ARM)
-#  if _M_ARM == 4
-#   define ARCHITECTURE_ID "ARMV4I"
-#  elif _M_ARM == 5
-#   define ARCHITECTURE_ID "ARMV5I"
-#  else
-#   define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
-#  endif
-
-# elif defined(_M_MIPS)
-#  define ARCHITECTURE_ID "MIPS"
-
-# elif defined(_M_SH)
-#  define ARCHITECTURE_ID "SHx"
-
-# else /* unknown architecture */
-#  define ARCHITECTURE_ID ""
-# endif
-
-#elif defined(__WATCOMC__)
-# if defined(_M_I86)
-#  define ARCHITECTURE_ID "I86"
-
-# elif defined(_M_IX86)
-#  define ARCHITECTURE_ID "X86"
-
-# else /* unknown architecture */
-#  define ARCHITECTURE_ID ""
-# endif
-
-#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
-# if defined(__ICCARM__)
-#  define ARCHITECTURE_ID "ARM"
-
-# elif defined(__ICCRX__)
-#  define ARCHITECTURE_ID "RX"
-
-# elif defined(__ICCRH850__)
-#  define ARCHITECTURE_ID "RH850"
-
-# elif defined(__ICCRL78__)
-#  define ARCHITECTURE_ID "RL78"
-
-# elif defined(__ICCRISCV__)
-#  define ARCHITECTURE_ID "RISCV"
-
-# elif defined(__ICCAVR__)
-#  define ARCHITECTURE_ID "AVR"
-
-# elif defined(__ICC430__)
-#  define ARCHITECTURE_ID "MSP430"
-
-# elif defined(__ICCV850__)
-#  define ARCHITECTURE_ID "V850"
-
-# elif defined(__ICC8051__)
-#  define ARCHITECTURE_ID "8051"
-
-# else /* unknown architecture */
-#  define ARCHITECTURE_ID ""
-# endif
-
-#elif defined(__ghs__)
-# if defined(__PPC64__)
-#  define ARCHITECTURE_ID "PPC64"
-
-# elif defined(__ppc__)
-#  define ARCHITECTURE_ID "PPC"
-
-# elif defined(__ARM__)
-#  define ARCHITECTURE_ID "ARM"
-
-# elif defined(__x86_64__)
-#  define ARCHITECTURE_ID "x64"
-
-# elif defined(__i386__)
-#  define ARCHITECTURE_ID "X86"
-
-# else /* unknown architecture */
-#  define ARCHITECTURE_ID ""
-# endif
-#else
-#  define ARCHITECTURE_ID
-#endif
-
-/* Convert integer to decimal digit literals.  */
-#define DEC(n)                   \
-  ('0' + (((n) / 10000000)%10)), \
-  ('0' + (((n) / 1000000)%10)),  \
-  ('0' + (((n) / 100000)%10)),   \
-  ('0' + (((n) / 10000)%10)),    \
-  ('0' + (((n) / 1000)%10)),     \
-  ('0' + (((n) / 100)%10)),      \
-  ('0' + (((n) / 10)%10)),       \
-  ('0' +  ((n) % 10))
-
-/* Convert integer to hex digit literals.  */
-#define HEX(n)             \
-  ('0' + ((n)>>28 & 0xF)), \
-  ('0' + ((n)>>24 & 0xF)), \
-  ('0' + ((n)>>20 & 0xF)), \
-  ('0' + ((n)>>16 & 0xF)), \
-  ('0' + ((n)>>12 & 0xF)), \
-  ('0' + ((n)>>8  & 0xF)), \
-  ('0' + ((n)>>4  & 0xF)), \
-  ('0' + ((n)     & 0xF))
-
-/* Construct a string literal encoding the version number components. */
-#ifdef COMPILER_VERSION_MAJOR
-char const info_version[] = {
-  'I', 'N', 'F', 'O', ':',
-  'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
-  COMPILER_VERSION_MAJOR,
-# ifdef COMPILER_VERSION_MINOR
-  '.', COMPILER_VERSION_MINOR,
-#  ifdef COMPILER_VERSION_PATCH
-   '.', COMPILER_VERSION_PATCH,
-#   ifdef COMPILER_VERSION_TWEAK
-    '.', COMPILER_VERSION_TWEAK,
-#   endif
-#  endif
-# endif
-  ']','\0'};
-#endif
-
-/* Construct a string literal encoding the internal version number. */
-#ifdef COMPILER_VERSION_INTERNAL
-char const info_version_internal[] = {
-  'I', 'N', 'F', 'O', ':',
-  'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
-  'i','n','t','e','r','n','a','l','[',
-  COMPILER_VERSION_INTERNAL,']','\0'};
-#endif
-
-/* Construct a string literal encoding the version number components. */
-#ifdef SIMULATE_VERSION_MAJOR
-char const info_simulate_version[] = {
-  'I', 'N', 'F', 'O', ':',
-  's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
-  SIMULATE_VERSION_MAJOR,
-# ifdef SIMULATE_VERSION_MINOR
-  '.', SIMULATE_VERSION_MINOR,
-#  ifdef SIMULATE_VERSION_PATCH
-   '.', SIMULATE_VERSION_PATCH,
-#   ifdef SIMULATE_VERSION_TWEAK
-    '.', SIMULATE_VERSION_TWEAK,
-#   endif
-#  endif
-# endif
-  ']','\0'};
-#endif
-
-/* Construct the string literal in pieces to prevent the source from
-   getting matched.  Store it in a pointer rather than an array
-   because some compilers will just produce instructions to fill the
-   array rather than assigning a pointer to a static array.  */
-char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
-char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
-
-
-
-
-#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L
-#  if defined(__INTEL_CXX11_MODE__)
-#    if defined(__cpp_aggregate_nsdmi)
-#      define CXX_STD 201402L
-#    else
-#      define CXX_STD 201103L
-#    endif
-#  else
-#    define CXX_STD 199711L
-#  endif
-#elif defined(_MSC_VER) && defined(_MSVC_LANG)
-#  define CXX_STD _MSVC_LANG
-#else
-#  define CXX_STD __cplusplus
-#endif
-
-const char* info_language_dialect_default = "INFO" ":" "dialect_default["
-#if CXX_STD > 201703L
-  "20"
-#elif CXX_STD >= 201703L
-  "17"
-#elif CXX_STD >= 201402L
-  "14"
-#elif CXX_STD >= 201103L
-  "11"
-#else
-  "98"
-#endif
-"]";
-
-/*--------------------------------------------------------------------------*/
-
-int main(int argc, char* argv[])
-{
-  int require = 0;
-  require += info_compiler[argc];
-  require += info_platform[argc];
-#ifdef COMPILER_VERSION_MAJOR
-  require += info_version[argc];
-#endif
-#ifdef COMPILER_VERSION_INTERNAL
-  require += info_version_internal[argc];
-#endif
-#ifdef SIMULATE_ID
-  require += info_simulate[argc];
-#endif
-#ifdef SIMULATE_VERSION_MAJOR
-  require += info_simulate_version[argc];
-#endif
-#if defined(__CRAYXE) || defined(__CRAYXC)
-  require += info_cray[argc];
-#endif
-  require += info_language_dialect_default[argc];
-  (void)argv;
-  return require;
-}

BIN
esp_flasher/lib/esp-serial-flasher/CMakeFiles/3.16.3/CompilerIdCXX/a.out


+ 0 - 463
esp_flasher/lib/esp-serial-flasher/CMakeFiles/CMakeOutput.log

@@ -1,463 +0,0 @@
-The system is: Linux - 5.10.16.3-microsoft-standard-WSL2 - x86_64
-Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
-Compiler: /usr/bin/cc 
-Build flags: 
-Id flags:  
-
-The output was:
-0
-
-
-Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"
-
-The C compiler identification is GNU, found in "/home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/3.16.3/CompilerIdC/a.out"
-
-Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
-Compiler: /usr/bin/c++ 
-Build flags: 
-Id flags:  
-
-The output was:
-0
-
-
-Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"
-
-The CXX compiler identification is GNU, found in "/home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/3.16.3/CompilerIdCXX/a.out"
-
-Determining if the C compiler works passed with the following output:
-Change Dir: /home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp
-
-Run Build Command(s):/usr/bin/make cmTC_8695b/fast && /usr/bin/make -f CMakeFiles/cmTC_8695b.dir/build.make CMakeFiles/cmTC_8695b.dir/build
-make[1]: Entering directory '/home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp'
-Building C object CMakeFiles/cmTC_8695b.dir/testCCompiler.c.o
-/usr/bin/cc    -o CMakeFiles/cmTC_8695b.dir/testCCompiler.c.o   -c /home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp/testCCompiler.c
-Linking C executable cmTC_8695b
-/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8695b.dir/link.txt --verbose=1
-/usr/bin/cc      -rdynamic CMakeFiles/cmTC_8695b.dir/testCCompiler.c.o  -o cmTC_8695b 
-make[1]: Leaving directory '/home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp'
-
-
-
-Detecting C compiler ABI info compiled with the following output:
-Change Dir: /home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp
-
-Run Build Command(s):/usr/bin/make cmTC_8c7d9/fast && /usr/bin/make -f CMakeFiles/cmTC_8c7d9.dir/build.make CMakeFiles/cmTC_8c7d9.dir/build
-make[1]: Entering directory '/home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp'
-Building C object CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o
-/usr/bin/cc   -v -o CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o   -c /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c
-Using built-in specs.
-COLLECT_GCC=/usr/bin/cc
-OFFLOAD_TARGET_NAMES=nvptx-none:hsa
-OFFLOAD_TARGET_DEFAULT=1
-Target: x86_64-linux-gnu
-Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
-Thread model: posix
-gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 
-COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'
- /usr/lib/gcc/x86_64-linux-gnu/9/cc1 -quiet -v -imultiarch x86_64-linux-gnu /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccBr8JWY.s
-GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)
-	compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP
-
-GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
-ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
-ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"
-ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"
-#include "..." search starts here:
-#include <...> search starts here:
- /usr/lib/gcc/x86_64-linux-gnu/9/include
- /usr/local/include
- /usr/include/x86_64-linux-gnu
- /usr/include
-End of search list.
-GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)
-	compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP
-
-GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
-Compiler executable checksum: c0c95c0b4209efec1c1892d5ff24030b
-COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'
- as -v --64 -o CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o /tmp/ccBr8JWY.s
-GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34
-COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/
-LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/
-COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'
-Linking C executable cmTC_8c7d9
-/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8c7d9.dir/link.txt --verbose=1
-/usr/bin/cc     -v -rdynamic CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o  -o cmTC_8c7d9 
-Using built-in specs.
-COLLECT_GCC=/usr/bin/cc
-COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
-OFFLOAD_TARGET_NAMES=nvptx-none:hsa
-OFFLOAD_TARGET_DEFAULT=1
-Target: x86_64-linux-gnu
-Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
-Thread model: posix
-gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 
-COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/
-LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/
-COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_8c7d9' '-mtune=generic' '-march=x86-64'
- /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/cc78SKyq.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_8c7d9 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o
-COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_8c7d9' '-mtune=generic' '-march=x86-64'
-make[1]: Leaving directory '/home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp'
-
-
-
-Parsed C implicit include dir info from above output: rv=done
-  found start of include info
-  found start of implicit include info
-    add: [/usr/lib/gcc/x86_64-linux-gnu/9/include]
-    add: [/usr/local/include]
-    add: [/usr/include/x86_64-linux-gnu]
-    add: [/usr/include]
-  end of search list found
-  collapse include dir [/usr/lib/gcc/x86_64-linux-gnu/9/include] ==> [/usr/lib/gcc/x86_64-linux-gnu/9/include]
-  collapse include dir [/usr/local/include] ==> [/usr/local/include]
-  collapse include dir [/usr/include/x86_64-linux-gnu] ==> [/usr/include/x86_64-linux-gnu]
-  collapse include dir [/usr/include] ==> [/usr/include]
-  implicit include dirs: [/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include]
-
-
-Parsed C implicit link information from above output:
-  link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
-  ignore line: [Change Dir: /home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp]
-  ignore line: []
-  ignore line: [Run Build Command(s):/usr/bin/make cmTC_8c7d9/fast && /usr/bin/make -f CMakeFiles/cmTC_8c7d9.dir/build.make CMakeFiles/cmTC_8c7d9.dir/build]
-  ignore line: [make[1]: Entering directory '/home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp']
-  ignore line: [Building C object CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o]
-  ignore line: [/usr/bin/cc   -v -o CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o   -c /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c]
-  ignore line: [Using built-in specs.]
-  ignore line: [COLLECT_GCC=/usr/bin/cc]
-  ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa]
-  ignore line: [OFFLOAD_TARGET_DEFAULT=1]
-  ignore line: [Target: x86_64-linux-gnu]
-  ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu]
-  ignore line: [Thread model: posix]
-  ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) ]
-  ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64']
-  ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/cc1 -quiet -v -imultiarch x86_64-linux-gnu /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccBr8JWY.s]
-  ignore line: [GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)]
-  ignore line: [	compiled by GNU C version 9.4.0  GMP version 6.2.0  MPFR version 4.0.2  MPC version 1.1.0  isl version isl-0.22.1-GMP]
-  ignore line: []
-  ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
-  ignore line: [ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"]
-  ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"]
-  ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"]
-  ignore line: [#include "..." search starts here:]
-  ignore line: [#include <...> search starts here:]
-  ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/include]
-  ignore line: [ /usr/local/include]
-  ignore line: [ /usr/include/x86_64-linux-gnu]
-  ignore line: [ /usr/include]
-  ignore line: [End of search list.]
-  ignore line: [GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)]
-  ignore line: [	compiled by GNU C version 9.4.0  GMP version 6.2.0  MPFR version 4.0.2  MPC version 1.1.0  isl version isl-0.22.1-GMP]
-  ignore line: []
-  ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
-  ignore line: [Compiler executable checksum: c0c95c0b4209efec1c1892d5ff24030b]
-  ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64']
-  ignore line: [ as -v --64 -o CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o /tmp/ccBr8JWY.s]
-  ignore line: [GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34]
-  ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/]
-  ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/]
-  ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64']
-  ignore line: [Linking C executable cmTC_8c7d9]
-  ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8c7d9.dir/link.txt --verbose=1]
-  ignore line: [/usr/bin/cc     -v -rdynamic CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o  -o cmTC_8c7d9 ]
-  ignore line: [Using built-in specs.]
-  ignore line: [COLLECT_GCC=/usr/bin/cc]
-  ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper]
-  ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa]
-  ignore line: [OFFLOAD_TARGET_DEFAULT=1]
-  ignore line: [Target: x86_64-linux-gnu]
-  ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu]
-  ignore line: [Thread model: posix]
-  ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) ]
-  ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/]
-  ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/]
-  ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_8c7d9' '-mtune=generic' '-march=x86-64']
-  link line: [ /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/cc78SKyq.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_8c7d9 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o]
-    arg [/usr/lib/gcc/x86_64-linux-gnu/9/collect2] ==> ignore
-    arg [-plugin] ==> ignore
-    arg [/usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so] ==> ignore
-    arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] ==> ignore
-    arg [-plugin-opt=-fresolution=/tmp/cc78SKyq.res] ==> ignore
-    arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
-    arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
-    arg [-plugin-opt=-pass-through=-lc] ==> ignore
-    arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
-    arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
-    arg [--build-id] ==> ignore
-    arg [--eh-frame-hdr] ==> ignore
-    arg [-m] ==> ignore
-    arg [elf_x86_64] ==> ignore
-    arg [--hash-style=gnu] ==> ignore
-    arg [--as-needed] ==> ignore
-    arg [-export-dynamic] ==> ignore
-    arg [-dynamic-linker] ==> ignore
-    arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
-    arg [-pie] ==> ignore
-    arg [-znow] ==> ignore
-    arg [-zrelro] ==> ignore
-    arg [-o] ==> ignore
-    arg [cmTC_8c7d9] ==> ignore
-    arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o] ==> ignore
-    arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o] ==> ignore
-    arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o] ==> ignore
-    arg [-L/usr/lib/gcc/x86_64-linux-gnu/9] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9]
-    arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu]
-    arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib]
-    arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu]
-    arg [-L/lib/../lib] ==> dir [/lib/../lib]
-    arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu]
-    arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib]
-    arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..]
-    arg [CMakeFiles/cmTC_8c7d9.dir/CMakeCCompilerABI.c.o] ==> ignore
-    arg [-lgcc] ==> lib [gcc]
-    arg [--push-state] ==> ignore
-    arg [--as-needed] ==> ignore
-    arg [-lgcc_s] ==> lib [gcc_s]
-    arg [--pop-state] ==> ignore
-    arg [-lc] ==> lib [c]
-    arg [-lgcc] ==> lib [gcc]
-    arg [--push-state] ==> ignore
-    arg [--as-needed] ==> ignore
-    arg [-lgcc_s] ==> lib [gcc_s]
-    arg [--pop-state] ==> ignore
-    arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o] ==> ignore
-    arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] ==> ignore
-  collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9] ==> [/usr/lib/gcc/x86_64-linux-gnu/9]
-  collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
-  collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> [/usr/lib]
-  collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu]
-  collapse library dir [/lib/../lib] ==> [/lib]
-  collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
-  collapse library dir [/usr/lib/../lib] ==> [/usr/lib]
-  collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> [/usr/lib]
-  implicit libs: [gcc;gcc_s;c;gcc;gcc_s]
-  implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib]
-  implicit fwks: []
-
-
-Determining if the CXX compiler works passed with the following output:
-Change Dir: /home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp
-
-Run Build Command(s):/usr/bin/make cmTC_9b51d/fast && /usr/bin/make -f CMakeFiles/cmTC_9b51d.dir/build.make CMakeFiles/cmTC_9b51d.dir/build
-make[1]: Entering directory '/home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp'
-Building CXX object CMakeFiles/cmTC_9b51d.dir/testCXXCompiler.cxx.o
-/usr/bin/c++     -o CMakeFiles/cmTC_9b51d.dir/testCXXCompiler.cxx.o -c /home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
-Linking CXX executable cmTC_9b51d
-/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9b51d.dir/link.txt --verbose=1
-/usr/bin/c++       -rdynamic CMakeFiles/cmTC_9b51d.dir/testCXXCompiler.cxx.o  -o cmTC_9b51d 
-make[1]: Leaving directory '/home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp'
-
-
-
-Detecting CXX compiler ABI info compiled with the following output:
-Change Dir: /home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp
-
-Run Build Command(s):/usr/bin/make cmTC_b76ad/fast && /usr/bin/make -f CMakeFiles/cmTC_b76ad.dir/build.make CMakeFiles/cmTC_b76ad.dir/build
-make[1]: Entering directory '/home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp'
-Building CXX object CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o
-/usr/bin/c++    -v -o CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp
-Using built-in specs.
-COLLECT_GCC=/usr/bin/c++
-OFFLOAD_TARGET_NAMES=nvptx-none:hsa
-OFFLOAD_TARGET_DEFAULT=1
-Target: x86_64-linux-gnu
-Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
-Thread model: posix
-gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 
-COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
- /usr/lib/gcc/x86_64-linux-gnu/9/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccTEwRoV.s
-GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)
-	compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP
-
-GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
-ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/9"
-ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
-ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"
-ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"
-#include "..." search starts here:
-#include <...> search starts here:
- /usr/include/c++/9
- /usr/include/x86_64-linux-gnu/c++/9
- /usr/include/c++/9/backward
- /usr/lib/gcc/x86_64-linux-gnu/9/include
- /usr/local/include
- /usr/include/x86_64-linux-gnu
- /usr/include
-End of search list.
-GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)
-	compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP
-
-GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
-Compiler executable checksum: 65fe925b83d3956b533de4aaba7dace0
-COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
- as -v --64 -o CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccTEwRoV.s
-GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34
-COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/
-LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/
-COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
-Linking CXX executable cmTC_b76ad
-/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b76ad.dir/link.txt --verbose=1
-/usr/bin/c++      -v -rdynamic CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o  -o cmTC_b76ad 
-Using built-in specs.
-COLLECT_GCC=/usr/bin/c++
-COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
-OFFLOAD_TARGET_NAMES=nvptx-none:hsa
-OFFLOAD_TARGET_DEFAULT=1
-Target: x86_64-linux-gnu
-Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
-Thread model: posix
-gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 
-COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/
-LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/
-COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_b76ad' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
- /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccnXxdBn.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_b76ad /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o
-COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_b76ad' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
-make[1]: Leaving directory '/home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp'
-
-
-
-Parsed CXX implicit include dir info from above output: rv=done
-  found start of include info
-  found start of implicit include info
-    add: [/usr/include/c++/9]
-    add: [/usr/include/x86_64-linux-gnu/c++/9]
-    add: [/usr/include/c++/9/backward]
-    add: [/usr/lib/gcc/x86_64-linux-gnu/9/include]
-    add: [/usr/local/include]
-    add: [/usr/include/x86_64-linux-gnu]
-    add: [/usr/include]
-  end of search list found
-  collapse include dir [/usr/include/c++/9] ==> [/usr/include/c++/9]
-  collapse include dir [/usr/include/x86_64-linux-gnu/c++/9] ==> [/usr/include/x86_64-linux-gnu/c++/9]
-  collapse include dir [/usr/include/c++/9/backward] ==> [/usr/include/c++/9/backward]
-  collapse include dir [/usr/lib/gcc/x86_64-linux-gnu/9/include] ==> [/usr/lib/gcc/x86_64-linux-gnu/9/include]
-  collapse include dir [/usr/local/include] ==> [/usr/local/include]
-  collapse include dir [/usr/include/x86_64-linux-gnu] ==> [/usr/include/x86_64-linux-gnu]
-  collapse include dir [/usr/include] ==> [/usr/include]
-  implicit include dirs: [/usr/include/c++/9;/usr/include/x86_64-linux-gnu/c++/9;/usr/include/c++/9/backward;/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include]
-
-
-Parsed CXX implicit link information from above output:
-  link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
-  ignore line: [Change Dir: /home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp]
-  ignore line: []
-  ignore line: [Run Build Command(s):/usr/bin/make cmTC_b76ad/fast && /usr/bin/make -f CMakeFiles/cmTC_b76ad.dir/build.make CMakeFiles/cmTC_b76ad.dir/build]
-  ignore line: [make[1]: Entering directory '/home/cococode/flipperzero-firmware/lib/esp-serial-flasher/CMakeFiles/CMakeTmp']
-  ignore line: [Building CXX object CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o]
-  ignore line: [/usr/bin/c++    -v -o CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp]
-  ignore line: [Using built-in specs.]
-  ignore line: [COLLECT_GCC=/usr/bin/c++]
-  ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa]
-  ignore line: [OFFLOAD_TARGET_DEFAULT=1]
-  ignore line: [Target: x86_64-linux-gnu]
-  ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu]
-  ignore line: [Thread model: posix]
-  ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) ]
-  ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
-  ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccTEwRoV.s]
-  ignore line: [GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)]
-  ignore line: [	compiled by GNU C version 9.4.0  GMP version 6.2.0  MPFR version 4.0.2  MPC version 1.1.0  isl version isl-0.22.1-GMP]
-  ignore line: []
-  ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
-  ignore line: [ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/9"]
-  ignore line: [ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"]
-  ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"]
-  ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"]
-  ignore line: [#include "..." search starts here:]
-  ignore line: [#include <...> search starts here:]
-  ignore line: [ /usr/include/c++/9]
-  ignore line: [ /usr/include/x86_64-linux-gnu/c++/9]
-  ignore line: [ /usr/include/c++/9/backward]
-  ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/include]
-  ignore line: [ /usr/local/include]
-  ignore line: [ /usr/include/x86_64-linux-gnu]
-  ignore line: [ /usr/include]
-  ignore line: [End of search list.]
-  ignore line: [GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)]
-  ignore line: [	compiled by GNU C version 9.4.0  GMP version 6.2.0  MPFR version 4.0.2  MPC version 1.1.0  isl version isl-0.22.1-GMP]
-  ignore line: []
-  ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
-  ignore line: [Compiler executable checksum: 65fe925b83d3956b533de4aaba7dace0]
-  ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
-  ignore line: [ as -v --64 -o CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccTEwRoV.s]
-  ignore line: [GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34]
-  ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/]
-  ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/]
-  ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
-  ignore line: [Linking CXX executable cmTC_b76ad]
-  ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b76ad.dir/link.txt --verbose=1]
-  ignore line: [/usr/bin/c++      -v -rdynamic CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o  -o cmTC_b76ad ]
-  ignore line: [Using built-in specs.]
-  ignore line: [COLLECT_GCC=/usr/bin/c++]
-  ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper]
-  ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa]
-  ignore line: [OFFLOAD_TARGET_DEFAULT=1]
-  ignore line: [Target: x86_64-linux-gnu]
-  ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu]
-  ignore line: [Thread model: posix]
-  ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) ]
-  ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/]
-  ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/]
-  ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_b76ad' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
-  link line: [ /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccnXxdBn.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_b76ad /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o]
-    arg [/usr/lib/gcc/x86_64-linux-gnu/9/collect2] ==> ignore
-    arg [-plugin] ==> ignore
-    arg [/usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so] ==> ignore
-    arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] ==> ignore
-    arg [-plugin-opt=-fresolution=/tmp/ccnXxdBn.res] ==> ignore
-    arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
-    arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
-    arg [-plugin-opt=-pass-through=-lc] ==> ignore
-    arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
-    arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
-    arg [--build-id] ==> ignore
-    arg [--eh-frame-hdr] ==> ignore
-    arg [-m] ==> ignore
-    arg [elf_x86_64] ==> ignore
-    arg [--hash-style=gnu] ==> ignore
-    arg [--as-needed] ==> ignore
-    arg [-export-dynamic] ==> ignore
-    arg [-dynamic-linker] ==> ignore
-    arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
-    arg [-pie] ==> ignore
-    arg [-znow] ==> ignore
-    arg [-zrelro] ==> ignore
-    arg [-o] ==> ignore
-    arg [cmTC_b76ad] ==> ignore
-    arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o] ==> ignore
-    arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o] ==> ignore
-    arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o] ==> ignore
-    arg [-L/usr/lib/gcc/x86_64-linux-gnu/9] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9]
-    arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu]
-    arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib]
-    arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu]
-    arg [-L/lib/../lib] ==> dir [/lib/../lib]
-    arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu]
-    arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib]
-    arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..]
-    arg [CMakeFiles/cmTC_b76ad.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
-    arg [-lstdc++] ==> lib [stdc++]
-    arg [-lm] ==> lib [m]
-    arg [-lgcc_s] ==> lib [gcc_s]
-    arg [-lgcc] ==> lib [gcc]
-    arg [-lc] ==> lib [c]
-    arg [-lgcc_s] ==> lib [gcc_s]
-    arg [-lgcc] ==> lib [gcc]
-    arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o] ==> ignore
-    arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] ==> ignore
-  collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9] ==> [/usr/lib/gcc/x86_64-linux-gnu/9]
-  collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
-  collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> [/usr/lib]
-  collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu]
-  collapse library dir [/lib/../lib] ==> [/lib]
-  collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
-  collapse library dir [/usr/lib/../lib] ==> [/usr/lib]
-  collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> [/usr/lib]
-  implicit libs: [stdc++;m;gcc_s;gcc;c;gcc_s;gcc]
-  implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib]
-  implicit fwks: []
-
-

+ 0 - 1
esp_flasher/lib/esp-serial-flasher/CMakeFiles/cmake.check_cache

@@ -1 +0,0 @@
-# This file is generated by cmake for dependency checking of the CMakeCache.txt file

+ 0 - 119
esp_flasher/lib/esp-serial-flasher/CMakeLists.txt

@@ -1,119 +0,0 @@
-cmake_minimum_required(VERSION 3.5)
-
-set(srcs
-    src/esp_targets.c
-    src/md5_hash.c
-    src/esp_loader.c
-    src/protocol_common.c
-)
-
-if (DEFINED ESP_PLATFORM)
-    if (${CONFIG_SERIAL_FLASHER_INTERFACE_UART})
-        list(APPEND srcs
-            src/protocol_uart.c
-            src/slip.c
-            port/esp32_port.c
-        )
-    elseif (${CONFIG_SERIAL_FLASHER_INTERFACE_SPI})
-        list(APPEND srcs
-            src/protocol_spi.c
-            port/esp32_spi_port.c
-        )
-    endif()
-    # Register component to esp-idf build system
-    if ("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER "4.0")
-        # esp_timer component was introduced in v4.2
-        set(priv_requires driver)
-        if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER "4.1")
-            list(APPEND priv_requires esp_timer)
-        endif()
-
-        idf_component_register(SRCS ${srcs}
-                               INCLUDE_DIRS include port
-                               PRIV_INCLUDE_DIRS private_include
-                               PRIV_REQUIRES ${priv_requires})
-
-        set(target ${COMPONENT_LIB})
-        component_compile_options(-Wstrict-prototypes)
-    else()
-        # Remove when dropping support for IDF 3.3
-        set(COMPONENT_SRCS ${srcs})
-        set(COMPONENT_ADD_INCLUDEDIRS include port)
-        set(COMPONENT_PRIV_INCLUDEDIRS private_include)
-        register_component()
-        set(target ${COMPONENT_TARGET})
-    endif()
-
-else()
-    if (NOT DEFINED SERIAL_FLASHER_INTERFACE_UART AND NOT DEFINED SERIAL_FLASHER_INTERFACE_SPI)
-        set(SERIAL_FLASHER_INTERFACE_UART true)
-    endif()
-
-    if (DEFINED SERIAL_FLASHER_INTERFACE_UART)
-        list(APPEND srcs
-            src/protocol_uart.c
-            src/slip.c
-        )
-    elseif (DEFINED SERIAL_FLASHER_INTERFACE_SPI)
-        list(APPEND srcs src/protocol_spi.c)
-    endif()
-
-    # Create traditional CMake target
-    add_library(flasher ${srcs})
-
-    target_include_directories(flasher PUBLIC include port PRIVATE private_include)
-
-    if(PORT STREQUAL "STM32")
-        target_link_libraries(flasher PUBLIC stm_cube)
-        target_sources(flasher PRIVATE port/stm32_port.c)
-    elseif(PORT STREQUAL "RASPBERRY_PI")
-        find_library(pigpio_LIB pigpio)
-        target_link_libraries(flasher PUBLIC ${pigpio_LIB})
-        target_sources(flasher PRIVATE port/raspberry_port.c)
-    else()
-        message(FATAL_ERROR "Selected port is not supported")
-    endif()
-
-    set(target flasher)
-
-endif()
-
-if (DEFINED SERIAL_FLASHER_INTERFACE_UART OR CONFIG_SERIAL_FLASHER_INTERFACE_UART STREQUAL "y")
-    target_compile_definitions(${target}
-    PUBLIC
-        SERIAL_FLASHER_INTERFACE_UART
-    )
-    if (DEFINED MD5_ENABLED OR CONFIG_SERIAL_FLASHER_MD5_ENABLED)
-        target_compile_definitions(${target} PUBLIC MD5_ENABLED=1)
-    endif()
-elseif (DEFINED SERIAL_FLASHER_INTERFACE_SPI OR CONFIG_SERIAL_FLASHER_INTERFACE_SPI STREQUAL "y")
-    target_compile_definitions(${target}
-    PUBLIC
-        SERIAL_FLASHER_INTERFACE_SPI
-    )
-endif()
-
-if(DEFINED SERIAL_FLASHER_DEBUG_TRACE OR CONFIG_SERIAL_FLASHER_DEBUG_TRACE)
-    target_compile_definitions(${target} PUBLIC SERIAL_FLASHER_DEBUG_TRACE)
-endif()
-
-if(DEFINED CONFIG_SERIAL_FLASHER_RESET_HOLD_TIME_MS AND DEFINED CONFIG_SERIAL_FLASHER_BOOT_HOLD_TIME_MS)
-    target_compile_definitions(${target}
-    PUBLIC
-        SERIAL_FLASHER_RESET_HOLD_TIME_MS=${CONFIG_SERIAL_FLASHER_RESET_HOLD_TIME_MS}
-        SERIAL_FLASHER_BOOT_HOLD_TIME_MS=${CONFIG_SERIAL_FLASHER_BOOT_HOLD_TIME_MS}
-    )
-else()
-    if(NOT DEFINED SERIAL_FLASHER_RESET_HOLD_TIME_MS)
-        target_compile_definitions(${target}
-        PUBLIC
-            SERIAL_FLASHER_RESET_HOLD_TIME_MS=100
-        )
-    endif()
-    if(NOT DEFINED SERIAL_FLASHER_BOOT_HOLD_TIME_MS)
-        target_compile_definitions(${target}
-        PUBLIC
-            SERIAL_FLASHER_BOOT_HOLD_TIME_MS=50
-        )
-    endif()
-endif()

+ 0 - 34
esp_flasher/lib/esp-serial-flasher/Kconfig

@@ -1,34 +0,0 @@
-menu "ESP serial flasher"
-    config SERIAL_FLASHER_MD5_ENABLED
-        bool "Enable MD5 check"
-        default y
-        help
-            Select this option to enable MD5 hashsum check after flashing.
-
-    choice SERIAL_FLASHER_INTERFACE
-        prompt "Hardware interface to use for firmware download"
-        default SERIAL_FLASHER_INTERFACE_UART
-        help
-            esp-serial-flasher can work with UART and SPI interfaces.
-
-        config SERIAL_FLASHER_INTERFACE_UART
-            bool "UART"
-
-        config SERIAL_FLASHER_INTERFACE_SPI
-            bool "SPI (Only supports downloading to RAM, experimental)"
-
-    endchoice
-
-    config SERIAL_FLASHER_RESET_HOLD_TIME_MS
-        int "Time for which the reset pin is asserted when doing a hard reset"
-        default 100
-
-    config SERIAL_FLASHER_BOOT_HOLD_TIME_MS
-        int "Time for which the boot pin is asserted when doing a hard reset"
-        default 50
-
-    config SERIAL_FLASHER_DEBUG_TRACE
-        bool "Enable debug tracing output (only transfer data tracing is supported at the time)"
-        default n
-
-endmenu

+ 0 - 202
esp_flasher/lib/esp-serial-flasher/LICENSE

@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

+ 0 - 154
esp_flasher/lib/esp-serial-flasher/README.md

@@ -1,154 +0,0 @@
-# esp-serial-flasher
-
-`esp-serial-flasher` is a portable C library for flashing or loading apps to RAM of Espressif SoCs from other host microcontrollers.
-
-## Using the library
-Espressif SoCs are normally programmed via serial interface (UART). The port layer for the given host microcontroller has to be implemented if not available. Details can be found in section below.
-
-Supported **host** microcontrollers:
-
-- STM32
-- Raspberry Pi SBC
-- ESP32
-- Any MCU running Zephyr OS
-
-Supported **target** microcontrollers:
-
-- ESP32
-- ESP8266
-- ESP32-S2
-- ESP32-S3
-- ESP32-C3
-- ESP32-C2
-- ESP32-H2
-
-Supported hardware interfaces:
-- UART
-- SPI (only for RAM download, experimental)
-
-For example usage check the `examples` directory.
-
-## Supporting a new host target
-
-In order to support a new target, following functions have to be implemented by user:
-
-- `loader_port_read()`
-- `loader_port_write()`
-- `loader_port_enter_bootloader()`
-- `loader_port_delay_ms()`
-- `loader_port_start_timer()`
-- `loader_port_remaining_time()`
-
-For the SPI interface ports
-- `loader_port_spi_set_cs()`
-needs to be implemented as well.
-
-The following functions are part of the [io.h](include/io.h) header for convenience, however, the user does not have to strictly follow function signatures, as there are not called directly from library.
-
-- `loader_port_change_transmission_rate()`
-- `loader_port_reset_target()`
-- `loader_port_debug_print()`
-
-Prototypes of all functions mentioned above can be found in [io.h](include/io.h).
-
-## Configuration
-
-These are the configuration toggles available to the user:
-
-* `SERIAL_FLASHER_INTERFACE_UART/SERIAL_FLASHER_INTERFACE_SPI`
-
-This defines the hardware interface to use. SPI interface only supports RAM download mode and is in experimental stage and can undergo changes.
-
-Default: SERIAL_FLASHER_INTERFACE_UART
-
-* `MD5_ENABLED`
-
-If enabled, `esp-serial-flasher` is capable of verifying flash integrity after writing to flash.
-
-Default: Enabled
-> Warning: As ROM bootloader of the ESP8266 does not support MD5_CHECK, this option has to be disabled!
-
-* `SERIAL_FLASHER_RESET_HOLD_TIME_MS`
-
-This is the time for which the reset pin is asserted when doing a hard reset in milliseconds.
-
-Default: 100
-
-* `SERIAL_FLASHER_BOOT_HOLD_TIME_MS`
-
-This is the time for which the boot pin is asserted when doing a hard reset in milliseconds.
-
-Default: 50
-
-Configuration can be passed to `cmake` via command line:
-
-```
-cmake -DMD5_ENABLED=1 .. && cmake --build .
-```
-
-### STM32 support
-
-The STM32 port makes use of STM32 HAL libraries, and these do not come with CMake support. In order to compile the project, `stm32-cmake` (a `CMake` support package) has to be pulled as submodule.
-
-```
-git clone --recursive https://github.com/espressif/esp-serial-flasher.git
-```
-
-If you have cloned this repository without the `--recursive` flag, you can initialize the submodule using the following command:
-
-```
-git submodule update --init
-```
-
-In addition to configuration parameters mentioned above, following definitions has to be set:
-
-- TOOLCHAIN_PREFIX: path to arm toolchain (i.e /home/user/gcc-arm-none-eabi-9-2019-q4-major)
-- STM32Cube_DIR: path to STM32 Cube libraries (i.e /home/user/STM32Cube/Repository/STM32Cube_FW_F4_V1.25.0)
-- STM32_CHIP: name of STM32 for which project should be compiled (i.e STM32F407VG)
-- PORT: STM32
-
-This can be achieved by passing definitions to the command line, such as:
-
-```
-cmake -DTOOLCHAIN_PREFIX="/path_to_toolchain" -DSTM32Cube_DIR="path_to_stm32Cube" -DSTM32_CHIP="STM32F407VG" -DPORT="STM32" .. && cmake --build .
-```
-
-Alternatively, those variables can be set in the top level `cmake` directory:
-
-```
-set(TOOLCHAIN_PREFIX    path_to_toolchain)
-set(STM32Cube_DIR       path_to_stm32_HAL)
-set(STM32_CHIP          STM32F407VG)
-set(PORT                STM32)
-```
-
-### Zephyr support
-
-The Zephyr port is ready to be integrated into Zephyr apps as a Zephyr module. In the manifest file (west.yml), add:
-
-```
-    - name: esp-flasher
-      url: https://github.com/espressif/esp-serial-flasher
-      revision: master
-      path: modules/lib/esp_flasher
-```
-
-And add
-
-```
-CONFIG_ESP_SERIAL_FLASHER=y
-CONFIG_CONSOLE_GETCHAR=y
-CONFIG_SERIAL_FLASHER_MD5_ENABLED=y
-```
-
-to the project configuration `prj.conf`.
-
-For the C/C++ source code, the example code provided in `examples/zephyr_example` can be used as a starting point.
-
-## Licence
-
-Code is distributed under Apache 2.0 license.
-
-## Known limitations
-
-Size of new binary image has to be known before flashing.

BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/ESP32_AT_Firmware/Firmware.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32/bootloader.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32/hello-world.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32/partition-table.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_H2/bootloader.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_H2/hello_world.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_H2/partition-table.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_H4/bootloader.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_H4/hello_world.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_H4/partition-table.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_S2/bootloader.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_S2/hello-world.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP32_S2/partition-table.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP8266/bootloader.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP8266/hello-world.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/Hello-world/ESP8266/partition-table.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/ESP32/app.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/ESP32_C2/app.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/ESP32_C3/app.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/ESP32_H2/app.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/ESP32_H4/app.bin


BIN
esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/ESP32_S3/app.bin


+ 0 - 15
esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/source/CMakeLists.txt

@@ -1,15 +0,0 @@
-# The following lines of boilerplate have to be in your project's
-# CMakeLists in this exact order for cmake to work correctly
-cmake_minimum_required(VERSION 3.16)
-
-# Here we remove all unecessary components from the build to make the binary smaller
-set(COMPONENTS main)
-
-include($ENV{IDF_PATH}/tools/cmake/project.cmake)
-project(hello_world)
-
-# This generates a binary file from the elf, as the RAM build doesn't do that automatically
-add_custom_command(TARGET ${PROJECT_NAME}.elf
-    POST_BUILD
-    COMMAND esptool.py elf2image --output app.bin ${PROJECT_NAME}.elf
-)

+ 0 - 2
esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/source/main/CMakeLists.txt

@@ -1,2 +0,0 @@
-idf_component_register(SRCS "main.c"
-                    INCLUDE_DIRS "")

+ 0 - 16
esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/source/main/main.c

@@ -1,16 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2010-2023 Espressif Systems (Shanghai) CO LTD
- *
- * SPDX-License-Identifier: CC0-1.0
- */
-
-#include "freertos/FreeRTOS.h"
-#include "freertos/task.h"
-
-void app_main(void)
-{
-    while (true) {
-        esp_rom_printf("Hello world!\n");
-        vTaskDelay(1000 / portTICK_PERIOD_MS);
-    }
-}

+ 0 - 10
esp_flasher/lib/esp-serial-flasher/examples/binaries/RAM_APP/source/sdkconfig.defaults

@@ -1,10 +0,0 @@
-# This file was generated using idf.py save-defconfig. It can be edited manually.
-# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration
-#
-CONFIG_APP_BUILD_TYPE_ELF_RAM=y
-CONFIG_APP_NO_BLOBS=y
-CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE=y
-CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y
-# CONFIG_ESP_ERR_TO_NAME_LOOKUP is not set
-CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y
-CONFIG_LOG_DEFAULT_LEVEL_NONE=y

+ 0 - 20
esp_flasher/lib/esp-serial-flasher/examples/common/bin2array.cmake

@@ -1,20 +0,0 @@
-# Creates C resources file from files in given directory recursively
-function(create_resources dir output)
-    # Create empty output file
-    file(WRITE ${output} "#include <stdint.h>\n\n")
-    # Collect input files
-    file(GLOB bin_paths ${dir}/ESP*/*)
-    # Iterate through input files
-    foreach(bin ${bin_paths})
-        # Get short filenames, by discarding relative path
-        file(GLOB name RELATIVE ${dir} ${bin})
-        # Replace filename spaces & extension separator for C compatibility
-        string(REGEX REPLACE "[\\./-]" "_" filename ${name})
-        # Read hex data from file
-        file(READ ${bin} filedata HEX)
-        # Convert hex data for C compatibility
-        string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1," filedata ${filedata})
-        # Append data to output file
-        file(APPEND ${output} "const uint8_t  ${filename}[] = {${filedata}};\nconst uint32_t ${filename}_size = sizeof(${filename});\n")
-    endforeach()
-endfunction()

+ 0 - 322
esp_flasher/lib/esp-serial-flasher/examples/common/example_common.c

@@ -1,322 +0,0 @@
-/* Copyright 2020-2023 Espressif Systems (Shanghai) CO LTD
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <inttypes.h>
-#include <sys/param.h>
-#include "esp_loader_io.h"
-#include "esp_loader.h"
-#include "example_common.h"
-
-#ifndef SINGLE_TARGET_SUPPORT
-
-
-// For esp8266, esp32, esp32s2
-#define BOOTLOADER_ADDRESS_V0       0x1000
-// For esp32s3 and later chips
-#define BOOTLOADER_ADDRESS_V1       0x0
-#define PARTITION_ADDRESS           0x8000
-#define APPLICATION_ADDRESS         0x10000
-
-extern const uint8_t  ESP32_bootloader_bin[];
-extern const uint32_t ESP32_bootloader_bin_size;
-extern const uint8_t  ESP32_hello_world_bin[];
-extern const uint32_t ESP32_hello_world_bin_size;
-extern const uint8_t  ESP32_partition_table_bin[];
-extern const uint32_t ESP32_partition_table_bin_size;
-
-extern const uint8_t  ESP32_S2_bootloader_bin[];
-extern const uint32_t ESP32_S2_bootloader_bin_size;
-extern const uint8_t  ESP32_S2_hello_world_bin[];
-extern const uint32_t ESP32_S2_hello_world_bin_size;
-extern const uint8_t  ESP32_S2_partition_table_bin[];
-extern const uint32_t ESP32_S2_partition_table_bin_size;
-
-extern const uint8_t  ESP8266_bootloader_bin[];
-extern const uint32_t ESP8266_bootloader_bin_size;
-extern const uint8_t  ESP8266_hello_world_bin[];
-extern const uint32_t ESP8266_hello_world_bin_size;
-extern const uint8_t  ESP8266_partition_table_bin[];
-extern const uint32_t ESP8266_partition_table_bin_size;
-
-extern const uint8_t  ESP32_H4_bootloader_bin[];
-extern const uint32_t ESP32_H4_bootloader_bin_size;
-extern const uint8_t  ESP32_H4_hello_world_bin[];
-extern const uint32_t ESP32_H4_hello_world_bin_size;
-extern const uint8_t  ESP32_H4_partition_table_bin[];
-extern const uint32_t ESP32_H4_partition_table_bin_size;
-
-extern const uint8_t  ESP32_H2_bootloader_bin[];
-extern const uint32_t ESP32_H2_bootloader_bin_size;
-extern const uint8_t  ESP32_H2_hello_world_bin[];
-extern const uint32_t ESP32_H2_hello_world_bin_size;
-extern const uint8_t  ESP32_H2_partition_table_bin[];
-extern const uint32_t ESP32_H2_partition_table_bin_size;
-
-void get_example_binaries(target_chip_t target, example_binaries_t *bins)
-{
-    if (target == ESP8266_CHIP) {
-        bins->boot.data = ESP8266_bootloader_bin;
-        bins->boot.size = ESP8266_bootloader_bin_size;
-        bins->boot.addr = BOOTLOADER_ADDRESS_V0;
-        bins->part.data = ESP8266_partition_table_bin;
-        bins->part.size = ESP8266_partition_table_bin_size;
-        bins->part.addr = PARTITION_ADDRESS;
-        bins->app.data  = ESP8266_hello_world_bin;
-        bins->app.size  = ESP8266_hello_world_bin_size;
-        bins->app.addr  = APPLICATION_ADDRESS;
-    } else if (target == ESP32_CHIP) {
-        bins->boot.data = ESP32_bootloader_bin;
-        bins->boot.size = ESP32_bootloader_bin_size;
-        bins->boot.addr = BOOTLOADER_ADDRESS_V0;
-        bins->part.data = ESP32_partition_table_bin;
-        bins->part.size = ESP32_partition_table_bin_size;
-        bins->part.addr = PARTITION_ADDRESS;
-        bins->app.data  = ESP32_hello_world_bin;
-        bins->app.size  = ESP32_hello_world_bin_size;
-        bins->app.addr  = APPLICATION_ADDRESS;
-    } else if (target == ESP32S2_CHIP) {
-        bins->boot.data = ESP32_S2_bootloader_bin;
-        bins->boot.size = ESP32_S2_bootloader_bin_size;
-        bins->boot.addr = BOOTLOADER_ADDRESS_V0;
-        bins->part.data = ESP32_S2_partition_table_bin;
-        bins->part.size = ESP32_S2_partition_table_bin_size;
-        bins->part.addr = PARTITION_ADDRESS;
-        bins->app.data  = ESP32_S2_hello_world_bin;
-        bins->app.size  = ESP32_S2_hello_world_bin_size;
-        bins->app.addr  = APPLICATION_ADDRESS;
-    } else if (target == ESP32H4_CHIP){
-        bins->boot.data = ESP32_H4_bootloader_bin;
-        bins->boot.size = ESP32_H4_bootloader_bin_size;
-        bins->boot.addr = BOOTLOADER_ADDRESS_V1;
-        bins->part.data = ESP32_H4_partition_table_bin;
-        bins->part.size = ESP32_H4_partition_table_bin_size;
-        bins->part.addr = PARTITION_ADDRESS;
-        bins->app.data  = ESP32_H4_hello_world_bin;
-        bins->app.size  = ESP32_H4_hello_world_bin_size;
-        bins->app.addr  = APPLICATION_ADDRESS;
-    } else if (target == ESP32H2_CHIP){
-        bins->boot.data = ESP32_H2_bootloader_bin;
-        bins->boot.size = ESP32_H2_bootloader_bin_size;
-        bins->boot.addr = BOOTLOADER_ADDRESS_V1;
-        bins->part.data = ESP32_H2_partition_table_bin;
-        bins->part.size = ESP32_H2_partition_table_bin_size;
-        bins->part.addr = PARTITION_ADDRESS;
-        bins->app.data  = ESP32_H2_hello_world_bin;
-        bins->app.size  = ESP32_H2_hello_world_bin_size;
-        bins->app.addr  = APPLICATION_ADDRESS;
-    }else {
-        abort();
-    }
-}
-
-
-extern const uint8_t  ESP32_app_bin[];
-extern const uint32_t ESP32_app_bin_size;
-extern const uint8_t  ESP32_C2_app_bin[];
-extern const uint32_t ESP32_C2_app_bin_size;
-extern const uint8_t  ESP32_C3_app_bin[];
-extern const uint32_t ESP32_C3_app_bin_size;
-extern const uint8_t  ESP32_H2_app_bin[];
-extern const uint32_t ESP32_H2_app_bin_size;
-extern const uint8_t  ESP32_H4_app_bin[];
-extern const uint32_t ESP32_H4_app_bin_size;
-extern const uint8_t  ESP32_S3_app_bin[];
-extern const uint32_t ESP32_S3_app_bin_size;
-void get_example_ram_app_binary(target_chip_t target, example_ram_app_binary_t *bin)
-{
-    switch (target) {
-        case ESP32_CHIP: {
-            bin->ram_app.data = ESP32_app_bin;
-            bin->ram_app.size = ESP32_app_bin_size;
-            break;
-        }
-        case ESP32C2_CHIP: {
-            bin->ram_app.data = ESP32_C2_app_bin;
-            bin->ram_app.size = ESP32_C2_app_bin_size;
-            break;
-        }
-        case ESP32C3_CHIP: {
-            bin->ram_app.data = ESP32_C3_app_bin;
-            bin->ram_app.size = ESP32_C3_app_bin_size;
-            break;
-        }
-        case ESP32H2_CHIP: {
-            bin->ram_app.data = ESP32_H2_app_bin;
-            bin->ram_app.size = ESP32_H2_app_bin_size;
-            break;
-        }
-        case ESP32H4_CHIP: {
-            bin->ram_app.data = ESP32_H4_app_bin;
-            bin->ram_app.size = ESP32_H4_app_bin_size;
-            break;
-        }
-        case ESP32S3_CHIP: {
-            bin->ram_app.data = ESP32_S3_app_bin;
-            bin->ram_app.size = ESP32_S3_app_bin_size;
-            break;
-        }
-        default: {
-            abort();
-        }
-    }
-}
-
-#endif
-
-esp_loader_error_t connect_to_target(uint32_t higher_transmission_rate)
-{
-    esp_loader_connect_args_t connect_config = ESP_LOADER_CONNECT_DEFAULT();
-
-    esp_loader_error_t err = esp_loader_connect(&connect_config);
-    if (err != ESP_LOADER_SUCCESS) {
-        printf("Cannot connect to target. Error: %u\n", err);
-        return err;
-    }
-    printf("Connected to target\n");
-
-#ifdef SERIAL_FLASHER_INTERFACE_UART
-    if (higher_transmission_rate && esp_loader_get_target() != ESP8266_CHIP) {
-        err = esp_loader_change_transmission_rate(higher_transmission_rate);
-        if (err == ESP_LOADER_ERROR_UNSUPPORTED_FUNC) {
-            printf("ESP8266 does not support change transmission rate command.");
-            return err;
-        } else if (err != ESP_LOADER_SUCCESS) {
-            printf("Unable to change transmission rate on target.");
-            return err;
-        } else {
-            err = loader_port_change_transmission_rate(higher_transmission_rate);
-            if (err != ESP_LOADER_SUCCESS) {
-                printf("Unable to change transmission rate.");
-                return err;
-            }
-            printf("Transmission rate changed changed\n");
-        }
-    }
-#endif /* SERIAL_FLASHER_INTERFACE_UART */
-
-    return ESP_LOADER_SUCCESS;
-}
-
-#ifdef SERIAL_FLASHER_INTERFACE_UART
-esp_loader_error_t flash_binary(const uint8_t *bin, size_t size, size_t address)
-{
-    esp_loader_error_t err;
-    static uint8_t payload[1024];
-    const uint8_t *bin_addr = bin;
-
-    printf("Erasing flash (this may take a while)...\n");
-    err = esp_loader_flash_start(address, size, sizeof(payload));
-    if (err != ESP_LOADER_SUCCESS) {
-        printf("Erasing flash failed with error %d.\n", err);
-        return err;
-    }
-    printf("Start programming\n");
-
-    size_t binary_size = size;
-    size_t written = 0;
-
-    while (size > 0) {
-        size_t to_read = MIN(size, sizeof(payload));
-        memcpy(payload, bin_addr, to_read);
-
-        err = esp_loader_flash_write(payload, to_read);
-        if (err != ESP_LOADER_SUCCESS) {
-            printf("\nPacket could not be written! Error %d.\n", err);
-            return err;
-        }
-
-        size -= to_read;
-        bin_addr += to_read;
-        written += to_read;
-
-        int progress = (int)(((float)written / binary_size) * 100);
-        printf("\rProgress: %d %%", progress);
-        fflush(stdout);
-    };
-
-    printf("\nFinished programming\n");
-
-#if MD5_ENABLED
-    err = esp_loader_flash_verify();
-    if (err == ESP_LOADER_ERROR_UNSUPPORTED_FUNC) {
-        printf("ESP8266 does not support flash verify command.");
-        return err;
-    } else if (err != ESP_LOADER_SUCCESS) {
-        printf("MD5 does not match. err: %d\n", err);
-        return err;
-    }
-    printf("Flash verified\n");
-#endif
-
-    return ESP_LOADER_SUCCESS;
-}
-#endif /* SERIAL_FLASHER_INTERFACE_UART */
-
-esp_loader_error_t load_ram_binary(const uint8_t *bin)
-{
-    printf("Start loading\n");
-    esp_loader_error_t err;
-    const esp_loader_bin_header_t *header = (const esp_loader_bin_header_t *)bin;
-    esp_loader_bin_segment_t segments[header->segments];
-
-    // Parse segments
-    uint32_t seg;
-    uint32_t *cur_seg_pos;
-    for (seg=0, cur_seg_pos = (uint32_t *)(&bin[BIN_FIRST_SEGMENT_OFFSET]);
-         seg < header->segments;
-         seg++) {
-        segments[seg].addr = *cur_seg_pos++;
-        segments[seg].size = *cur_seg_pos++;
-        segments[seg].data = (uint8_t *)cur_seg_pos;
-        cur_seg_pos += (segments[seg].size) / 4;
-    }
-
-    // Download segments
-    for (seg=0; seg < header->segments; seg++) {
-        printf("Downloading %"PRIu32" bytes at 0x%08"PRIx32"...\n", segments[seg].size, segments[seg].addr);
-
-        err = esp_loader_mem_start(segments[seg].addr, segments[seg].size, ESP_RAM_BLOCK);
-        if (err != ESP_LOADER_SUCCESS) {
-            printf("Loading ram start with error %d.\n", err);
-            return err;
-        }
-
-        size_t remain_size = segments[seg].size;
-        uint8_t *data_pos = segments[seg].data;
-        while(remain_size > 0) {
-            size_t data_size = MIN(ESP_RAM_BLOCK, remain_size);
-            err = esp_loader_mem_write(data_pos, data_size);
-            if (err != ESP_LOADER_SUCCESS) {
-                printf("\nPacket could not be written! Error %d.\n", err);
-                return err;
-            }
-            data_pos += data_size;
-            remain_size -= data_size;
-        }
-    }
-
-    err = esp_loader_mem_finish(header->entrypoint);
-    if (err != ESP_LOADER_SUCCESS) {
-        printf("\nLoad ram finish with Error %d.\n", err);
-        return err;
-    }
-    printf("\nFinished loading\n");
-
-    return ESP_LOADER_SUCCESS;
-}
-

+ 0 - 63
esp_flasher/lib/esp-serial-flasher/examples/common/example_common.h

@@ -1,63 +0,0 @@
-/* Copyright 2020-2023 Espressif Systems (Shanghai) CO LTD
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#define BIN_FIRST_SEGMENT_OFFSET    0x18
-// Maximum block sized for RAM and Flash writes, respectively.
-#define ESP_RAM_BLOCK               0x1800
-
-typedef struct {
-    const uint8_t *data;
-    uint32_t size;
-    uint32_t addr;
-} partition_attr_t;
-
-typedef struct {
-    partition_attr_t boot;
-    partition_attr_t part;
-    partition_attr_t app;
-} example_binaries_t;
-
-typedef struct {
-    partition_attr_t ram_app;
-} example_ram_app_binary_t;
-
-/**
- * @brief esptool portable bin header format
- */
-typedef struct example_bin_header {
-    uint8_t magic;
-    uint8_t segments;
-    uint8_t flash_mode;
-    uint8_t flash_size_freq;
-    uint32_t entrypoint;
-} example_bin_header_t;
-
-/**
- * @brief esptool portable bin segment format
- */
-typedef struct example_bin_segment {
-    uint32_t addr;
-    uint32_t size;
-    uint8_t *data;
-} example_bin_segment_t;
-
-
-void get_example_binaries(target_chip_t target, example_binaries_t *binaries);
-void get_example_ram_app_binary(target_chip_t target, example_ram_app_binary_t *bin);
-esp_loader_error_t connect_to_target(uint32_t higher_transmission_rate);
-esp_loader_error_t flash_binary(const uint8_t *bin, size_t size, size_t address);
-esp_loader_error_t load_ram_binary(const uint8_t *bin);

+ 0 - 7
esp_flasher/lib/esp-serial-flasher/examples/esp32_example/CMakeLists.txt

@@ -1,7 +0,0 @@
-# The following lines of boilerplate have to be in your project's CMakeLists
-# in this exact order for cmake to work correctly
-cmake_minimum_required(VERSION 3.5)
-
-set(EXTRA_COMPONENT_DIRS ../../)
-include($ENV{IDF_PATH}/tools/cmake/project.cmake)
-project(esp-serial-flasher)

+ 0 - 78
esp_flasher/lib/esp-serial-flasher/examples/esp32_example/README.md

@@ -1,78 +0,0 @@
-# Flash multiple partitions example
-
-## Overview
-
-Example demonstrates how to flash ESP32/ESP32-S2/ESP8266 from another (host) MCU using esp_serial_flash component API. In this case, ESP32 is also used as host MCU. Binaries to be flashed from host MCU to another Espressif SoC can be found in `binaries` folder and are converted into C-array during build process.
-
-Following steps are performed in order to re-program target's memory:
-
-1. Filesystem is initialized and mounted.
-2. UART1 through which new binary will be transfered is initialized.
-3. Host puts slave device into boot mode tries to connect by calling `esp_loader_connect()`.
-4. Binary file is opened and its size is acquired, as it has to be known before flashing.
-5. Then `esp_loader_flash_start()` is called to enter flashing mode and erase amount of memory to be flashed.
-6. `esp_loader_flash_write()` function is called repeatedly until the whole binary image is transfered.
-
-Note: In addition, to steps mentioned above, `esp_loader_change_transmission_rate`  is called after connection is established in order to increase flashing speed. This does not apply for ESP8266, as its bootloader does not support this command. However, ESP8266 is capable of detecting baud rate during connection phase, and can be changed before calling `esp_loader_connect`, if necessary.
-
-## SPI pin initialization
-
-In majority of cases `ESP_LOADER_CONNECT_DEFAULT` helper macro is used in order to initialize `loader_connect_args_t` data structure passed to `esp_loader_connect`. Helper macro sets `spi_pin_config` field of the data structure to zero, thus, default SPI pins are used to connect to FLASH memory. In special cases, such as custom design in which FLASH is connected to different pins, `spi_pin_config` field has to be set accordingly. For more detailed information refer to [serial protocol](https://docs.espressif.com/projects/esptool/en/latest/esp32s3/advanced-topics/serial-protocol.html).
-
-## Hardware Required
-
-* Two development boards with ESP32 SoC (e.g., ESP32-DevKitC, ESP-WROVER-KIT, etc.).
-* One or two USB cables for power supply and programming.
-
-## Hardware connection
-
-Table below shows connection between two ESP32 devices.
-
-| ESP32 (host) | ESP32 (slave) |
-|:------------:|:-------------:|
-|    IO26      |      IO0      |
-|    IO25      |     RESET     |
-|    IO4       |      RX0      |
-|    IO5       |      TX0      |
-
-Note: interconnection is the same for all three targets (slaves). 
-
-## Build and flash
-
-To run the example, type the following command:
-
-```CMake
-idf.py -p PORT flash monitor
-```
-
-(To exit the serial monitor, type ``Ctrl-]``.)
-
-See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
-
-## Configuration
-
-For details about available configuration option, please refer to top level [README.md](../../README.md). 
-Compile definitions can be specified on command line when running `idf.py`, for example:
-
-```
-idf.py build -DMD5_ENABLED=1
-```
-Binaries to be flashed are placed in separate folder (binaries.c) for each possible target and converted to C-array. Without explicitly enabling MD5 check, flash integrity verification is disabled by default.
-
-## Example output
-
-Here is the example's console output:
-
-```
-...
-I (342) example: Initializing SPIFFS
-I (482) example: Image size: 144672
-I (902) example: Connected to target
-I (1732) example: Start programming
-I (1832) example: packet: 0  written: 1024 B
-I (1932) example: packet: 1  written: 1024 B
-...
-I (16052) example: packet: 140  written: 1024 B
-I (16152) example: packet: 141  written: 288 B
-I (16152) example: Finished programming
-```

+ 0 - 22
esp_flasher/lib/esp-serial-flasher/examples/esp32_example/main/CMakeLists.txt

@@ -1,22 +0,0 @@
-set(srcs main.c ../../common/example_common.c)
-set(include_dirs . ../../common)
-
-if ("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER "4.0")
-    idf_component_register(SRCS ${srcs}
-                           INCLUDE_DIRS ${include_dirs})
-    set(target ${COMPONENT_LIB})
-else()
-    # remove when dropping IDF 3.3 support
-    set(COMPONENT_SRCS ${srcs})
-    set(COMPONENT_ADD_INCLUDEDIRS ${include_dirs})
-    register_component()
-    set(target ${COMPONENT_TARGET})
-endif()
-
-# Embed binaries into the app.
-# In ESP-IDF this can also be done using EMBED_FILES option of idf_component_register.
-# Here an external tool is used to make file embedding similar with other ports.
-include(${CMAKE_CURRENT_LIST_DIR}/../../common/bin2array.cmake)
-create_resources(${CMAKE_CURRENT_LIST_DIR}/../../binaries/Hello-world ${CMAKE_BINARY_DIR}/binaries.c)
-set_property(SOURCE ${CMAKE_BINARY_DIR}/binaries.c PROPERTY GENERATED 1)
-target_sources(${target} PRIVATE ${CMAKE_BINARY_DIR}/binaries.c)

+ 0 - 54
esp_flasher/lib/esp-serial-flasher/examples/esp32_example/main/main.c

@@ -1,54 +0,0 @@
-/* Flash multiple partitions example
-
-   This example code is in the Public Domain (or CC0 licensed, at your option.)
-
-   Unless required by applicable law or agreed to in writing, this
-   software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-   CONDITIONS OF ANY KIND, either express or implied.
-*/
-
-#include <sys/param.h>
-#include <string.h>
-#include "esp_err.h"
-#include "esp_log.h"
-#include "driver/uart.h"
-#include "driver/gpio.h"
-#include "esp32_port.h"
-#include "esp_loader.h"
-#include "example_common.h"
-
-static const char *TAG = "serial_flasher";
-
-#define HIGHER_BAUDRATE 230400
-
-void app_main(void)
-{
-    example_binaries_t bin;
-
-    const loader_esp32_config_t config = {
-        .baud_rate = 115200,
-        .uart_port = UART_NUM_1,
-        .uart_rx_pin = GPIO_NUM_5,
-        .uart_tx_pin = GPIO_NUM_4,
-        .reset_trigger_pin = GPIO_NUM_25,
-        .gpio0_trigger_pin = GPIO_NUM_26,
-    };
-
-    if (loader_port_esp32_init(&config) != ESP_LOADER_SUCCESS) {
-        ESP_LOGE(TAG, "serial initialization failed.");
-        return;
-    }
-
-    if (connect_to_target(HIGHER_BAUDRATE) == ESP_LOADER_SUCCESS) {
-
-        get_example_binaries(esp_loader_get_target(), &bin);
-
-        ESP_LOGI(TAG, "Loading bootloader...");
-        flash_binary(bin.boot.data, bin.boot.size, bin.boot.addr);
-        ESP_LOGI(TAG, "Loading partition table...");
-        flash_binary(bin.part.data, bin.part.size, bin.part.addr);
-        ESP_LOGI(TAG, "Loading app...");
-        flash_binary(bin.app.data,  bin.app.size,  bin.app.addr);
-        ESP_LOGI(TAG, "Done!");
-    }
-}

+ 0 - 4
esp_flasher/lib/esp-serial-flasher/examples/esp32_example/partitions.csv

@@ -1,4 +0,0 @@
-# Name,   Type, SubType, Offset,  Size, Flags
-nvs,      data, nvs,     ,        0x6000,
-phy_init, data, phy,     ,        0x1000,
-factory,  app,  factory, ,        1500K,

+ 0 - 1
esp_flasher/lib/esp-serial-flasher/examples/esp32_example/sdkconfig.defaults

@@ -1 +0,0 @@
-CONFIG_PARTITION_TABLE_CUSTOM=y

+ 0 - 7
esp_flasher/lib/esp-serial-flasher/examples/esp32_load_ram_example/CMakeLists.txt

@@ -1,7 +0,0 @@
-# The following lines of boilerplate have to be in your project's CMakeLists
-# in this exact order for cmake to work correctly
-cmake_minimum_required(VERSION 3.5)
-
-set(EXTRA_COMPONENT_DIRS ../../)
-include($ENV{IDF_PATH}/tools/cmake/project.cmake)
-project(esp32-serial-ram-loader)

+ 0 - 14
esp_flasher/lib/esp-serial-flasher/examples/esp32_load_ram_example/main/CMakeLists.txt

@@ -1,14 +0,0 @@
-set(srcs main.c ../../common/example_common.c)
-set(include_dirs . ../../common)
-
-idf_component_register(SRCS ${srcs}
-                       INCLUDE_DIRS ${include_dirs})
-set(target ${COMPONENT_LIB})
-
-# Embed binaries into the app.
-# In ESP-IDF this can also be done using EMBED_FILES option of idf_component_register.
-# Here an external tool is used to make file embedding similar with other ports.
-include(${CMAKE_CURRENT_LIST_DIR}/../../common/bin2array.cmake)
-create_resources(${CMAKE_CURRENT_LIST_DIR}/../../binaries/RAM_APP ${CMAKE_BINARY_DIR}/binaries.c)
-set_property(SOURCE ${CMAKE_BINARY_DIR}/binaries.c PROPERTY GENERATED 1)
-target_sources(${target} PRIVATE ${CMAKE_BINARY_DIR}/binaries.c)

+ 0 - 80
esp_flasher/lib/esp-serial-flasher/examples/esp32_load_ram_example/main/main.c

@@ -1,80 +0,0 @@
-/* Example of loading the program into RAM
-
-   This example code is in the Public Domain (or CC0 licensed, at your option.)
-
-   Unless required by applicable law or agreed to in writing, this
-   software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-   CONDITIONS OF ANY KIND, either express or implied.
-*/
-
-#include <sys/param.h>
-#include <string.h>
-#include "esp_err.h"
-#include "esp_log.h"
-#include "esp_task_wdt.h"
-#include "driver/uart.h"
-#include "driver/gpio.h"
-#include "esp32_port.h"
-#include "esp_loader.h"
-#include "example_common.h"
-#include "freertos/FreeRTOS.h"
-
-static const char *TAG = "serial_ram_loader";
-
-// This can be set to a higher baud rate, but because it takes some time to
-// switch the uart baud rate in slave_monitor task, the log at slave starup
-// time will be lost or garbled.
-#define HIGHER_BAUDRATE 115200
-
-// Max line size
-#define BUF_LEN 128
-static uint8_t buf[BUF_LEN] = {0};
-
-void slave_monitor(void *arg)
-{
-#if (HIGHER_BAUDRATE != 115200)
-    uart_flush_input(UART_NUM_1);
-    uart_flush(UART_NUM_1);
-    uart_set_baudrate(UART_NUM_1, 115200);
-#endif
-    while (1) {
-        int rxBytes = uart_read_bytes(UART_NUM_1, buf, BUF_LEN, 100 / portTICK_PERIOD_MS);
-        buf[rxBytes] = '\0';
-        printf("%s", buf);
-    }
-}
-
-void app_main(void)
-{
-    example_ram_app_binary_t bin;
-
-    const loader_esp32_config_t config = {
-        .baud_rate = 115200,
-        .uart_port = UART_NUM_1,
-        .uart_rx_pin = GPIO_NUM_5,
-        .uart_tx_pin = GPIO_NUM_4,
-        .reset_trigger_pin = GPIO_NUM_25,
-        .gpio0_trigger_pin = GPIO_NUM_26,
-    };
-
-    if (loader_port_esp32_init(&config) != ESP_LOADER_SUCCESS) {
-        ESP_LOGE(TAG, "serial initialization failed.");
-        abort();
-    }
-
-    if (connect_to_target(HIGHER_BAUDRATE) == ESP_LOADER_SUCCESS) {
-        get_example_ram_app_binary(esp_loader_get_target(), &bin);
-        ESP_LOGI(TAG, "Loading app to RAM ...");
-        esp_loader_error_t err = load_ram_binary(bin.ram_app.data);
-        if (err == ESP_LOADER_SUCCESS) {
-            // Forward slave's serial output
-            ESP_LOGI(TAG, "********************************************");
-            ESP_LOGI(TAG, "*** Logs below are print from slave .... ***");
-            ESP_LOGI(TAG, "********************************************");
-            xTaskCreate(slave_monitor, "slave_monitor", 2048, NULL, configMAX_PRIORITIES, NULL);
-        } else {
-            ESP_LOGE(TAG, "Loading to ram failed ...");
-        }
-    }
-    vTaskDelete(NULL);
-}

+ 0 - 7
esp_flasher/lib/esp-serial-flasher/examples/esp32_spi_load_ram_example/CMakeLists.txt

@@ -1,7 +0,0 @@
-# The following lines of boilerplate have to be in your project's CMakeLists
-# in this exact order for cmake to work correctly
-cmake_minimum_required(VERSION 3.16)
-
-set(EXTRA_COMPONENT_DIRS ../../)
-include($ENV{IDF_PATH}/tools/cmake/project.cmake)
-project(esp32-spi-ram-loader)

+ 0 - 80
esp_flasher/lib/esp-serial-flasher/examples/esp32_spi_load_ram_example/README.md

@@ -1,80 +0,0 @@
-# Example of loading the program into RAM through SPI
-
-## Overview
-
-This example demonstrates how to upload an app to RAM of an Espressif MCU with SPI download support from another (host) MCU using the `esp_serial_flash` component API. In this case, another Espressif MCU is used as the host. Binaries to be uploaded to RAM from host MCU to the target MCU can be found in `binaries/RAM_APP` folder and are converted into C-array during build process.
-
-Following steps are performed in order to re-program the target's memory:
-
-1. SPI2 through which the binary will be transfered is initialized.
-2. Host puts slave device into SPI download mode tries to connect by calling `esp_loader_connect()`.
-3. Then `esp_loader_mem_start()` is called for each segment in RAM.
-4. `esp_loader_flash_write()` function is called repeatedly for every segment until the whole binary image is transfered.
-5. `esp_loader_mem_finish()` is called with the binary entrypoint, telling the chip to start the uploaded program.
-6. UART2 is initialized for the connection to the target
-7. Target output is continually read and printed
-
-## Hardware Required
-
-* Two development boards, one with any Espressif MCU (e.g., ESP32-DevKitC, ESP-WROVER-KIT, etc.) and one with an Espressif MCU with SPI download support. Here is a short list of supported MCUs:
-1. ESP32-C3
-2. ESP32-C2
-3. ESP32-S3
-4. ESP32-S2
-5. ESP32-H2
-* One or two USB cables for power supply and programming.
-
-## Hardware connection
-
-Table below shows connection between two Espressif MCUs.
-
-| Host         | Slave         |
-|    IO_5      |    RESET      |
-|    IO_12     |    CLK        |
-|    IO_10     |    CS         |
-|    IO_13     |    MISO       |
-|    IO_11     |    MOSI       |
-|    IO_14     |    QUADWP     |
-|    IO_9      |    QUADHD     |
-|    IO_13     |    STRAP_B0   |
-|    IO_2      |    STRAP_B1   |
-|    IO_3      |    STRAP_B2   |
-|    IO_4      |    STRAP_B3   |
-|    IO_6      |    UART0_RX   |
-|    IO_7      |    UART0_TX   |
-
-> Note 1: Strapping bit pins are documented in the TRM for each respective chip
-
-> Note 2: For achieving highest speeds, check which pins go through the IO MUX bypassing the GPIO matrix and use those. Pins chosen here are IO MUX pins for ESP32S3 and ESP32S2 chips.
-
-## Build and flash
-
-To run the example, type the following command:
-
-```CMake
-idf.py -p PORT flash monitor
-```
-
-(To exit the serial monitor, type ``Ctrl-]``.)
-
-See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
-
-## Example output
-
-Here is the example's console output:
-
-```
-Connected to target
-I (682) spi_ram_loader: Loading app to RAM ...
-Start loading
-Downloading 7840 bytes at 0x3fc96e00...
-Downloading 312 bytes at 0x3fca0020...
-Downloading 93164 bytes at 0x40380000...
-Finished loading
-I (802) spi_ram_loader: ********************************************
-I (802) spi_ram_loader: *** Logs below are print from slave .... ***
-I (812) spi_ram_loader: ********************************************
-Hello world!
-Hello world!
-...
-```

+ 0 - 14
esp_flasher/lib/esp-serial-flasher/examples/esp32_spi_load_ram_example/main/CMakeLists.txt

@@ -1,14 +0,0 @@
-set(srcs main.c ../../common/example_common.c)
-set(include_dirs . ../../common)
-
-idf_component_register(SRCS ${srcs}
-                       INCLUDE_DIRS ${include_dirs})
-set(target ${COMPONENT_LIB})
-
-# Embed binaries into the app.
-# In ESP-IDF this can also be done using EMBED_FILES option of idf_component_register.
-# Here an external tool is used to make file embedding similar with other ports.
-include(${CMAKE_CURRENT_LIST_DIR}/../../common/bin2array.cmake)
-create_resources(${CMAKE_CURRENT_LIST_DIR}/../../binaries/RAM_APP ${CMAKE_BINARY_DIR}/binaries.c)
-set_property(SOURCE ${CMAKE_BINARY_DIR}/binaries.c PROPERTY GENERATED 1)
-target_sources(${target} PRIVATE ${CMAKE_BINARY_DIR}/binaries.c)

+ 0 - 97
esp_flasher/lib/esp-serial-flasher/examples/esp32_spi_load_ram_example/main/main.c

@@ -1,97 +0,0 @@
-/* Example of loading the program into RAM through SPI
-
-   This example code is in the Public Domain (or CC0 licensed, at your option.)
-
-   Unless required by applicable law or agreed to in writing, this
-   software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-   CONDITIONS OF ANY KIND, either express or implied.
-*/
-
-#include <sys/param.h>
-#include <string.h>
-#include "esp_err.h"
-#include "esp_log.h"
-#include "esp_task_wdt.h"
-#include "driver/spi_master.h"
-#include "driver/uart.h"
-#include "driver/gpio.h"
-#include "esp32_spi_port.h"
-#include "esp_loader.h"
-#include "example_common.h"
-#include "freertos/FreeRTOS.h"
-
-static const char *TAG = "spi_ram_loader";
-
-// Max line size
-#define BUF_LEN 128
-static uint8_t buf[BUF_LEN] = {0};
-
-void slave_monitor(void *arg)
-{
-    // Initialize UART
-    uart_config_t uart_config = {
-        .baud_rate = 115200,
-        .data_bits = UART_DATA_8_BITS,
-        .parity    = UART_PARITY_DISABLE,
-        .stop_bits = UART_STOP_BITS_1,
-        .flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
-#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
-        .source_clk = UART_SCLK_DEFAULT,
-#endif
-    };
-
-    ESP_ERROR_CHECK(uart_param_config(UART_NUM_2, &uart_config));
-
-    ESP_ERROR_CHECK(uart_set_pin(UART_NUM_2, GPIO_NUM_6, GPIO_NUM_7,
-                                 UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE));
-
-    ESP_ERROR_CHECK(uart_driver_install(UART_NUM_2, BUF_LEN * 4, BUF_LEN * 4, 0, NULL, 0));
-
-    while (1) {
-        int rxBytes = uart_read_bytes(UART_NUM_2, buf, BUF_LEN, 100 / portTICK_PERIOD_MS);
-        buf[rxBytes] = '\0';
-        printf("%s", buf);
-    }
-}
-
-void app_main(void)
-{
-    example_ram_app_binary_t bin;
-
-    const loader_esp32_spi_config_t config = {
-        .spi_bus = SPI2_HOST,
-        .frequency = 20 * 1000000,
-        .reset_trigger_pin = GPIO_NUM_5,
-        .spi_clk_pin = GPIO_NUM_12,
-        .spi_cs_pin = GPIO_NUM_10,
-        .spi_miso_pin = GPIO_NUM_13,
-        .spi_mosi_pin = GPIO_NUM_11,
-        .spi_quadwp_pin = GPIO_NUM_14,
-        .spi_quadhd_pin = GPIO_NUM_9,
-        .strap_bit0_pin = GPIO_NUM_13,
-        .strap_bit1_pin = GPIO_NUM_2,
-        .strap_bit2_pin = GPIO_NUM_3,
-        .strap_bit3_pin = GPIO_NUM_4,
-    };
-
-    if (loader_port_esp32_spi_init(&config) != ESP_LOADER_SUCCESS) {
-        ESP_LOGE(TAG, "SPI initialization failed.");
-        abort();
-    }
-
-    if (connect_to_target(0) == ESP_LOADER_SUCCESS) {
-        get_example_ram_app_binary(esp_loader_get_target(), &bin);
-        ESP_LOGI(TAG, "Loading app to RAM ...");
-        esp_loader_error_t err = load_ram_binary(bin.ram_app.data);
-        if (err == ESP_LOADER_SUCCESS) {
-            // Forward slave's serial output
-            ESP_LOGI(TAG, "********************************************");
-            ESP_LOGI(TAG, "*** Logs below are print from slave .... ***");
-            ESP_LOGI(TAG, "********************************************");
-            xTaskCreate(slave_monitor, "slave_monitor", 2048, NULL, configMAX_PRIORITIES, NULL);
-        } else {
-            ESP_LOGE(TAG, "Loading to RAM failed ...");
-        }
-    }
-    vTaskDelete(NULL);
-}

+ 0 - 4
esp_flasher/lib/esp-serial-flasher/examples/esp32_spi_load_ram_example/sdkconfig.defaults

@@ -1,4 +0,0 @@
-# This file was generated using idf.py save-defconfig. It can be edited manually.
-# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration
-#
-CONFIG_SERIAL_FLASHER_INTERFACE_SPI=y

+ 0 - 17
esp_flasher/lib/esp-serial-flasher/examples/raspberry_example/CMakeLists.txt

@@ -1,17 +0,0 @@
-cmake_minimum_required(VERSION 3.5)
-
-set(FLASHER_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)
-set(PORT RASPBERRY_PI)
-
-project(raspberry_flasher)
-    
-add_executable(${CMAKE_PROJECT_NAME} Src/main.c ../common/example_common.c)
-
-target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ../common/)
-
-add_subdirectory(${FLASHER_DIR} ${CMAKE_BINARY_DIR}/flasher)
-
-target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE flasher)
-
-# This example only supports one target (ESP32) and uses specific binary to be flashed.
-target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE -DSINGLE_TARGET_SUPPORT=1)

+ 0 - 76
esp_flasher/lib/esp-serial-flasher/examples/raspberry_example/README.md

@@ -1,76 +0,0 @@
-# Raspberry Pi example
-
-## Overview
-
-Example demonstrates how to flash ESP32 from Raspberry Pi 4 (Model B) using esp_serial_flash component API. AT command firmware to be flashed from Raspberry Pi to ESP32 can be found in `binaries`. USART0 is dedicated for communication with ESP32.
-
-Following steps are performed in order to re-program target's memory:
-
-1. Peripherals are initialized.
-2. Host puts slave device into boot mode tries to connect by calling `esp_loader_connect()`.
-3. Then `esp_loader_flash_start()` is called to enter flashing mode and erase amount of memory to be flashed.
-4. `esp_loader_flash_write()` function is called repeatedly until the whole binary image is transfered.
-5. At the end, `loader_port_reset_target()` is called to restart ESP32 and execute updated firmware.
-
-Note: In addition, to steps mentioned above, `esp_loader_change_transmission_rate`  is called after connection is established in order to increase flashing speed. Bootloader is also capable of detecting baud rate during connection phase, and can be changed before calling `esp_loader_connect`. However, it is recommended to start at lower speed and then use dedicated command to increase baud rate. This does not apply for ESP8266, as its bootloader does not support this command, therefore, baud rate can only be changed before connection phase in this case.
-
-## Hardware Required
-
-* Raspberry Pi 4 Model B. 
-* A development board with ESP32 SoC (e.g. ESP-WROVER-KIT, ESP32-DevKitC, etc.).
-* USB cable in case ESP32 board is powered from USB. ESP32 can be powered by Raspberry Pi as well.
-
-## Hardware connection
-
-Table below shows connection between Raspberry Pi and ESP32.
-
-| Raspberry Pi (host) |    ESP32 (slave)    |
-|:-------------------:|:-------------------:|
-|        GPIO3        |         IO0         |
-|        GPIO2        |         RST         |
-|        GPIO14       |         RX0         |
-|        GPIO15       |         TX0         |
-|         GND         |         GND         |
-
-Optionally, UART-to-USB bridge can be connected to PD5(RX) and PD6(TX) for debug purposes.
-
-## Installation
-
-### GPIO library
-Raspberry Pi makes use of [pigpio](http://abyz.me.uk/rpi/pigpio/) library in order to simplify controlling GPIO pins. Some distributions of 'Raspberry Pi OS' may come with `pigpio` already installed. Presence of the library in the system can checked by running command:
-```
-pigpiod -v
-```
-
-If not present, run following commands to install the library. 
-```
-sudo apt-get update
-sudo apt-get install pigpio
-```
-
-### Enable UART
-On Raspberry Pi 4, primary UART (UART0) is connected to the On-board Bluetooth module by default.
-In order to enable serial communication on this UART, run following command in terminal:
-```
-sudo raspi-config
-```
-
-* Navigate to **Interfacing Options -> Serial**.
-* Then it will ask for login shell to be accessible over Serial, select **No**.
-* After that, it will ask for enabling Hardware Serial port, select **Yes**.
-* Reboot the Raspberry Pi.
-
-## Build and run
-
-To compile the example:
-
-Create and navigate to `build` directory:
-```
-mkdir build && cd build
-```
-Run cmake, build example and run example: 
-```
-cmake .. && cmake --build . && ./raspberry_flasher
-```
-
-For more details regarding to esp_serial_flasher configuration, please refer to top level [README.md](../../README.md).

+ 0 - 81
esp_flasher/lib/esp-serial-flasher/examples/raspberry_example/Src/main.c

@@ -1,81 +0,0 @@
-/* Flash multiple partitions example
-
-   This example code is in the Public Domain (or CC0 licensed, at your option.)
-
-   Unless required by applicable law or agreed to in writing, this
-   software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-   CONDITIONS OF ANY KIND, either express or implied.
-*/
-
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/param.h>
-#include "esp_loader.h"
-#include "example_common.h"
-#include "raspberry_port.h"
-
-#define TARGET_RST_Pin 2
-#define TARGET_IO0_Pin 3
-
-#define DEFAULT_BAUD_RATE 115200
-#define HIGHER_BAUD_RATE  460800
-#define SERIAL_DEVICE     "/dev/ttyS0"
-
-#define BINARY_PATH       "../../binaries/ESP32_AT_Firmware/Firmware.bin"
-
-
-static void upload_file(const char *path, size_t address)
-{
-    char *buffer = NULL;
-
-    FILE *image = fopen(path, "r");
-    if (image == NULL) {
-        printf("Error:Failed to open file %s\n", path);
-        return;
-    }
-
-    fseek(image, 0L, SEEK_END);
-    size_t size = ftell(image);
-    rewind(image);
-
-    printf("File %s opened. Size: %u bytes\n", path, size);
-
-    buffer = (char *)malloc(size);
-    if (buffer == NULL) {
-        printf("Error: Failed allocate memory\n");
-        goto cleanup;
-    }
-
-    // copy file content to buffer
-    size_t bytes_read = fread(buffer, 1, size, image);
-    if (bytes_read != size) {
-        printf("Error occurred while reading file");
-        goto cleanup;
-    }
-
-    flash_binary(buffer, size, address);
-
-cleanup:
-    fclose(image);
-    free(buffer);
-}
-
-int main(void)
-{
-    const loader_raspberry_config_t config = {
-        .device = SERIAL_DEVICE,
-        .baudrate = DEFAULT_BAUD_RATE,
-        .reset_trigger_pin = TARGET_RST_Pin,
-        .gpio0_trigger_pin = TARGET_IO0_Pin,
-    };
-
-    loader_port_raspberry_init(&config);
-
-    if (connect_to_target(HIGHER_BAUD_RATE) == ESP_LOADER_SUCCESS) {
-        upload_file(BINARY_PATH, 0);
-    }
-
-    loader_port_reset_target();
-}

+ 0 - 39
esp_flasher/lib/esp-serial-flasher/examples/stm32_example/CMakeLists.txt

@@ -1,39 +0,0 @@
-cmake_minimum_required(VERSION 3.5)
-
-include(${CMAKE_CURRENT_LIST_DIR}/../common/bin2array.cmake)
-
-set(TOOLCHAIN_PREFIX / CACHE PATH "Path to arm toolchain")
-set(STM32Cube_DIR / CACHE PATH "Path to STM32 hal library")
-
-set(FLASHER_DIR          ${CMAKE_CURRENT_LIST_DIR}/../..)
-set(CMAKE_TOOLCHAIN_FILE ${FLASHER_DIR}/submodules/stm32-cmake/cmake/gcc_stm32.cmake)
-set(STM32_CHIP           STM32F407VG)
-set(PORT                 STM32)
-
-project(stm32_flasher)
-    
-enable_language(ASM)
-
-create_resources(${CMAKE_CURRENT_LIST_DIR}/../binaries/Hello-world Src/binaries.c)
-
-include_directories(${CMAKE_CURRENT_SOURCE_DIR} Inc)
- 
-add_executable(${CMAKE_PROJECT_NAME} 
-    ../common/example_common.c
-    Src/main.c
-    Src/stm32f4xx_hal_msp.c
-    Src/stm32f4xx_it.c
-    Src/libc_compat.c
-    Src/binaries.c)
-
-target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ../common)
-
-add_subdirectory(${FLASHER_DIR}/submodules ${CMAKE_BINARY_DIR}/submodules)
-add_subdirectory(${FLASHER_DIR} ${CMAKE_BINARY_DIR}/flasher)
-
-target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE stm_cube flasher)
- 
-STM32_ADD_HEX_BIN_TARGETS(${CMAKE_PROJECT_NAME})
-
-add_custom_target(BuildBinary ALL)
-add_dependencies(BuildBinary ${CMAKE_PROJECT_NAME}.bin)

+ 0 - 50
esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Inc/main.h

@@ -1,50 +0,0 @@
-/**
-  ******************************************************************************
-  * @file           : main.h
-  * @brief          : Header for main.c file.
-  *                   This file contains the common defines of the application.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
-  * All rights reserved.</center></h2>
-  *
-  * This software component is licensed by ST under BSD 3-Clause license,
-  * the "License"; You may not use this file except in compliance with the
-  * License. You may obtain a copy of the License at:
-  *                        opensource.org/licenses/BSD-3-Clause
-  *
-  ******************************************************************************
-  */
-
-#ifndef __MAIN_H
-#define __MAIN_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "stm32f4xx_hal.h"
-
-void Error_Handler(void);
-
-#define GREEN_LED_Pin GPIO_PIN_12
-#define GREEN_LED_GPIO_Port GPIOD
-#define ORANGE_LED_Pin GPIO_PIN_13
-#define ORANGE_LED_GPIO_Port GPIOD
-#define RED_LED_Pin GPIO_PIN_14
-#define RED_LED_GPIO_Port GPIOD
-#define BLUE_LED_Pin GPIO_PIN_15
-#define BLUE_LED_GPIO_Port GPIOD
-#define TARGET_RST_Pin GPIO_PIN_4
-#define TARGET_RST_GPIO_Port GPIOB
-#define TARGET_IO0_Pin GPIO_PIN_5
-#define TARGET_IO0_GPIO_Port GPIOB
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MAIN_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 443
esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Inc/stm32f4xx_hal_conf.h

@@ -1,443 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32f4xx_hal_conf_template.h
-  * @author  MCD Application Team
-  * @brief   HAL configuration template file. 
-  *          This file should be copied to the application folder and renamed
-  *          to stm32f4xx_hal_conf.h.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
-  * All rights reserved.</center></h2>
-  *
-  * This software component is licensed by ST under BSD 3-Clause license,
-  * the "License"; You may not use this file except in compliance with the
-  * License. You may obtain a copy of the License at:
-  *                        opensource.org/licenses/BSD-3-Clause
-  *
-  ******************************************************************************
-  */ 
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __STM32F4xx_HAL_CONF_H
-#define __STM32F4xx_HAL_CONF_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Exported types ------------------------------------------------------------*/
-/* Exported constants --------------------------------------------------------*/
-
-/* ########################## Module Selection ############################## */
-/**
-  * @brief This is the list of modules to be used in the HAL driver 
-  */
-#define HAL_MODULE_ENABLED  
-
-  /* #define HAL_ADC_MODULE_ENABLED   */
-/* #define HAL_CRYP_MODULE_ENABLED   */
-/* #define HAL_CAN_MODULE_ENABLED   */
-/* #define HAL_CRC_MODULE_ENABLED   */
-/* #define HAL_CRYP_MODULE_ENABLED   */
-/* #define HAL_DAC_MODULE_ENABLED   */
-/* #define HAL_DCMI_MODULE_ENABLED   */
-/* #define HAL_DMA2D_MODULE_ENABLED   */
-/* #define HAL_ETH_MODULE_ENABLED   */
-/* #define HAL_NAND_MODULE_ENABLED   */
-/* #define HAL_NOR_MODULE_ENABLED   */
-/* #define HAL_PCCARD_MODULE_ENABLED   */
-/* #define HAL_SRAM_MODULE_ENABLED   */
-/* #define HAL_SDRAM_MODULE_ENABLED   */
-/* #define HAL_HASH_MODULE_ENABLED   */
-/* #define HAL_I2C_MODULE_ENABLED   */
-/* #define HAL_I2S_MODULE_ENABLED   */
-/* #define HAL_IWDG_MODULE_ENABLED   */
-/* #define HAL_LTDC_MODULE_ENABLED   */
-/* #define HAL_RNG_MODULE_ENABLED   */
-/* #define HAL_RTC_MODULE_ENABLED   */
-/* #define HAL_SAI_MODULE_ENABLED   */
-/* #define HAL_SD_MODULE_ENABLED   */
-/* #define HAL_MMC_MODULE_ENABLED   */
-/* #define HAL_SPI_MODULE_ENABLED   */
-/* #define HAL_TIM_MODULE_ENABLED   */
-#define HAL_UART_MODULE_ENABLED
-/* #define HAL_USART_MODULE_ENABLED   */
-/* #define HAL_IRDA_MODULE_ENABLED   */
-/* #define HAL_SMARTCARD_MODULE_ENABLED   */
-/* #define HAL_SMBUS_MODULE_ENABLED   */
-/* #define HAL_WWDG_MODULE_ENABLED   */
-/* #define HAL_PCD_MODULE_ENABLED   */
-/* #define HAL_HCD_MODULE_ENABLED   */
-/* #define HAL_DSI_MODULE_ENABLED   */
-/* #define HAL_QSPI_MODULE_ENABLED   */
-/* #define HAL_QSPI_MODULE_ENABLED   */
-/* #define HAL_CEC_MODULE_ENABLED   */
-/* #define HAL_FMPI2C_MODULE_ENABLED   */
-/* #define HAL_SPDIFRX_MODULE_ENABLED   */
-/* #define HAL_DFSDM_MODULE_ENABLED   */
-/* #define HAL_LPTIM_MODULE_ENABLED   */
-#define HAL_GPIO_MODULE_ENABLED
-#define HAL_EXTI_MODULE_ENABLED
-#define HAL_DMA_MODULE_ENABLED
-#define HAL_RCC_MODULE_ENABLED
-#define HAL_FLASH_MODULE_ENABLED
-#define HAL_PWR_MODULE_ENABLED
-#define HAL_CORTEX_MODULE_ENABLED
-
-/* ########################## HSE/HSI Values adaptation ##################### */
-/**
-  * @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
-  *        This value is used by the RCC HAL module to compute the system frequency
-  *        (when HSE is used as system clock source, directly or through the PLL).  
-  */
-#if !defined  (HSE_VALUE) 
-  #define HSE_VALUE    ((uint32_t)25000000U) /*!< Value of the External oscillator in Hz */
-#endif /* HSE_VALUE */
-
-#if !defined  (HSE_STARTUP_TIMEOUT)
-  #define HSE_STARTUP_TIMEOUT    ((uint32_t)100U)   /*!< Time out for HSE start up, in ms */
-#endif /* HSE_STARTUP_TIMEOUT */
-
-/**
-  * @brief Internal High Speed oscillator (HSI) value.
-  *        This value is used by the RCC HAL module to compute the system frequency
-  *        (when HSI is used as system clock source, directly or through the PLL). 
-  */
-#if !defined  (HSI_VALUE)
-  #define HSI_VALUE    ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/
-#endif /* HSI_VALUE */
-
-/**
-  * @brief Internal Low Speed oscillator (LSI) value.
-  */
-#if !defined  (LSI_VALUE) 
- #define LSI_VALUE  ((uint32_t)32000U)       /*!< LSI Typical Value in Hz*/
-#endif /* LSI_VALUE */                      /*!< Value of the Internal Low Speed oscillator in Hz
-                                             The real value may vary depending on the variations
-                                             in voltage and temperature.*/
-/**
-  * @brief External Low Speed oscillator (LSE) value.
-  */
-#if !defined  (LSE_VALUE)
- #define LSE_VALUE  ((uint32_t)32768U)    /*!< Value of the External Low Speed oscillator in Hz */
-#endif /* LSE_VALUE */
-
-#if !defined  (LSE_STARTUP_TIMEOUT)
-  #define LSE_STARTUP_TIMEOUT    ((uint32_t)5000U)   /*!< Time out for LSE start up, in ms */
-#endif /* LSE_STARTUP_TIMEOUT */
-
-/**
-  * @brief External clock source for I2S peripheral
-  *        This value is used by the I2S HAL module to compute the I2S clock source 
-  *        frequency, this source is inserted directly through I2S_CKIN pad. 
-  */
-#if !defined  (EXTERNAL_CLOCK_VALUE)
-  #define EXTERNAL_CLOCK_VALUE    ((uint32_t)12288000U) /*!< Value of the External audio frequency in Hz*/
-#endif /* EXTERNAL_CLOCK_VALUE */
-
-/* Tip: To avoid modifying this file each time you need to use different HSE,
-   ===  you can define the HSE value in your toolchain compiler preprocessor. */
-
-/* ########################### System Configuration ######################### */
-/**
-  * @brief This is the HAL system configuration section
-  */
-#define  VDD_VALUE		      ((uint32_t)3300U) /*!< Value of VDD in mv */           
-#define  TICK_INT_PRIORITY            ((uint32_t)0U)   /*!< tick interrupt priority */            
-#define  USE_RTOS                     0U     
-#define  PREFETCH_ENABLE              1U
-#define  INSTRUCTION_CACHE_ENABLE     1U
-#define  DATA_CACHE_ENABLE            1U
-
-/* ########################## Assert Selection ############################## */
-/**
-  * @brief Uncomment the line below to expanse the "assert_param" macro in the 
-  *        HAL drivers code
-  */
-/* #define USE_FULL_ASSERT    1U */
-
-/* ################## Ethernet peripheral configuration ##################### */
-
-/* Section 1 : Ethernet peripheral configuration */
-
-/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
-#define MAC_ADDR0   2U
-#define MAC_ADDR1   0U
-#define MAC_ADDR2   0U
-#define MAC_ADDR3   0U
-#define MAC_ADDR4   0U
-#define MAC_ADDR5   0U
-
-/* Definition of the Ethernet driver buffers size and count */   
-#define ETH_RX_BUF_SIZE                ETH_MAX_PACKET_SIZE /* buffer size for receive               */
-#define ETH_TX_BUF_SIZE                ETH_MAX_PACKET_SIZE /* buffer size for transmit              */
-#define ETH_RXBUFNB                    ((uint32_t)4U)       /* 4 Rx buffers of size ETH_RX_BUF_SIZE  */
-#define ETH_TXBUFNB                    ((uint32_t)4U)       /* 4 Tx buffers of size ETH_TX_BUF_SIZE  */
-
-/* Section 2: PHY configuration section */
-
-/* DP83848_PHY_ADDRESS Address*/ 
-#define DP83848_PHY_ADDRESS           0x01U
-/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ 
-#define PHY_RESET_DELAY                 ((uint32_t)0x000000FFU)
-/* PHY Configuration delay */
-#define PHY_CONFIG_DELAY                ((uint32_t)0x00000FFFU)
-
-#define PHY_READ_TO                     ((uint32_t)0x0000FFFFU)
-#define PHY_WRITE_TO                    ((uint32_t)0x0000FFFFU)
-
-/* Section 3: Common PHY Registers */
-
-#define PHY_BCR                         ((uint16_t)0x0000U)    /*!< Transceiver Basic Control Register   */
-#define PHY_BSR                         ((uint16_t)0x0001U)    /*!< Transceiver Basic Status Register    */
- 
-#define PHY_RESET                       ((uint16_t)0x8000U)  /*!< PHY Reset */
-#define PHY_LOOPBACK                    ((uint16_t)0x4000U)  /*!< Select loop-back mode */
-#define PHY_FULLDUPLEX_100M             ((uint16_t)0x2100U)  /*!< Set the full-duplex mode at 100 Mb/s */
-#define PHY_HALFDUPLEX_100M             ((uint16_t)0x2000U)  /*!< Set the half-duplex mode at 100 Mb/s */
-#define PHY_FULLDUPLEX_10M              ((uint16_t)0x0100U)  /*!< Set the full-duplex mode at 10 Mb/s  */
-#define PHY_HALFDUPLEX_10M              ((uint16_t)0x0000U)  /*!< Set the half-duplex mode at 10 Mb/s  */
-#define PHY_AUTONEGOTIATION             ((uint16_t)0x1000U)  /*!< Enable auto-negotiation function     */
-#define PHY_RESTART_AUTONEGOTIATION     ((uint16_t)0x0200U)  /*!< Restart auto-negotiation function    */
-#define PHY_POWERDOWN                   ((uint16_t)0x0800U)  /*!< Select the power down mode           */
-#define PHY_ISOLATE                     ((uint16_t)0x0400U)  /*!< Isolate PHY from MII                 */
-
-#define PHY_AUTONEGO_COMPLETE           ((uint16_t)0x0020U)  /*!< Auto-Negotiation process completed   */
-#define PHY_LINKED_STATUS               ((uint16_t)0x0004U)  /*!< Valid link established               */
-#define PHY_JABBER_DETECTION            ((uint16_t)0x0002U)  /*!< Jabber condition detected            */
-  
-/* Section 4: Extended PHY Registers */
-#define PHY_SR                          ((uint16_t)0x10U)    /*!< PHY status register Offset                      */
-
-#define PHY_SPEED_STATUS                ((uint16_t)0x0002U)  /*!< PHY Speed mask                                  */
-#define PHY_DUPLEX_STATUS               ((uint16_t)0x0004U)  /*!< PHY Duplex mask                                 */
-
-/* ################## SPI peripheral configuration ########################## */
-
-/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
-* Activated: CRC code is present inside driver
-* Deactivated: CRC code cleaned from driver
-*/
-
-#define USE_SPI_CRC                     0U
-
-/* Includes ------------------------------------------------------------------*/
-/**
-  * @brief Include module's header file 
-  */
-
-#ifdef HAL_RCC_MODULE_ENABLED
-  #include "stm32f4xx_hal_rcc.h"
-#endif /* HAL_RCC_MODULE_ENABLED */
-
-#ifdef HAL_EXTI_MODULE_ENABLED
-  #include "stm32f4xx_hal_exti.h"
-#endif /* HAL_EXTI_MODULE_ENABLED */
-
-#ifdef HAL_GPIO_MODULE_ENABLED
-  #include "stm32f4xx_hal_gpio.h"
-#endif /* HAL_GPIO_MODULE_ENABLED */
-
-#ifdef HAL_DMA_MODULE_ENABLED
-  #include "stm32f4xx_hal_dma.h"
-#endif /* HAL_DMA_MODULE_ENABLED */
-   
-#ifdef HAL_CORTEX_MODULE_ENABLED
-  #include "stm32f4xx_hal_cortex.h"
-#endif /* HAL_CORTEX_MODULE_ENABLED */
-
-#ifdef HAL_ADC_MODULE_ENABLED
-  #include "stm32f4xx_hal_adc.h"
-#endif /* HAL_ADC_MODULE_ENABLED */
-
-#ifdef HAL_CAN_MODULE_ENABLED
-  #include "stm32f4xx_hal_can.h"
-#endif /* HAL_CAN_MODULE_ENABLED */
-
-#ifdef HAL_CRC_MODULE_ENABLED
-  #include "stm32f4xx_hal_crc.h"
-#endif /* HAL_CRC_MODULE_ENABLED */
-
-#ifdef HAL_CRYP_MODULE_ENABLED
-  #include "stm32f4xx_hal_cryp.h" 
-#endif /* HAL_CRYP_MODULE_ENABLED */
-
-#ifdef HAL_SMBUS_MODULE_ENABLED
-#include "stm32f4xx_hal_smbus.h"
-#endif /* HAL_SMBUS_MODULE_ENABLED */
-
-#ifdef HAL_DMA2D_MODULE_ENABLED
-  #include "stm32f4xx_hal_dma2d.h"
-#endif /* HAL_DMA2D_MODULE_ENABLED */
-
-#ifdef HAL_DAC_MODULE_ENABLED
-  #include "stm32f4xx_hal_dac.h"
-#endif /* HAL_DAC_MODULE_ENABLED */
-
-#ifdef HAL_DCMI_MODULE_ENABLED
-  #include "stm32f4xx_hal_dcmi.h"
-#endif /* HAL_DCMI_MODULE_ENABLED */
-
-#ifdef HAL_ETH_MODULE_ENABLED
-  #include "stm32f4xx_hal_eth.h"
-#endif /* HAL_ETH_MODULE_ENABLED */
-
-#ifdef HAL_FLASH_MODULE_ENABLED
-  #include "stm32f4xx_hal_flash.h"
-#endif /* HAL_FLASH_MODULE_ENABLED */
- 
-#ifdef HAL_SRAM_MODULE_ENABLED
-  #include "stm32f4xx_hal_sram.h"
-#endif /* HAL_SRAM_MODULE_ENABLED */
-
-#ifdef HAL_NOR_MODULE_ENABLED
-  #include "stm32f4xx_hal_nor.h"
-#endif /* HAL_NOR_MODULE_ENABLED */
-
-#ifdef HAL_NAND_MODULE_ENABLED
-  #include "stm32f4xx_hal_nand.h"
-#endif /* HAL_NAND_MODULE_ENABLED */
-
-#ifdef HAL_PCCARD_MODULE_ENABLED
-  #include "stm32f4xx_hal_pccard.h"
-#endif /* HAL_PCCARD_MODULE_ENABLED */ 
-  
-#ifdef HAL_SDRAM_MODULE_ENABLED
-  #include "stm32f4xx_hal_sdram.h"
-#endif /* HAL_SDRAM_MODULE_ENABLED */      
-
-#ifdef HAL_HASH_MODULE_ENABLED
- #include "stm32f4xx_hal_hash.h"
-#endif /* HAL_HASH_MODULE_ENABLED */
-
-#ifdef HAL_I2C_MODULE_ENABLED
- #include "stm32f4xx_hal_i2c.h"
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-#ifdef HAL_I2S_MODULE_ENABLED
- #include "stm32f4xx_hal_i2s.h"
-#endif /* HAL_I2S_MODULE_ENABLED */
-
-#ifdef HAL_IWDG_MODULE_ENABLED
- #include "stm32f4xx_hal_iwdg.h"
-#endif /* HAL_IWDG_MODULE_ENABLED */
-
-#ifdef HAL_LTDC_MODULE_ENABLED
- #include "stm32f4xx_hal_ltdc.h"
-#endif /* HAL_LTDC_MODULE_ENABLED */
-
-#ifdef HAL_PWR_MODULE_ENABLED
- #include "stm32f4xx_hal_pwr.h"
-#endif /* HAL_PWR_MODULE_ENABLED */
-
-#ifdef HAL_RNG_MODULE_ENABLED
- #include "stm32f4xx_hal_rng.h"
-#endif /* HAL_RNG_MODULE_ENABLED */
-
-#ifdef HAL_RTC_MODULE_ENABLED
- #include "stm32f4xx_hal_rtc.h"
-#endif /* HAL_RTC_MODULE_ENABLED */
-
-#ifdef HAL_SAI_MODULE_ENABLED
- #include "stm32f4xx_hal_sai.h"
-#endif /* HAL_SAI_MODULE_ENABLED */
-
-#ifdef HAL_SD_MODULE_ENABLED
- #include "stm32f4xx_hal_sd.h"
-#endif /* HAL_SD_MODULE_ENABLED */
-
-#ifdef HAL_MMC_MODULE_ENABLED
- #include "stm32f4xx_hal_mmc.h"
-#endif /* HAL_MMC_MODULE_ENABLED */
-
-#ifdef HAL_SPI_MODULE_ENABLED
- #include "stm32f4xx_hal_spi.h"
-#endif /* HAL_SPI_MODULE_ENABLED */
-
-#ifdef HAL_TIM_MODULE_ENABLED
- #include "stm32f4xx_hal_tim.h"
-#endif /* HAL_TIM_MODULE_ENABLED */
-
-#ifdef HAL_UART_MODULE_ENABLED
- #include "stm32f4xx_hal_uart.h"
-#endif /* HAL_UART_MODULE_ENABLED */
-
-#ifdef HAL_USART_MODULE_ENABLED
- #include "stm32f4xx_hal_usart.h"
-#endif /* HAL_USART_MODULE_ENABLED */
-
-#ifdef HAL_IRDA_MODULE_ENABLED
- #include "stm32f4xx_hal_irda.h"
-#endif /* HAL_IRDA_MODULE_ENABLED */
-
-#ifdef HAL_SMARTCARD_MODULE_ENABLED
- #include "stm32f4xx_hal_smartcard.h"
-#endif /* HAL_SMARTCARD_MODULE_ENABLED */
-
-#ifdef HAL_WWDG_MODULE_ENABLED
- #include "stm32f4xx_hal_wwdg.h"
-#endif /* HAL_WWDG_MODULE_ENABLED */
-
-#ifdef HAL_PCD_MODULE_ENABLED
- #include "stm32f4xx_hal_pcd.h"
-#endif /* HAL_PCD_MODULE_ENABLED */
-
-#ifdef HAL_HCD_MODULE_ENABLED
- #include "stm32f4xx_hal_hcd.h"
-#endif /* HAL_HCD_MODULE_ENABLED */
-   
-#ifdef HAL_DSI_MODULE_ENABLED
- #include "stm32f4xx_hal_dsi.h"
-#endif /* HAL_DSI_MODULE_ENABLED */
-
-#ifdef HAL_QSPI_MODULE_ENABLED
- #include "stm32f4xx_hal_qspi.h"
-#endif /* HAL_QSPI_MODULE_ENABLED */
-
-#ifdef HAL_CEC_MODULE_ENABLED
- #include "stm32f4xx_hal_cec.h"
-#endif /* HAL_CEC_MODULE_ENABLED */
-
-#ifdef HAL_FMPI2C_MODULE_ENABLED
- #include "stm32f4xx_hal_fmpi2c.h"
-#endif /* HAL_FMPI2C_MODULE_ENABLED */
-
-#ifdef HAL_SPDIFRX_MODULE_ENABLED
- #include "stm32f4xx_hal_spdifrx.h"
-#endif /* HAL_SPDIFRX_MODULE_ENABLED */
-
-#ifdef HAL_DFSDM_MODULE_ENABLED
- #include "stm32f4xx_hal_dfsdm.h"
-#endif /* HAL_DFSDM_MODULE_ENABLED */
-
-#ifdef HAL_LPTIM_MODULE_ENABLED
- #include "stm32f4xx_hal_lptim.h"
-#endif /* HAL_LPTIM_MODULE_ENABLED */
-   
-/* Exported macro ------------------------------------------------------------*/
-#ifdef  USE_FULL_ASSERT
-/**
-  * @brief  The assert_param macro is used for function's parameters check.
-  * @param  expr: If expr is false, it calls assert_failed function
-  *         which reports the name of the source file and the source
-  *         line number of the call that failed. 
-  *         If expr is true, it returns no value.
-  * @retval None
-  */
-  #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
-/* Exported functions ------------------------------------------------------- */
-  void assert_failed(uint8_t* file, uint32_t line);
-#else
-  #define assert_param(expr) ((void)0U)
-#endif /* USE_FULL_ASSERT */    
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32F4xx_HAL_CONF_H */
- 
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 42
esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Inc/stm32f4xx_it.h

@@ -1,42 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    stm32f4xx_it.h
-  * @brief   This file contains the headers of the interrupt handlers.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
-  * All rights reserved.</center></h2>
-  *
-  * This software component is licensed by ST under BSD 3-Clause license,
-  * the "License"; You may not use this file except in compliance with the
-  * License. You may obtain a copy of the License at:
-  *                        opensource.org/licenses/BSD-3-Clause
-  *
- ******************************************************************************
-  */
-
-#ifndef __STM32F4xx_IT_H
-#define __STM32F4xx_IT_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif 
-
-void NMI_Handler(void);
-void HardFault_Handler(void);
-void MemManage_Handler(void);
-void BusFault_Handler(void);
-void UsageFault_Handler(void);
-void SVC_Handler(void);
-void DebugMon_Handler(void);
-void PendSV_Handler(void);
-void SysTick_Handler(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32F4xx_IT_H */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 59
esp_flasher/lib/esp-serial-flasher/examples/stm32_example/README.md

@@ -1,59 +0,0 @@
-# STM32 example
-
-## Overview
-
-Example demonstrates how to flash ESP32 from another STM32 (host MCU) using esp_serial_flash component API. STM32F4-Discovery board is used in this example, as STM32F407VG has FLASH memory large enough to fit the whole hello-world example of ESP32. Binaries to be flashed from host MCU to ESP32 can be found in `binaries` directory and converted into C-arrays during build process. USART1 is dedicated for communication with ESP32, whereas, USART2 can be used for debug purposes by attaching UART-to-USB bridge.
-
-Following steps are performed in order to re-program target's memory:
-
-1. Peripherals are initialized.
-2. Host puts slave device into boot mode tries to connect by calling `esp_loader_connect()`.
-3. Then `esp_loader_flash_start()` is called to enter flashing mode and erase amount of memory to be flashed.
-4. `esp_loader_flash_write()` function is called repeatedly until the whole binary image is transfered.
-
-Note: In addition, to steps mentioned above, `esp_loader_change_transmission_rate`  is called after connection is established in order to increase flashing speed. Bootloader is also capable of detecting baud rate during connection phase, and can be changed before calling `esp_loader_connect`. However, it is recommended to start at lower speed and then use dedicated command to increase baud rate. This does not apply for ESP8266, as its bootloader does not support this command, therefore, baud rate can only be changed before connection phase in this case.
-
-## Hardware Required
-
-* STM32F4-Discovery board. 
-* A development board with ESP32 SoC (e.g. ESP-WROVER-KIT, ESP32-DevKitC, etc.).
-* One or two USB cables for power supply and programming.
-
-## Hardware connection
-
-Table below shows connection between STM32 and ESP32.
-
-| STM32 (host) | ESP32 (slave) |
-|:------------:|:-------------:|
-|    PB5       |      IO0      |
-|    PB4       |      RST      |
-|    PB6       |      RX0      |
-|    PB7       |      TX0      |
-
-Optionally, UART-to-USB bridge can be connected to PD5(RX) and PD6(TX) for debug purposes.
-
-## Build and flash
-
-To compile the example:
-
-Create and navigate to `build` directory:
-```
-mkdir build && cd build
-```
-Run cmake (with appropriate parameters) and build: 
-```
-cmake -DTOOLCHAIN_PREFIX="/path_to_toolchain" -DSTM32Cube_DIR="path_to_stm32Cube" -DSTM32_CHIP="STM32F407VG" -DPORT="STM32" .. && cmake --build .
-```
-
-Binaries to be flashed are placed in separate folder (binaries.c) for each possible target and converted to C-array. Without explicitly enabling MD5 check, flash integrity verification is disabled by default.
-
-For more details regarding to esp_serial_flasher configuration and STM32 support, please refer to top level [README.md](../../README.md).
-
-Note: CMake 3.13 or later is required.
-
-## STM32CubeMx configuration
-
-Following configuration was used to generate STM32 `cmake` based project:
-* Project tab: Toolchain/IDE - Other toolchain (GPDSC)
-* Code Generator tab: Add necessary files as reference in the toolchain project configuration file
-

+ 0 - 183
esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Src/libc_compat.c

@@ -1,183 +0,0 @@
-/* libc_compat
-
-   This code is in the Public Domain (or CC0 licensed, at your option.)
-
-   Unless required by applicable law or agreed to in writing, this
-   software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-   CONDITIONS OF ANY KIND, either express or implied.
-*/
-
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/times.h>
-#include <sys/unistd.h>
-#include <sys/time.h>
-
-#if defined STM32F1
-# include <stm32f1xx_hal.h>
-#elif defined STM32F2
-# include <stm32f2xx_hal.h>
-#elif defined STM32F4
-# include <stm32f4xx_hal.h>
-#elif defined STM32G0
-# include <stm32g0xx_hal.h>
-#endif
-
-extern uint32_t __get_MSP(void);
-extern UART_HandleTypeDef huart2;
-extern uint64_t virtualTimer;
-
-#undef errno
-extern int errno;
-
-char *__env[1] = { 0 };
-char **environ = __env;
-
-int _write(int file, char *ptr, int len);
-
-void _exit(int status)
-{
-    while (1);
-}
-
-int _close(int file)
-{
-    return -1;
-}
-
-int _execve(char *name, char **argv, char **env)
-{
-    errno = ENOMEM;
-    return -1;
-}
-
-int _fork()
-{
-    errno = EAGAIN;
-    return -1;
-}
-
-int _fstat(int file, struct stat *st)
-{
-    st->st_mode = S_IFCHR;
-    return 0;
-}
-
-int _getpid()
-{
-    return 1;
-}
-
-int _gettimeofday(struct timeval *tv, struct timezone *tz)
-{
-    tv->tv_sec = HAL_GetTick() / 1000;
-    tv->tv_usec = (HAL_GetTick() % 1000) * 1000;
-    return 0;
-}
-
-int _isatty(int file)
-{
-    switch (file)
-    {
-    case STDOUT_FILENO:
-    case STDERR_FILENO:
-    case STDIN_FILENO:
-        return 1;
-    default:
-        //errno = ENOTTY;
-        errno = EBADF;
-        return 0;
-    }
-}
-
-int _kill(int pid, int sig)
-{
-    errno = EINVAL;
-    return (-1);
-}
-
-int _link(char *old, char *new)
-{
-    errno = EMLINK;
-    return -1;
-}
-
-int _lseek(int file, int ptr, int dir)
-{
-    return 0;
-}
-
-caddr_t _sbrk(int incr)
-{
-    extern char _ebss;
-    static char *heap_end= &_ebss;
-    char *prev_heap_end;
-
-    prev_heap_end = heap_end;
-
-    char * stack = (char*) __get_MSP();
-    if (heap_end + incr > stack)
-    {
-        _write(STDERR_FILENO, "Heap and stack collision\n", 25);
-        errno = ENOMEM;
-        return (caddr_t) - 1;
-        //abort ();
-    }
-
-    heap_end += incr;
-    return (caddr_t) prev_heap_end;
-
-}
-
-int _read(int file, char *ptr, int len)
-{
-    switch (file)
-    {
-    case STDIN_FILENO:
-        HAL_UART_Receive(&huart2, (uint8_t *)ptr, 1, HAL_MAX_DELAY);
-        return 1;
-    default:
-        errno = EBADF;
-        return -1;
-    }
-}
-
-int _stat(const char *filepath, struct stat *st)
-{
-    st->st_mode = S_IFCHR;
-    return 0;
-}
-
-clock_t _times(struct tms *buf)
-{
-    return -1;
-}
-
-int _unlink(char *name)
-{
-    errno = ENOENT;
-    return -1;
-}
-
-int _wait(int *status)
-{
-    errno = ECHILD;
-    return -1;
-}
-
-int _write(int file, char *ptr, int len)
-{
-    switch (file)
-    {
-    case STDOUT_FILENO: /*stdout*/
-        HAL_UART_Transmit(&huart2, (uint8_t*)ptr, len, HAL_MAX_DELAY);
-        break;
-    case STDERR_FILENO: /* stderr */
-        HAL_UART_Transmit(&huart2, (uint8_t*)ptr, len, HAL_MAX_DELAY);
-        break;
-    default:
-        errno = EBADF;
-        return -1;
-    }
-    return len;
-}

+ 0 - 189
esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Src/main.c

@@ -1,189 +0,0 @@
-/**
-  ******************************************************************************
-  * @file           : main.c
-  * @brief          : Main program body
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
-  * All rights reserved.</center></h2>
-  *
-  * This software component is licensed by ST under BSD 3-Clause license,
-  * the "License"; You may not use this file except in compliance with the
-  * License. You may obtain a copy of the License at:
-  *                        opensource.org/licenses/BSD-3-Clause
-  *
-  ******************************************************************************
-  */
-
-#include "main.h"
-#include <stdio.h>
-#include <stdint.h>
-#include <string.h>
-#include <sys/param.h>
-#include "stm32_port.h"
-#include "esp_loader.h"
-#include "example_common.h"
-
-UART_HandleTypeDef huart1;
-UART_HandleTypeDef huart2;
-
-void SystemClock_Config(void);
-static void MX_GPIO_Init(void);
-static void MX_USART1_UART_Init(void);
-static void MX_USART2_UART_Init(void);
-
-#define HIGHER_BAUDRATE 230400
-
-
-
-int main(void)
-{
-    example_binaries_t bin;
-
-    HAL_Init();
-    SystemClock_Config();
-    MX_GPIO_Init();
-    MX_USART1_UART_Init();
-    MX_USART2_UART_Init();
-
-    loader_stm32_config_t config = {
-        .huart = &huart1,
-        .port_io0 = GPIOB,
-        .pin_num_io0 = TARGET_IO0_Pin,
-        .port_rst = GPIOB,
-        .pin_num_rst = TARGET_RST_Pin,
-    };
-
-    loader_port_stm32_init(&config);
-    
-    if (connect_to_target(HIGHER_BAUDRATE) == ESP_LOADER_SUCCESS) {
-        
-        get_example_binaries(esp_loader_get_target(), &bin);
-
-        flash_binary(bin.boot.data, bin.boot.size, bin.boot.addr);
-        flash_binary(bin.part.data, bin.part.size, bin.part.addr);
-        flash_binary(bin.app.data,  bin.app.size,  bin.app.addr);
-    }
-
-    while (1) { }
-}
-
-
-void SystemClock_Config(void)
-{
-    RCC_OscInitTypeDef RCC_OscInitStruct = {0};
-    RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
-
-    /** Configure the main internal regulator output voltage
-    */
-    __HAL_RCC_PWR_CLK_ENABLE();
-    __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
-    /** Initializes the CPU, AHB and APB busses clocks
-    */
-    RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
-    RCC_OscInitStruct.HSIState = RCC_HSI_ON;
-    RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
-    RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
-    if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
-        Error_Handler();
-    }
-    /** Initializes the CPU, AHB and APB busses clocks
-    */
-    RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
-                                  | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
-    RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
-    RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
-    RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
-    RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
-
-    if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK) {
-        Error_Handler();
-    }
-}
-
-static void MX_USART1_UART_Init(void)
-{
-    huart1.Instance = USART1;
-    huart1.Init.BaudRate = 115200;
-    huart1.Init.WordLength = UART_WORDLENGTH_8B;
-    huart1.Init.StopBits = UART_STOPBITS_1;
-    huart1.Init.Parity = UART_PARITY_NONE;
-    huart1.Init.Mode = UART_MODE_TX_RX;
-    huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
-    huart1.Init.OverSampling = UART_OVERSAMPLING_16;
-    if (HAL_UART_Init(&huart1) != HAL_OK) {
-        Error_Handler();
-    }
-}
-
-static void MX_USART2_UART_Init(void)
-{
-    huart2.Instance = USART2;
-    huart2.Init.BaudRate = 115200;
-    huart2.Init.WordLength = UART_WORDLENGTH_8B;
-    huart2.Init.StopBits = UART_STOPBITS_1;
-    huart2.Init.Parity = UART_PARITY_NONE;
-    huart2.Init.Mode = UART_MODE_TX_RX;
-    huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
-    huart2.Init.OverSampling = UART_OVERSAMPLING_16;
-    if (HAL_UART_Init(&huart2) != HAL_OK) {
-        Error_Handler();
-    }
-}
-
-static void MX_GPIO_Init(void)
-{
-    GPIO_InitTypeDef GPIO_InitStruct = {0};
-
-    /* GPIO Ports Clock Enable */
-    __HAL_RCC_GPIOD_CLK_ENABLE();
-    __HAL_RCC_GPIOB_CLK_ENABLE();
-
-    /*Configure GPIO pin Output Level */
-    HAL_GPIO_WritePin(GPIOD, GREEN_LED_Pin | ORANGE_LED_Pin | RED_LED_Pin | BLUE_LED_Pin, GPIO_PIN_RESET);
-
-    /*Configure GPIO pin Output Level */
-    HAL_GPIO_WritePin(GPIOB, TARGET_RST_Pin | TARGET_IO0_Pin, GPIO_PIN_RESET);
-
-    /*Configure GPIO pins : GREEN_LED_Pin ORANGE_LED_Pin RED_LED_Pin BLUE_LED_Pin */
-    GPIO_InitStruct.Pin = GREEN_LED_Pin | ORANGE_LED_Pin | RED_LED_Pin | BLUE_LED_Pin;
-    GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
-    GPIO_InitStruct.Pull = GPIO_NOPULL;
-    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
-    HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
-
-    /*Configure GPIO pins : PB4 PB5 */
-    GPIO_InitStruct.Pin = TARGET_RST_Pin | TARGET_IO0_Pin;
-    GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
-    GPIO_InitStruct.Pull = GPIO_NOPULL;
-    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
-    HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
-
-}
-
-/**
-  * @brief  This function is executed in case of error occurrence.
-  * @retval None
-  */
-void Error_Handler(void)
-{
-    /* User can add his own implementation to report the HAL error return state */
-}
-
-#ifdef  USE_FULL_ASSERT
-/**
-  * @brief  Reports the name of the source file and the source line number
-  *         where the assert_param error has occurred.
-  * @param  file: pointer to the source file name
-  * @param  line: assert_param error line source number
-  * @retval None
-  */
-void assert_failed(uint8_t *file, uint32_t line)
-{
-    /* User can add his own implementation to report the file name and line number,
-       tex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
-}
-#endif /* USE_FULL_ASSERT */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 109
esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Src/stm32f4xx_hal_msp.c

@@ -1,109 +0,0 @@
-/**
-  ******************************************************************************
-  * File Name          : stm32f4xx_hal_msp.c
-  * Description        : This file provides code for the MSP Initialization 
-  *                      and de-Initialization codes.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
-  * All rights reserved.</center></h2>
-  *
-  * This software component is licensed by ST under BSD 3-Clause license,
-  * the "License"; You may not use this file except in compliance with the
-  * License. You may obtain a copy of the License at:
-  *                        opensource.org/licenses/BSD-3-Clause
-  *
-  ******************************************************************************
-  */
-
-#include "main.h"
-
-void HAL_MspInit(void)
-{
-  __HAL_RCC_SYSCFG_CLK_ENABLE();
-  __HAL_RCC_PWR_CLK_ENABLE();
-}
-
-/**
-* @brief UART MSP Initialization
-* This function configures the hardware resources used in this example
-* @param huart: UART handle pointer
-* @retval None
-*/
-void HAL_UART_MspInit(UART_HandleTypeDef* huart)
-{
-  GPIO_InitTypeDef GPIO_InitStruct = {0};
-  if(huart->Instance==USART1)
-  {
-    /* Peripheral clock enable */
-    __HAL_RCC_USART1_CLK_ENABLE();
-  
-    __HAL_RCC_GPIOB_CLK_ENABLE();
-    /**USART1 GPIO Configuration    
-    PB6     ------> USART1_TX
-    PB7     ------> USART1_RX 
-    */
-    GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
-    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
-    GPIO_InitStruct.Pull = GPIO_NOPULL;
-    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
-    GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
-    HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
-
-  }
-  else if(huart->Instance==USART2)
-  {
-    /* Peripheral clock enable */
-    __HAL_RCC_USART2_CLK_ENABLE();
-  
-    __HAL_RCC_GPIOD_CLK_ENABLE();
-    /**USART2 GPIO Configuration    
-    PD5     ------> USART2_TX
-    PD6     ------> USART2_RX 
-    */
-    GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6;
-    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
-    GPIO_InitStruct.Pull = GPIO_NOPULL;
-    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
-    GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
-    HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
-  }
-
-}
-
-/**
-* @brief UART MSP De-Initialization
-* This function freeze the hardware resources used in this example
-* @param huart: UART handle pointer
-* @retval None
-*/
-void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
-{
-  if(huart->Instance==USART1)
-  {
-    /* Peripheral clock disable */
-    __HAL_RCC_USART1_CLK_DISABLE();
-  
-    /**USART1 GPIO Configuration    
-    PB6     ------> USART1_TX
-    PB7     ------> USART1_RX 
-    */
-    HAL_GPIO_DeInit(GPIOB, GPIO_PIN_6|GPIO_PIN_7);
-
-  }
-  else if(huart->Instance==USART2)
-  {
-    /* Peripheral clock disable */
-    __HAL_RCC_USART2_CLK_DISABLE();
-  
-    /**USART2 GPIO Configuration    
-    PD5     ------> USART2_TX
-    PD6     ------> USART2_RX 
-    */
-    HAL_GPIO_DeInit(GPIOD, GPIO_PIN_5|GPIO_PIN_6);
-  }
-
-}
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 204
esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Src/stm32f4xx_it.c

@@ -1,204 +0,0 @@
-/* USER CODE BEGIN Header */
-/**
-  ******************************************************************************
-  * @file    stm32f4xx_it.c
-  * @brief   Interrupt Service Routines.
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
-  * All rights reserved.</center></h2>
-  *
-  * This software component is licensed by ST under BSD 3-Clause license,
-  * the "License"; You may not use this file except in compliance with the
-  * License. You may obtain a copy of the License at:
-  *                        opensource.org/licenses/BSD-3-Clause
-  *
-  ******************************************************************************
-  */
-/* USER CODE END Header */
-
-/* Includes ------------------------------------------------------------------*/
-#include "main.h"
-#include "stm32f4xx_it.h"
-/* Private includes ----------------------------------------------------------*/
-/* USER CODE BEGIN Includes */
-#include <stdio.h>
-/* USER CODE END Includes */
-
-/* Private typedef -----------------------------------------------------------*/
-/* USER CODE BEGIN TD */
-
-/* USER CODE END TD */
-
-/* Private define ------------------------------------------------------------*/
-/* USER CODE BEGIN PD */
- 
-/* USER CODE END PD */
-
-/* Private macro -------------------------------------------------------------*/
-/* USER CODE BEGIN PM */
-
-/* USER CODE END PM */
-
-/* Private variables ---------------------------------------------------------*/
-/* USER CODE BEGIN PV */
-
-/* USER CODE END PV */
-
-/* Private function prototypes -----------------------------------------------*/
-/* USER CODE BEGIN PFP */
-
-/* USER CODE END PFP */
-
-/* Private user code ---------------------------------------------------------*/
-/* USER CODE BEGIN 0 */
-
-/* USER CODE END 0 */
-
-/* External variables --------------------------------------------------------*/
-
-/* USER CODE BEGIN EV */
-
-/* USER CODE END EV */
-
-/******************************************************************************/
-/*           Cortex-M4 Processor Interruption and Exception Handlers          */ 
-/******************************************************************************/
-/**
-  * @brief This function handles Non maskable interrupt.
-  */
-void NMI_Handler(void)
-{
-  /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
-
-  /* USER CODE END NonMaskableInt_IRQn 0 */
-  /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
-
-  /* USER CODE END NonMaskableInt_IRQn 1 */
-}
-
-/**
-  * @brief This function handles Hard fault interrupt.
-  */
-void HardFault_Handler(void)
-{
-  /* USER CODE BEGIN HardFault_IRQn 0 */
-
-  /* USER CODE END HardFault_IRQn 0 */
-  while (1)
-  {
-    /* USER CODE BEGIN W1_HardFault_IRQn 0 */
-    /* USER CODE END W1_HardFault_IRQn 0 */
-  }
-}
-
-/**
-  * @brief This function handles Memory management fault.
-  */
-void MemManage_Handler(void)
-{
-  /* USER CODE BEGIN MemoryManagement_IRQn 0 */
-
-  /* USER CODE END MemoryManagement_IRQn 0 */
-  while (1)
-  {
-    /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
-    /* USER CODE END W1_MemoryManagement_IRQn 0 */
-  }
-}
-
-/**
-  * @brief This function handles Pre-fetch fault, memory access fault.
-  */
-void BusFault_Handler(void)
-{
-  /* USER CODE BEGIN BusFault_IRQn 0 */
-
-  /* USER CODE END BusFault_IRQn 0 */
-  while (1)
-  {
-    /* USER CODE BEGIN W1_BusFault_IRQn 0 */
-    /* USER CODE END W1_BusFault_IRQn 0 */
-  }
-}
-
-/**
-  * @brief This function handles Undefined instruction or illegal state.
-  */
-void UsageFault_Handler(void)
-{
-  /* USER CODE BEGIN UsageFault_IRQn 0 */
-
-  /* USER CODE END UsageFault_IRQn 0 */
-  while (1)
-  {
-    /* USER CODE BEGIN W1_UsageFault_IRQn 0 */
-    /* USER CODE END W1_UsageFault_IRQn 0 */
-  }
-}
-
-/**
-  * @brief This function handles System service call via SWI instruction.
-  */
-void SVC_Handler(void)
-{
-  /* USER CODE BEGIN SVCall_IRQn 0 */
-
-  /* USER CODE END SVCall_IRQn 0 */
-  /* USER CODE BEGIN SVCall_IRQn 1 */
-
-  /* USER CODE END SVCall_IRQn 1 */
-}
-
-/**
-  * @brief This function handles Debug monitor.
-  */
-void DebugMon_Handler(void)
-{
-  /* USER CODE BEGIN DebugMonitor_IRQn 0 */
-
-  /* USER CODE END DebugMonitor_IRQn 0 */
-  /* USER CODE BEGIN DebugMonitor_IRQn 1 */
-
-  /* USER CODE END DebugMonitor_IRQn 1 */
-}
-
-/**
-  * @brief This function handles Pendable request for system service.
-  */
-void PendSV_Handler(void)
-{
-  /* USER CODE BEGIN PendSV_IRQn 0 */
-
-  /* USER CODE END PendSV_IRQn 0 */
-  /* USER CODE BEGIN PendSV_IRQn 1 */
-
-  /* USER CODE END PendSV_IRQn 1 */
-}
-
-/**
-  * @brief This function handles System tick timer.
-  */
-void SysTick_Handler(void)
-{
-  /* USER CODE BEGIN SysTick_IRQn 0 */
-
-  /* USER CODE END SysTick_IRQn 0 */
-  HAL_IncTick();
-  /* USER CODE BEGIN SysTick_IRQn 1 */
-
-  /* USER CODE END SysTick_IRQn 1 */
-}
-
-/******************************************************************************/
-/* STM32F4xx Peripheral Interrupt Handlers                                    */
-/* Add here the Interrupt Handlers for the used peripherals.                  */
-/* For the available peripheral interrupt handler names,                      */
-/* please refer to the startup file (startup_stm32f4xx.s).                    */
-/******************************************************************************/
-
-/* USER CODE BEGIN 1 */
-
-/* USER CODE END 1 */
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 727
esp_flasher/lib/esp-serial-flasher/examples/stm32_example/Src/system_stm32f4xx.c

@@ -1,727 +0,0 @@
-/**
-  ******************************************************************************
-  * @file    system_stm32f4xx.c
-  * @author  MCD Application Team
-  * @brief   CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
-  *
-  *   This file provides two functions and one global variable to be called from 
-  *   user application:
-  *      - SystemInit(): This function is called at startup just after reset and 
-  *                      before branch to main program. This call is made inside
-  *                      the "startup_stm32f4xx.s" file.
-  *
-  *      - SystemCoreClock variable: Contains the core clock (HCLK), it can be used
-  *                                  by the user application to setup the SysTick 
-  *                                  timer or configure other parameters.
-  *                                     
-  *      - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
-  *                                 be called whenever the core clock is changed
-  *                                 during program execution.
-  *
-  *
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
-  * All rights reserved.</center></h2>
-  *
-  * This software component is licensed by ST under BSD 3-Clause license,
-  * the "License"; You may not use this file except in compliance with the
-  * License. You may obtain a copy of the License at:
-  *                        opensource.org/licenses/BSD-3-Clause
-  *
-  ******************************************************************************
-  */
-
-/** @addtogroup CMSIS
-  * @{
-  */
-
-/** @addtogroup stm32f4xx_system
-  * @{
-  */  
-  
-/** @addtogroup STM32F4xx_System_Private_Includes
-  * @{
-  */
-
-
-#include "stm32f4xx.h"
-
-#if !defined  (HSE_VALUE) 
-  #define HSE_VALUE    ((uint32_t)25000000) /*!< Default value of the External oscillator in Hz */
-#endif /* HSE_VALUE */
-
-#if !defined  (HSI_VALUE)
-  #define HSI_VALUE    ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/
-#endif /* HSI_VALUE */
-
-/**
-  * @}
-  */
-
-/** @addtogroup STM32F4xx_System_Private_TypesDefinitions
-  * @{
-  */
-
-/**
-  * @}
-  */
-
-/** @addtogroup STM32F4xx_System_Private_Defines
-  * @{
-  */
-
-/************************* Miscellaneous Configuration ************************/
-/*!< Uncomment the following line if you need to use external SRAM or SDRAM as data memory  */
-#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
- || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
- || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
-/* #define DATA_IN_ExtSRAM */
-#endif /* STM32F40xxx || STM32F41xxx || STM32F42xxx || STM32F43xxx || STM32F469xx || STM32F479xx ||\
-          STM32F412Zx || STM32F412Vx */
- 
-#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
- || defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
-/* #define DATA_IN_ExtSDRAM */
-#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx ||\
-          STM32F479xx */
-
-/*!< Uncomment the following line if you need to relocate your vector Table in
-     Internal SRAM. */
-/* #define VECT_TAB_SRAM */
-#define VECT_TAB_OFFSET  0x00 /*!< Vector Table base offset field. 
-                                   This value must be a multiple of 0x200. */
-/******************************************************************************/
-
-/**
-  * @}
-  */
-
-/** @addtogroup STM32F4xx_System_Private_Macros
-  * @{
-  */
-
-/**
-  * @}
-  */
-
-/** @addtogroup STM32F4xx_System_Private_Variables
-  * @{
-  */
-  /* This variable is updated in three ways:
-      1) by calling CMSIS function SystemCoreClockUpdate()
-      2) by calling HAL API function HAL_RCC_GetHCLKFreq()
-      3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency 
-         Note: If you use this function to configure the system clock; then there
-               is no need to call the 2 first functions listed above, since SystemCoreClock
-               variable is updated automatically.
-  */
-uint32_t SystemCoreClock = 16000000;
-const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
-const uint8_t APBPrescTable[8]  = {0, 0, 0, 0, 1, 2, 3, 4};
-/**
-  * @}
-  */
-
-/** @addtogroup STM32F4xx_System_Private_FunctionPrototypes
-  * @{
-  */
-
-#if defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM)
-  static void SystemInit_ExtMemCtl(void); 
-#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */
-
-/**
-  * @}
-  */
-
-/** @addtogroup STM32F4xx_System_Private_Functions
-  * @{
-  */
-
-/**
-  * @brief  Setup the microcontroller system
-  *         Initialize the FPU setting, vector table location and External memory 
-  *         configuration.
-  * @param  None
-  * @retval None
-  */
-void SystemInit(void)
-{
-  /* FPU settings ------------------------------------------------------------*/
-  #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
-    SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2));  /* set CP10 and CP11 Full Access */
-  #endif
-
-#if defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM)
-  SystemInit_ExtMemCtl(); 
-#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */
-
-  /* Configure the Vector Table location add offset address ------------------*/
-#ifdef VECT_TAB_SRAM
-  SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
-#else
-  SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
-#endif
-}
-
-/**
-   * @brief  Update SystemCoreClock variable according to Clock Register Values.
-  *         The SystemCoreClock variable contains the core clock (HCLK), it can
-  *         be used by the user application to setup the SysTick timer or configure
-  *         other parameters.
-  *           
-  * @note   Each time the core clock (HCLK) changes, this function must be called
-  *         to update SystemCoreClock variable value. Otherwise, any configuration
-  *         based on this variable will be incorrect.         
-  *     
-  * @note   - The system frequency computed by this function is not the real 
-  *           frequency in the chip. It is calculated based on the predefined 
-  *           constant and the selected clock source:
-  *             
-  *           - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*)
-  *                                              
-  *           - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**)
-  *                          
-  *           - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) 
-  *             or HSI_VALUE(*) multiplied/divided by the PLL factors.
-  *         
-  *         (*) HSI_VALUE is a constant defined in stm32f4xx_hal_conf.h file (default value
-  *             16 MHz) but the real value may vary depending on the variations
-  *             in voltage and temperature.   
-  *    
-  *         (**) HSE_VALUE is a constant defined in stm32f4xx_hal_conf.h file (its value
-  *              depends on the application requirements), user has to ensure that HSE_VALUE
-  *              is same as the real frequency of the crystal used. Otherwise, this function
-  *              may have wrong result.
-  *                
-  *         - The result of this function could be not correct when using fractional
-  *           value for HSE crystal.
-  *     
-  * @param  None
-  * @retval None
-  */
-void SystemCoreClockUpdate(void)
-{
-  uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2;
-  
-  /* Get SYSCLK source -------------------------------------------------------*/
-  tmp = RCC->CFGR & RCC_CFGR_SWS;
-
-  switch (tmp)
-  {
-    case 0x00:  /* HSI used as system clock source */
-      SystemCoreClock = HSI_VALUE;
-      break;
-    case 0x04:  /* HSE used as system clock source */
-      SystemCoreClock = HSE_VALUE;
-      break;
-    case 0x08:  /* PLL used as system clock source */
-
-      /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N
-         SYSCLK = PLL_VCO / PLL_P
-         */    
-      pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22;
-      pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
-      
-      if (pllsource != 0)
-      {
-        /* HSE used as PLL clock source */
-        pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6);
-      }
-      else
-      {
-        /* HSI used as PLL clock source */
-        pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6);
-      }
-
-      pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2;
-      SystemCoreClock = pllvco/pllp;
-      break;
-    default:
-      SystemCoreClock = HSI_VALUE;
-      break;
-  }
-  /* Compute HCLK frequency --------------------------------------------------*/
-  /* Get HCLK prescaler */
-  tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)];
-  /* HCLK frequency */
-  SystemCoreClock >>= tmp;
-}
-
-#if defined (DATA_IN_ExtSRAM) && defined (DATA_IN_ExtSDRAM)
-#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
- || defined(STM32F469xx) || defined(STM32F479xx)
-/**
-  * @brief  Setup the external memory controller.
-  *         Called in startup_stm32f4xx.s before jump to main.
-  *         This function configures the external memories (SRAM/SDRAM)
-  *         This SRAM/SDRAM will be used as program data memory (including heap and stack).
-  * @param  None
-  * @retval None
-  */
-void SystemInit_ExtMemCtl(void)
-{
-  __IO uint32_t tmp = 0x00;
-
-  register uint32_t tmpreg = 0, timeout = 0xFFFF;
-  register __IO uint32_t index;
-
-  /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface clock */
-  RCC->AHB1ENR |= 0x000001F8;
-
-  /* Delay after an RCC peripheral clock enabling */
-  tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN);
-  
-  /* Connect PDx pins to FMC Alternate function */
-  GPIOD->AFR[0]  = 0x00CCC0CC;
-  GPIOD->AFR[1]  = 0xCCCCCCCC;
-  /* Configure PDx pins in Alternate function mode */  
-  GPIOD->MODER   = 0xAAAA0A8A;
-  /* Configure PDx pins speed to 100 MHz */  
-  GPIOD->OSPEEDR = 0xFFFF0FCF;
-  /* Configure PDx pins Output type to push-pull */  
-  GPIOD->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PDx pins */ 
-  GPIOD->PUPDR   = 0x00000000;
-
-  /* Connect PEx pins to FMC Alternate function */
-  GPIOE->AFR[0]  = 0xC00CC0CC;
-  GPIOE->AFR[1]  = 0xCCCCCCCC;
-  /* Configure PEx pins in Alternate function mode */ 
-  GPIOE->MODER   = 0xAAAA828A;
-  /* Configure PEx pins speed to 100 MHz */ 
-  GPIOE->OSPEEDR = 0xFFFFC3CF;
-  /* Configure PEx pins Output type to push-pull */  
-  GPIOE->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PEx pins */ 
-  GPIOE->PUPDR   = 0x00000000;
-  
-  /* Connect PFx pins to FMC Alternate function */
-  GPIOF->AFR[0]  = 0xCCCCCCCC;
-  GPIOF->AFR[1]  = 0xCCCCCCCC;
-  /* Configure PFx pins in Alternate function mode */   
-  GPIOF->MODER   = 0xAA800AAA;
-  /* Configure PFx pins speed to 50 MHz */ 
-  GPIOF->OSPEEDR = 0xAA800AAA;
-  /* Configure PFx pins Output type to push-pull */  
-  GPIOF->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PFx pins */ 
-  GPIOF->PUPDR   = 0x00000000;
-
-  /* Connect PGx pins to FMC Alternate function */
-  GPIOG->AFR[0]  = 0xCCCCCCCC;
-  GPIOG->AFR[1]  = 0xCCCCCCCC;
-  /* Configure PGx pins in Alternate function mode */ 
-  GPIOG->MODER   = 0xAAAAAAAA;
-  /* Configure PGx pins speed to 50 MHz */ 
-  GPIOG->OSPEEDR = 0xAAAAAAAA;
-  /* Configure PGx pins Output type to push-pull */  
-  GPIOG->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PGx pins */ 
-  GPIOG->PUPDR   = 0x00000000;
-  
-  /* Connect PHx pins to FMC Alternate function */
-  GPIOH->AFR[0]  = 0x00C0CC00;
-  GPIOH->AFR[1]  = 0xCCCCCCCC;
-  /* Configure PHx pins in Alternate function mode */ 
-  GPIOH->MODER   = 0xAAAA08A0;
-  /* Configure PHx pins speed to 50 MHz */ 
-  GPIOH->OSPEEDR = 0xAAAA08A0;
-  /* Configure PHx pins Output type to push-pull */  
-  GPIOH->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PHx pins */ 
-  GPIOH->PUPDR   = 0x00000000;
-  
-  /* Connect PIx pins to FMC Alternate function */
-  GPIOI->AFR[0]  = 0xCCCCCCCC;
-  GPIOI->AFR[1]  = 0x00000CC0;
-  /* Configure PIx pins in Alternate function mode */ 
-  GPIOI->MODER   = 0x0028AAAA;
-  /* Configure PIx pins speed to 50 MHz */ 
-  GPIOI->OSPEEDR = 0x0028AAAA;
-  /* Configure PIx pins Output type to push-pull */  
-  GPIOI->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PIx pins */ 
-  GPIOI->PUPDR   = 0x00000000;
-  
-/*-- FMC Configuration -------------------------------------------------------*/
-  /* Enable the FMC interface clock */
-  RCC->AHB3ENR |= 0x00000001;
-  /* Delay after an RCC peripheral clock enabling */
-  tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);
-
-  FMC_Bank5_6->SDCR[0] = 0x000019E4;
-  FMC_Bank5_6->SDTR[0] = 0x01115351;      
-  
-  /* SDRAM initialization sequence */
-  /* Clock enable command */
-  FMC_Bank5_6->SDCMR = 0x00000011; 
-  tmpreg = FMC_Bank5_6->SDSR & 0x00000020; 
-  while((tmpreg != 0) && (timeout-- > 0))
-  {
-    tmpreg = FMC_Bank5_6->SDSR & 0x00000020; 
-  }
-
-  /* Delay */
-  for (index = 0; index<1000; index++);
-  
-  /* PALL command */
-  FMC_Bank5_6->SDCMR = 0x00000012;           
-  timeout = 0xFFFF;
-  while((tmpreg != 0) && (timeout-- > 0))
-  {
-    tmpreg = FMC_Bank5_6->SDSR & 0x00000020; 
-  }
-  
-  /* Auto refresh command */
-  FMC_Bank5_6->SDCMR = 0x00000073;
-  timeout = 0xFFFF;
-  while((tmpreg != 0) && (timeout-- > 0))
-  {
-    tmpreg = FMC_Bank5_6->SDSR & 0x00000020; 
-  }
- 
-  /* MRD register program */
-  FMC_Bank5_6->SDCMR = 0x00046014;
-  timeout = 0xFFFF;
-  while((tmpreg != 0) && (timeout-- > 0))
-  {
-    tmpreg = FMC_Bank5_6->SDSR & 0x00000020; 
-  } 
-  
-  /* Set refresh count */
-  tmpreg = FMC_Bank5_6->SDRTR;
-  FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C<<1));
-  
-  /* Disable write protection */
-  tmpreg = FMC_Bank5_6->SDCR[0]; 
-  FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF);
-
-#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
-  /* Configure and enable Bank1_SRAM2 */
-  FMC_Bank1->BTCR[2]  = 0x00001011;
-  FMC_Bank1->BTCR[3]  = 0x00000201;
-  FMC_Bank1E->BWTR[2] = 0x0fffffff;
-#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ 
-#if defined(STM32F469xx) || defined(STM32F479xx)
-  /* Configure and enable Bank1_SRAM2 */
-  FMC_Bank1->BTCR[2]  = 0x00001091;
-  FMC_Bank1->BTCR[3]  = 0x00110212;
-  FMC_Bank1E->BWTR[2] = 0x0fffffff;
-#endif /* STM32F469xx || STM32F479xx */
-
-  (void)(tmp); 
-}
-#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
-#elif defined (DATA_IN_ExtSRAM) || defined (DATA_IN_ExtSDRAM)
-/**
-  * @brief  Setup the external memory controller.
-  *         Called in startup_stm32f4xx.s before jump to main.
-  *         This function configures the external memories (SRAM/SDRAM)
-  *         This SRAM/SDRAM will be used as program data memory (including heap and stack).
-  * @param  None
-  * @retval None
-  */
-void SystemInit_ExtMemCtl(void)
-{
-  __IO uint32_t tmp = 0x00;
-#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
- || defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
-#if defined (DATA_IN_ExtSDRAM)
-  register uint32_t tmpreg = 0, timeout = 0xFFFF;
-  register __IO uint32_t index;
-
-#if defined(STM32F446xx)
-  /* Enable GPIOA, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG interface
-      clock */
-  RCC->AHB1ENR |= 0x0000007D;
-#else
-  /* Enable GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH and GPIOI interface 
-      clock */
-  RCC->AHB1ENR |= 0x000001F8;
-#endif /* STM32F446xx */  
-  /* Delay after an RCC peripheral clock enabling */
-  tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN);
-  
-#if defined(STM32F446xx)
-  /* Connect PAx pins to FMC Alternate function */
-  GPIOA->AFR[0]  |= 0xC0000000;
-  GPIOA->AFR[1]  |= 0x00000000;
-  /* Configure PDx pins in Alternate function mode */
-  GPIOA->MODER   |= 0x00008000;
-  /* Configure PDx pins speed to 50 MHz */
-  GPIOA->OSPEEDR |= 0x00008000;
-  /* Configure PDx pins Output type to push-pull */
-  GPIOA->OTYPER  |= 0x00000000;
-  /* No pull-up, pull-down for PDx pins */
-  GPIOA->PUPDR   |= 0x00000000;
-
-  /* Connect PCx pins to FMC Alternate function */
-  GPIOC->AFR[0]  |= 0x00CC0000;
-  GPIOC->AFR[1]  |= 0x00000000;
-  /* Configure PDx pins in Alternate function mode */
-  GPIOC->MODER   |= 0x00000A00;
-  /* Configure PDx pins speed to 50 MHz */
-  GPIOC->OSPEEDR |= 0x00000A00;
-  /* Configure PDx pins Output type to push-pull */
-  GPIOC->OTYPER  |= 0x00000000;
-  /* No pull-up, pull-down for PDx pins */
-  GPIOC->PUPDR   |= 0x00000000;
-#endif /* STM32F446xx */
-
-  /* Connect PDx pins to FMC Alternate function */
-  GPIOD->AFR[0]  = 0x000000CC;
-  GPIOD->AFR[1]  = 0xCC000CCC;
-  /* Configure PDx pins in Alternate function mode */  
-  GPIOD->MODER   = 0xA02A000A;
-  /* Configure PDx pins speed to 50 MHz */  
-  GPIOD->OSPEEDR = 0xA02A000A;
-  /* Configure PDx pins Output type to push-pull */  
-  GPIOD->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PDx pins */ 
-  GPIOD->PUPDR   = 0x00000000;
-
-  /* Connect PEx pins to FMC Alternate function */
-  GPIOE->AFR[0]  = 0xC00000CC;
-  GPIOE->AFR[1]  = 0xCCCCCCCC;
-  /* Configure PEx pins in Alternate function mode */ 
-  GPIOE->MODER   = 0xAAAA800A;
-  /* Configure PEx pins speed to 50 MHz */ 
-  GPIOE->OSPEEDR = 0xAAAA800A;
-  /* Configure PEx pins Output type to push-pull */  
-  GPIOE->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PEx pins */ 
-  GPIOE->PUPDR   = 0x00000000;
-
-  /* Connect PFx pins to FMC Alternate function */
-  GPIOF->AFR[0]  = 0xCCCCCCCC;
-  GPIOF->AFR[1]  = 0xCCCCCCCC;
-  /* Configure PFx pins in Alternate function mode */   
-  GPIOF->MODER   = 0xAA800AAA;
-  /* Configure PFx pins speed to 50 MHz */ 
-  GPIOF->OSPEEDR = 0xAA800AAA;
-  /* Configure PFx pins Output type to push-pull */  
-  GPIOF->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PFx pins */ 
-  GPIOF->PUPDR   = 0x00000000;
-
-  /* Connect PGx pins to FMC Alternate function */
-  GPIOG->AFR[0]  = 0xCCCCCCCC;
-  GPIOG->AFR[1]  = 0xCCCCCCCC;
-  /* Configure PGx pins in Alternate function mode */ 
-  GPIOG->MODER   = 0xAAAAAAAA;
-  /* Configure PGx pins speed to 50 MHz */ 
-  GPIOG->OSPEEDR = 0xAAAAAAAA;
-  /* Configure PGx pins Output type to push-pull */  
-  GPIOG->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PGx pins */ 
-  GPIOG->PUPDR   = 0x00000000;
-
-#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
- || defined(STM32F469xx) || defined(STM32F479xx)  
-  /* Connect PHx pins to FMC Alternate function */
-  GPIOH->AFR[0]  = 0x00C0CC00;
-  GPIOH->AFR[1]  = 0xCCCCCCCC;
-  /* Configure PHx pins in Alternate function mode */ 
-  GPIOH->MODER   = 0xAAAA08A0;
-  /* Configure PHx pins speed to 50 MHz */ 
-  GPIOH->OSPEEDR = 0xAAAA08A0;
-  /* Configure PHx pins Output type to push-pull */  
-  GPIOH->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PHx pins */ 
-  GPIOH->PUPDR   = 0x00000000;
-  
-  /* Connect PIx pins to FMC Alternate function */
-  GPIOI->AFR[0]  = 0xCCCCCCCC;
-  GPIOI->AFR[1]  = 0x00000CC0;
-  /* Configure PIx pins in Alternate function mode */ 
-  GPIOI->MODER   = 0x0028AAAA;
-  /* Configure PIx pins speed to 50 MHz */ 
-  GPIOI->OSPEEDR = 0x0028AAAA;
-  /* Configure PIx pins Output type to push-pull */  
-  GPIOI->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PIx pins */ 
-  GPIOI->PUPDR   = 0x00000000;
-#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
-  
-/*-- FMC Configuration -------------------------------------------------------*/
-  /* Enable the FMC interface clock */
-  RCC->AHB3ENR |= 0x00000001;
-  /* Delay after an RCC peripheral clock enabling */
-  tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);
-
-  /* Configure and enable SDRAM bank1 */
-#if defined(STM32F446xx)
-  FMC_Bank5_6->SDCR[0] = 0x00001954;
-#else  
-  FMC_Bank5_6->SDCR[0] = 0x000019E4;
-#endif /* STM32F446xx */
-  FMC_Bank5_6->SDTR[0] = 0x01115351;      
-  
-  /* SDRAM initialization sequence */
-  /* Clock enable command */
-  FMC_Bank5_6->SDCMR = 0x00000011; 
-  tmpreg = FMC_Bank5_6->SDSR & 0x00000020; 
-  while((tmpreg != 0) && (timeout-- > 0))
-  {
-    tmpreg = FMC_Bank5_6->SDSR & 0x00000020; 
-  }
-
-  /* Delay */
-  for (index = 0; index<1000; index++);
-  
-  /* PALL command */
-  FMC_Bank5_6->SDCMR = 0x00000012;           
-  timeout = 0xFFFF;
-  while((tmpreg != 0) && (timeout-- > 0))
-  {
-    tmpreg = FMC_Bank5_6->SDSR & 0x00000020; 
-  }
-  
-  /* Auto refresh command */
-#if defined(STM32F446xx)
-  FMC_Bank5_6->SDCMR = 0x000000F3;
-#else  
-  FMC_Bank5_6->SDCMR = 0x00000073;
-#endif /* STM32F446xx */
-  timeout = 0xFFFF;
-  while((tmpreg != 0) && (timeout-- > 0))
-  {
-    tmpreg = FMC_Bank5_6->SDSR & 0x00000020; 
-  }
- 
-  /* MRD register program */
-#if defined(STM32F446xx)
-  FMC_Bank5_6->SDCMR = 0x00044014;
-#else  
-  FMC_Bank5_6->SDCMR = 0x00046014;
-#endif /* STM32F446xx */
-  timeout = 0xFFFF;
-  while((tmpreg != 0) && (timeout-- > 0))
-  {
-    tmpreg = FMC_Bank5_6->SDSR & 0x00000020; 
-  } 
-  
-  /* Set refresh count */
-  tmpreg = FMC_Bank5_6->SDRTR;
-#if defined(STM32F446xx)
-  FMC_Bank5_6->SDRTR = (tmpreg | (0x0000050C<<1));
-#else    
-  FMC_Bank5_6->SDRTR = (tmpreg | (0x0000027C<<1));
-#endif /* STM32F446xx */
-  
-  /* Disable write protection */
-  tmpreg = FMC_Bank5_6->SDCR[0]; 
-  FMC_Bank5_6->SDCR[0] = (tmpreg & 0xFFFFFDFF);
-#endif /* DATA_IN_ExtSDRAM */
-#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx */
-
-#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)\
- || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)\
- || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx)
-
-#if defined(DATA_IN_ExtSRAM)
-/*-- GPIOs Configuration -----------------------------------------------------*/
-   /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */
-  RCC->AHB1ENR   |= 0x00000078;
-  /* Delay after an RCC peripheral clock enabling */
-  tmp = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIODEN);
-  
-  /* Connect PDx pins to FMC Alternate function */
-  GPIOD->AFR[0]  = 0x00CCC0CC;
-  GPIOD->AFR[1]  = 0xCCCCCCCC;
-  /* Configure PDx pins in Alternate function mode */  
-  GPIOD->MODER   = 0xAAAA0A8A;
-  /* Configure PDx pins speed to 100 MHz */  
-  GPIOD->OSPEEDR = 0xFFFF0FCF;
-  /* Configure PDx pins Output type to push-pull */  
-  GPIOD->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PDx pins */ 
-  GPIOD->PUPDR   = 0x00000000;
-
-  /* Connect PEx pins to FMC Alternate function */
-  GPIOE->AFR[0]  = 0xC00CC0CC;
-  GPIOE->AFR[1]  = 0xCCCCCCCC;
-  /* Configure PEx pins in Alternate function mode */ 
-  GPIOE->MODER   = 0xAAAA828A;
-  /* Configure PEx pins speed to 100 MHz */ 
-  GPIOE->OSPEEDR = 0xFFFFC3CF;
-  /* Configure PEx pins Output type to push-pull */  
-  GPIOE->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PEx pins */ 
-  GPIOE->PUPDR   = 0x00000000;
-
-  /* Connect PFx pins to FMC Alternate function */
-  GPIOF->AFR[0]  = 0x00CCCCCC;
-  GPIOF->AFR[1]  = 0xCCCC0000;
-  /* Configure PFx pins in Alternate function mode */   
-  GPIOF->MODER   = 0xAA000AAA;
-  /* Configure PFx pins speed to 100 MHz */ 
-  GPIOF->OSPEEDR = 0xFF000FFF;
-  /* Configure PFx pins Output type to push-pull */  
-  GPIOF->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PFx pins */ 
-  GPIOF->PUPDR   = 0x00000000;
-
-  /* Connect PGx pins to FMC Alternate function */
-  GPIOG->AFR[0]  = 0x00CCCCCC;
-  GPIOG->AFR[1]  = 0x000000C0;
-  /* Configure PGx pins in Alternate function mode */ 
-  GPIOG->MODER   = 0x00085AAA;
-  /* Configure PGx pins speed to 100 MHz */ 
-  GPIOG->OSPEEDR = 0x000CAFFF;
-  /* Configure PGx pins Output type to push-pull */  
-  GPIOG->OTYPER  = 0x00000000;
-  /* No pull-up, pull-down for PGx pins */ 
-  GPIOG->PUPDR   = 0x00000000;
-  
-/*-- FMC/FSMC Configuration --------------------------------------------------*/
-  /* Enable the FMC/FSMC interface clock */
-  RCC->AHB3ENR         |= 0x00000001;
-
-#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
-  /* Delay after an RCC peripheral clock enabling */
-  tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);
-  /* Configure and enable Bank1_SRAM2 */
-  FMC_Bank1->BTCR[2]  = 0x00001011;
-  FMC_Bank1->BTCR[3]  = 0x00000201;
-  FMC_Bank1E->BWTR[2] = 0x0fffffff;
-#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ 
-#if defined(STM32F469xx) || defined(STM32F479xx)
-  /* Delay after an RCC peripheral clock enabling */
-  tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);
-  /* Configure and enable Bank1_SRAM2 */
-  FMC_Bank1->BTCR[2]  = 0x00001091;
-  FMC_Bank1->BTCR[3]  = 0x00110212;
-  FMC_Bank1E->BWTR[2] = 0x0fffffff;
-#endif /* STM32F469xx || STM32F479xx */
-#if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)\
-   || defined(STM32F412Zx) || defined(STM32F412Vx)
-  /* Delay after an RCC peripheral clock enabling */
-  tmp = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FSMCEN);
-  /* Configure and enable Bank1_SRAM2 */
-  FSMC_Bank1->BTCR[2]  = 0x00001011;
-  FSMC_Bank1->BTCR[3]  = 0x00000201;
-  FSMC_Bank1E->BWTR[2] = 0x0FFFFFFF;
-#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F412Zx || STM32F412Vx */
-
-#endif /* DATA_IN_ExtSRAM */
-#endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
-          STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx  */ 
-  (void)(tmp); 
-}
-#endif /* DATA_IN_ExtSRAM && DATA_IN_ExtSDRAM */
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0 - 27
esp_flasher/lib/esp-serial-flasher/examples/zephyr_example/CMakeLists.txt

@@ -1,27 +0,0 @@
-# SPDX-License-Identifier: Apache-2.0
-
-cmake_minimum_required(VERSION 3.20.0)
-
-find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
-project(zephyr_flasher)
-
-zephyr_compile_definitions_ifdef(CONFIG_SERIAL_FLASHER_MD5_ENABLED MD5_ENABLED)
-
-zephyr_library_sources(
-  ../common/example_common.c
-  )
-
-zephyr_library_include_directories(
-  ../common
-  ../binaries
-  )
-
-# Needed for example_common
-add_compile_definitions(SERIAL_FLASHER_INTERFACE_UART)
-
-# Embed binaries into the app.
-include(${CMAKE_CURRENT_LIST_DIR}/../common/bin2array.cmake)
-create_resources(${CMAKE_CURRENT_LIST_DIR}/../binaries/Hello-world ${CMAKE_BINARY_DIR}/binaries.c)
-set_property(SOURCE ${CMAKE_BINARY_DIR}/binaries.c PROPERTY GENERATED 1)
-
-target_sources(app PRIVATE src/main.c  ${CMAKE_BINARY_DIR}/binaries.c)

+ 0 - 84
esp_flasher/lib/esp-serial-flasher/examples/zephyr_example/README.md

@@ -1,84 +0,0 @@
-# ESP32 Zephyr example
-
-## Overview
-
-This sample code demonstrates how to flash ESP32/ESP32-S2/ESP8266 from another (host) MCU using
-esp_serial_flash component API. In this case, ESP32 is also used as host MCU.
-Binaries to be flashed from host MCU to another Espressif SoC can be found in `binaries` folder
-and are converted into C-array during build process.
-
-Following steps are performed in order to re-program target's memory:
-
-1. Peripherals are initialized (GPIO for BOOT and EN pins and UART).
-2. UART1 (can be changed) through which new binary will be transfered is initialized.
-3. Host puts slave device into boot mode tries to connect by calling `esp_loader_connect()`.
-4. Binary file is opened and its size is acquired, as it has to be known before flashing.
-5. Then `esp_loader_flash_start()` is called to enter flashing mode and erase amount of memory to be flashed.
-6. `esp_loader_flash_write()` function is called repeatedly until the whole binary image is transfered.
-
-Note: In addition, to steps mentioned above, `esp_loader_change_transmission_rate`  is called after connection
-is established in order to increase flashing speed. This does not apply for ESP8266, as its bootloader
-does not support this command. However, ESP8266 is capable of detecting baud rate during connection
-phase, and can be changed before calling `esp_loader_connect`, if necessary.
-
-## Hardware Required
-
-* Two development boards with ESP32 SoC (e.g., ESP32-DevKitC, ESP-WROVER-KIT, etc.).
-* One or two USB cables for power supply and programming.
-
-## Hardware connection
-
-Table below shows connection between two ESP32 devices.
-
-| ESP32 (host) | ESP32 (slave) |
-|:------------:|:-------------:|
-|    IO4       |      IO0      |
-|    IO2       |     RESET     |
-|    IO9       |      TX0      |
-|    IO10      |      RX0      |
-
-Note: interconnection is the same for all three targets (slaves).
-
-## Build and flash
-
-To run the example, type the following command:
-
-```c
-west build -p -b esp32
-west flash
-west espressif monitor
-```
-
-(To exit the serial monitor, type ``ctrl-c``.)
-
-For more information, check [Zephyr's Getting Started](https://docs.zephyrproject.org/latest/develop/getting_started/index.html)
-
-## Configuration
-
-For details about available configuration option, please refer to top level [README.md](../../README.md).
-Compile definitions can be specified in `prj.conf` file.
-
-Binaries to be flashed are placed in separate folder (binaries.c) for each possible target and converted to C-array. Without explicitly enabling MD5 check, flash integrity verification is disabled by default.
-
-## Example output
-
-Here is the example's console output:
-
-```
-*** Booting Zephyr OS build zephyr-v3.2.0-3548-ga1bb9c9d1736 ***
-Running ESP Flasher from Zephyr
-Connected to target
-Baudrate changed
-Erasing flash (this may take a while)...
-Start programming
-Progress: 100 %
-Finished programming
-Erasing flash (this may take a while)...
-Start programming
-Progress: 100 %
-Finished programming
-Erasing flash (this may take a while)...
-Start programming
-Progress: 100 %
-Finished programming
-```

+ 0 - 34
esp_flasher/lib/esp-serial-flasher/examples/zephyr_example/boards/esp32.overlay

@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
- *
- * SPDX-License-Identifier: Apache-2.0
- */
-
-#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
-#include <dt-bindings/pinctrl/esp32-pinctrl.h>
-#include <zephyr/dt-bindings/pinctrl/esp32-gpio-sigmap.h>
-
-/ {
-	aliases {
-		en = &en_button;
-		boot = &boot_button;
-		uart1 = &uart1;
-	};
-
-	gpio_keys {
-		compatible = "gpio-keys";
-		en_button: en_button {
-			gpios = <&gpio0 2 (GPIO_PULL_UP | GPIO_ACTIVE_HIGH)>;
-		};
-		boot_button: boot_button {
-			gpios = <&gpio0 4 (GPIO_PULL_UP | GPIO_ACTIVE_HIGH)>;
-		};
-	};
-};
-
-&uart1 {
-	status = "okay";
-	current-speed = <115200>;
-	pinctrl-0 = <&uart1_default>;
-	pinctrl-names = "default";
-};

+ 0 - 4
esp_flasher/lib/esp-serial-flasher/examples/zephyr_example/prj.conf

@@ -1,4 +0,0 @@
-# nothing here
-CONFIG_CONSOLE=y
-CONFIG_CONSOLE_GETCHAR=y
-CONFIG_NEWLIB_LIBC=y

+ 0 - 7
esp_flasher/lib/esp-serial-flasher/examples/zephyr_example/sample.yaml

@@ -1,7 +0,0 @@
-sample:
-  description: ESP Serial Flasher sample code
-  name: zephyr_flasher
-tests:
-  sample.esp_flasher.zephyr_example:
-    platform_allow: esp32
-    tags: esp32

+ 0 - 81
esp_flasher/lib/esp-serial-flasher/examples/zephyr_example/src/main.c

@@ -1,81 +0,0 @@
-/*
- * ESP Flasher Library Example for Zephyr
- * Written in 2022 by KT-Elektronik, Klaucke und Partner GmbH
- * This example code is in the Public Domain (or CC0 licensed, at your option.)
- * Unless required by applicable law or agreed to in writing, this
- * software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied.
- *
- * Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
- */
-
-#include <zephyr/kernel.h>
-#include <zephyr/device.h>
-#include <zephyr/devicetree.h>
-#include <zephyr/drivers/gpio.h>
-#include <zephyr/sys/util.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <zephyr_port.h>
-#include <esp_loader.h>
-#include "example_common.h"
-
-#define HIGHER_BAUDRATE 230400
-#define DEFAULT_BAUDRATE 115200
-
-/* Get UART DTS entry used as flash interface */
-static const struct device *esp_uart_dev = DEVICE_DT_GET(DT_ALIAS(uart1));
-/* Get GPIO pin connected to the ESP's enable pin. */
-static const struct gpio_dt_spec esp_enable_spec = GPIO_DT_SPEC_GET(DT_ALIAS(en), gpios);
-/* Get GPIO pin  connected to the ESP's boot pin. */
-static const struct gpio_dt_spec esp_boot_spec = GPIO_DT_SPEC_GET(DT_ALIAS(boot), gpios);
-
-void main(void)
-{
-	example_binaries_t bin;
-
-	const loader_zephyr_config_t config = {
-		.uart_dev = esp_uart_dev,
-		.enable_spec = esp_enable_spec,
-		.boot_spec = esp_boot_spec
-	};
-
-	printk("Running ESP Flasher from Zephyr\r\n");
-
-	if (!device_is_ready(esp_uart_dev)) {
-		printk("ESP UART not ready");
-		return;
-	}
-
-	if (!device_is_ready(esp_boot_spec.port)) {
-		printk("ESP boot GPIO not ready");
-		return;
-	}
-
-	if (!device_is_ready(esp_enable_spec.port)) {
-		printk("Bluetooth Enable GPIO not ready");
-		return;
-	}
-
-	gpio_pin_configure_dt(&esp_boot_spec, GPIO_OUTPUT_ACTIVE);
-	gpio_pin_configure_dt(&esp_enable_spec, GPIO_OUTPUT_INACTIVE);
-
-	if (loader_port_zephyr_init(&config) != ESP_LOADER_SUCCESS) {
-		printk("ESP loader init failed");
-		return;
-	}
-
-	if (connect_to_target(HIGHER_BAUDRATE) == ESP_LOADER_SUCCESS) {
-
-		get_example_binaries(esp_loader_get_target(), &bin);
-
-		flash_binary(bin.boot.data, bin.boot.size, bin.boot.addr);
-		flash_binary(bin.part.data, bin.part.size, bin.part.addr);
-		flash_binary(bin.app.data,  bin.app.size,  bin.app.addr);
-	}
-
-	loader_port_change_transmission_rate(DEFAULT_BAUDRATE);
-
-	loader_port_reset_target();
-}

+ 0 - 3
esp_flasher/lib/esp-serial-flasher/idf_component.yml

@@ -1,3 +0,0 @@
-version: "0.2.0"
-description: Serial flasher component provides portable library for flashing or loading ram loadble app to Espressif SoCs from other host microcontroller
-url: https://github.com/espressif/esp-serial-flasher

+ 0 - 313
esp_flasher/lib/esp-serial-flasher/include/esp_loader.h

@@ -1,313 +0,0 @@
-/* Copyright 2020-2023 Espressif Systems (Shanghai) CO LTD
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <stdint.h>
-#include <stdbool.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Used for backwards compatibility with the previous API */
-#define esp_loader_change_baudrate esp_loader_change_transmission_rate
-
-/**
- * Macro which can be used to check the error code,
- * and return in case the code is not ESP_LOADER_SUCCESS.
- */
-#define RETURN_ON_ERROR(x) do {         \
-    esp_loader_error_t _err_ = (x);     \
-    if (_err_ != ESP_LOADER_SUCCESS) {  \
-        return _err_;                   \
-    }                                   \
-} while(0)
-
-/**
- * @brief Error codes
- */
-typedef enum {
-    ESP_LOADER_SUCCESS,                /*!< Success */
-    ESP_LOADER_ERROR_FAIL,             /*!< Unspecified error */
-    ESP_LOADER_ERROR_TIMEOUT,          /*!< Timeout elapsed */
-    ESP_LOADER_ERROR_IMAGE_SIZE,       /*!< Image size to flash is larger than flash size */
-    ESP_LOADER_ERROR_INVALID_MD5,      /*!< Computed and received MD5 does not match */
-    ESP_LOADER_ERROR_INVALID_PARAM,    /*!< Invalid parameter passed to function */
-    ESP_LOADER_ERROR_INVALID_TARGET,   /*!< Connected target is invalid */
-    ESP_LOADER_ERROR_UNSUPPORTED_CHIP, /*!< Attached chip is not supported */
-    ESP_LOADER_ERROR_UNSUPPORTED_FUNC, /*!< Function is not supported on attached target */
-    ESP_LOADER_ERROR_INVALID_RESPONSE  /*!< Internal error */
-} esp_loader_error_t;
-
-/**
- * @brief Supported targets
- */
-typedef enum {
-    ESP8266_CHIP = 0,
-    ESP32_CHIP   = 1,
-    ESP32S2_CHIP = 2,
-    ESP32C3_CHIP = 3,
-    ESP32S3_CHIP = 4,
-    ESP32C2_CHIP = 5,
-    ESP32H4_CHIP = 6,
-    ESP32H2_CHIP = 7,
-    ESP_MAX_CHIP = 8,
-    ESP_UNKNOWN_CHIP = 8
-} target_chip_t;
-
-/**
- * @brief Application binary header
- */
-typedef struct {
-  uint8_t magic;
-  uint8_t segments;
-  uint8_t flash_mode;
-  uint8_t flash_size_freq;
-  uint32_t entrypoint;
-} esp_loader_bin_header_t;
-
-/**
- * @brief Segment binary header
- */
-typedef struct {
-    uint32_t addr;
-    uint32_t size;
-    uint8_t *data;
-} esp_loader_bin_segment_t;
-
-/**
- * @brief SPI pin configuration arguments
- */
-typedef union {
-    struct {
-        uint32_t pin_clk: 6;
-        uint32_t pin_q:   6;
-        uint32_t pin_d:   6;
-        uint32_t pin_cs:  6;
-        uint32_t pin_hd:  6;
-        uint32_t zero:    2;
-    };
-    uint32_t val;
-} esp_loader_spi_config_t;
-
-/**
- * @brief Connection arguments
- */
-typedef struct {
-    uint32_t sync_timeout;  /*!< Maximum time to wait for response from serial interface. */
-    int32_t trials;         /*!< Number of trials to connect to target. If greater than 1,
-                               100 millisecond delay is inserted after each try. */
-} esp_loader_connect_args_t;
-
-#define ESP_LOADER_CONNECT_DEFAULT() { \
-  .sync_timeout = 100, \
-  .trials = 10, \
-}
-
-/**
-  * @brief Connects to the target
-  *
-  * @param connect_args[in] Timing parameters to be used for connecting to target.
-  *
-  * @return
-  *     - ESP_LOADER_SUCCESS Success
-  *     - ESP_LOADER_ERROR_TIMEOUT Timeout
-  *     - ESP_LOADER_ERROR_INVALID_RESPONSE Internal error
-  */
-esp_loader_error_t esp_loader_connect(esp_loader_connect_args_t *connect_args);
-
-/**
-  * @brief   Returns attached target chip.
-  *
-  * @warning This function can only be called after connection with target
-  *          has been successfully established by calling esp_loader_connect().
-  *
-  * @return  One of target_chip_t
-  */
-target_chip_t esp_loader_get_target(void);
-
-
-#ifdef SERIAL_FLASHER_INTERFACE_UART
-/**
-  * @brief Initiates flash operation
-  *
-  * @param offset[in]       Address from which flash operation will be performed.
-  * @param image_size[in]   Size of the whole binary to be loaded into flash.
-  * @param block_size[in]   Size of buffer used in subsequent calls to esp_loader_flash_write.
-  *
-  * @note  image_size is size of the whole image, whereas, block_size is chunk of data sent
-  *        to the target, each time esp_loader_flash_write function is called.
-  *
-  * @return
-  *     - ESP_LOADER_SUCCESS Success
-  *     - ESP_LOADER_ERROR_TIMEOUT Timeout
-  *     - ESP_LOADER_ERROR_INVALID_RESPONSE Internal error
-  */
-esp_loader_error_t esp_loader_flash_start(uint32_t offset, uint32_t image_size, uint32_t block_size);
-
-/**
-  * @brief Writes supplied data to target's flash memory.
-  *
-  * @param payload[in]      Data to be flashed into target's memory.
-  * @param size[in]         Size of payload in bytes.
-  *
-  * @note  size must not be greater that block_size supplied to previously called
-  *        esp_loader_flash_start function. If size is less than block_size,
-  *        remaining bytes of payload buffer will be padded with 0xff.
-  *        Therefore, size of payload buffer has to be equal or greater than block_size.
-  *
-  * @return
-  *     - ESP_LOADER_SUCCESS Success
-  *     - ESP_LOADER_ERROR_TIMEOUT Timeout
-  *     - ESP_LOADER_ERROR_INVALID_RESPONSE Internal error
-  */
-esp_loader_error_t esp_loader_flash_write(void *payload, uint32_t size);
-
-/**
-  * @brief Ends flash operation.
-  *
-  * @param reboot[in]       reboot the target if true.
-  *
-  * @return
-  *     - ESP_LOADER_SUCCESS Success
-  *     - ESP_LOADER_ERROR_TIMEOUT Timeout
-  *     - ESP_LOADER_ERROR_INVALID_RESPONSE Internal error
-  */
-esp_loader_error_t esp_loader_flash_finish(bool reboot);
-#endif /* SERIAL_FLASHER_INTERFACE_UART */
-
-
-/**
-  * @brief Initiates mem operation, initiates loading for program into target RAM
-  *
-  * @param offset[in]       Address from which mem operation will be performed.
-  * @param size[in]         Size of the whole binary to be loaded into mem.
-  * @param block_size[in]   Size of buffer used in subsequent calls to esp_loader_mem_write.
-  *
-  * @note  image_size is size of the whole image, whereas, block_size is chunk of data sent
-  *        to the target, each time esp_mem_flash_write function is called.
-  *
-  * @return
-  *     - ESP_LOADER_SUCCESS Success
-  *     - ESP_LOADER_ERROR_TIMEOUT Timeout
-  *     - ESP_LOADER_ERROR_INVALID_RESPONSE Internal error
-  */
-esp_loader_error_t esp_loader_mem_start(uint32_t offset, uint32_t size, uint32_t block_size);
-
-
-/**
-  * @brief Writes supplied data to target's mem memory.
-  *
-  * @param payload[in]      Data to be loaded into target's memory.
-  * @param size[in]         Size of data in bytes.
-  *
-  * @note  size must not be greater that block_size supplied to previously called
-  *        esp_loader_mem_start function.
-  *        Therefore, size of data buffer has to be equal or greater than block_size.
-  *
-  * @return
-  *     - ESP_LOADER_SUCCESS Success
-  *     - ESP_LOADER_ERROR_TIMEOUT Timeout
-  *     - ESP_LOADER_ERROR_INVALID_RESPONSE Internal error
-  */
-esp_loader_error_t esp_loader_mem_write(const void *payload, uint32_t size);
-
-
-/**
-  * @brief Ends mem operation, finish loading for program into target RAM
-  *        and send the entrypoint of ram_loadable app
-  *
-  * @param entrypoint[in]       entrypoint of ram program.
-  *
-  * @return
-  *     - ESP_LOADER_SUCCESS Success
-  *     - ESP_LOADER_ERROR_TIMEOUT Timeout
-  *     - ESP_LOADER_ERROR_INVALID_RESPONSE Internal error
-  */
-esp_loader_error_t esp_loader_mem_finish(uint32_t entrypoint);
-
-
-/**
-  * @brief Writes register.
-  *
-  * @param address[in]      Address of register.
-  * @param reg_value[in]    New register value.
-  *
-  * @return
-  *     - ESP_LOADER_SUCCESS Success
-  *     - ESP_LOADER_ERROR_TIMEOUT Timeout
-  *     - ESP_LOADER_ERROR_INVALID_RESPONSE Internal error
-  */
-esp_loader_error_t esp_loader_write_register(uint32_t address, uint32_t reg_value);
-
-/**
-  * @brief Reads register.
-  *
-  * @param address[in]      Address of register.
-  * @param reg_value[out]   Register value.
-  *
-  * @return
-  *     - ESP_LOADER_SUCCESS Success
-  *     - ESP_LOADER_ERROR_TIMEOUT Timeout
-  *     - ESP_LOADER_ERROR_INVALID_RESPONSE Internal error
-  */
-esp_loader_error_t esp_loader_read_register(uint32_t address, uint32_t *reg_value);
-
-/**
-  * @brief Change baud rate.
-  *
-  * @note  Baud rate has to be also adjusted accordingly on host MCU, as
-  *        target's baud rate is changed upon return from this function.
-  *
-  * @param transmission_rate[in]     new baud rate to be set.
-  *
-  * @return
-  *     - ESP_LOADER_SUCCESS Success
-  *     - ESP_LOADER_ERROR_TIMEOUT Timeout
-  *     - ESP_LOADER_ERROR_INVALID_RESPONSE Internal error
-  *     - ESP_LOADER_ERROR_UNSUPPORTED_FUNC Unsupported on the target
-  */
-esp_loader_error_t esp_loader_change_transmission_rate(uint32_t transmission_rate);
-
-/**
-  * @brief Verify target's flash integrity by checking MD5.
-  *        MD5 checksum is computed from data pushed to target's memory by calling
-  *        esp_loader_flash_write() function and compared against target's MD5.
-  *        Target computes checksum based on offset and image_size passed to
-  *        esp_loader_flash_start() function.
-  *
-  * @note  This function is only available if MD5_ENABLED is set.
-  *
-  * @return
-  *     - ESP_LOADER_SUCCESS Success
-  *     - ESP_LOADER_ERROR_INVALID_MD5 MD5 does not match
-  *     - ESP_LOADER_ERROR_TIMEOUT Timeout
-  *     - ESP_LOADER_ERROR_INVALID_RESPONSE Internal error
-  *     - ESP_LOADER_ERROR_UNSUPPORTED_FUNC Unsupported on the target
-  */
-#if MD5_ENABLED
-esp_loader_error_t esp_loader_flash_verify(void);
-#endif
-/**
-  * @brief Toggles reset pin.
-  */
-void esp_loader_reset_target(void);
-
-
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 112
esp_flasher/lib/esp-serial-flasher/include/esp_loader_io.h

@@ -1,112 +0,0 @@
-/* Copyright 2020-2023 Espressif Systems (Shanghai) CO LTD
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
- #pragma once
-
-#include <stdint.h>
-#include "esp_loader.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
-  * @brief Changes the transmission rate of the used peripheral.
-  */
-esp_loader_error_t loader_port_change_transmission_rate(uint32_t transmission_rate);
-
-/**
-  * @brief Writes data over the io interface.
-  *
-  * @param data[in]     Buffer with data to be written.
-  * @param size[in]     Size of data in bytes.
-  * @param timeout[in]  Timeout in milliseconds.
-  *
-  * @return
-  *     - ESP_LOADER_SUCCESS Success
-  *     - ESP_LOADER_ERROR_TIMEOUT Timeout elapsed
-  */
-esp_loader_error_t loader_port_write(const uint8_t *data, uint16_t size, uint32_t timeout);
-
-/**
-  * @brief Reads data from the io interface.
-  *
-  * @param data[out]    Buffer into which received data will be written.
-  * @param size[in]     Number of bytes to read.
-  * @param timeout[in]  Timeout in milliseconds.
-  *
-  * @return
-  *     - ESP_LOADER_SUCCESS Success
-  *     - ESP_LOADER_ERROR_TIMEOUT Timeout elapsed
-  */
-esp_loader_error_t loader_port_read(uint8_t *data, uint16_t size, uint32_t timeout);
-
-/**
-  * @brief Delay in milliseconds.
-  *
-  * @param ms[in]   Number of milliseconds.
-  *
-  */
-void loader_port_delay_ms(uint32_t ms);
-
-/**
-  * @brief Starts timeout timer.
-  *
-  * @param ms[in]   Number of milliseconds.
-  *
-  */
-void loader_port_start_timer(uint32_t ms);
-
-/**
-  * @brief Returns remaining time since timer was started by calling esp_loader_start_timer.
-  *        0 if timer has elapsed.
-  *
-  * @return   Number of milliseconds.
-  *
-  */
-uint32_t loader_port_remaining_time(void);
-
-/**
-  * @brief Asserts bootstrap pins to enter boot mode and toggles reset pin.
-  *
-  * @note  Reset pin should stay asserted for at least 20 milliseconds.
-  */
-void loader_port_enter_bootloader(void);
-
-/**
-  * @brief Toggles reset pin.
-  *
-  * @note  Reset pin should stay asserted for at least 20 milliseconds.
-  */
-void loader_port_reset_target(void);
-
-/**
-  * @brief Function can be defined by user to print debug message.
-  *
-  * @note  Empty weak function is used, otherwise.
-  *
-  */
-void loader_port_debug_print(const char *str);
-
-#ifdef SERIAL_FLASHER_INTERFACE_SPI
-/**
-  * @brief Sets the chip select to a defined level
-  */
-void loader_port_spi_set_cs(uint32_t level);
-#endif /* SERIAL_FLASHER_INTERFACE_SPI */
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 24
esp_flasher/lib/esp-serial-flasher/include/serial_io.h

@@ -1,24 +0,0 @@
-/* Copyright 2020-2023 Espressif Systems (Shanghai) CO LTD
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#warning Please replace serial_io.h with esp_loader_io.h and change the function names \
-         to match the new API
-
-/* Defines used to avoid breaking existing ports */
-#define loader_port_change_baudrate loader_port_change_transmission_rate
-#define loader_port_serial_write loader_port_write
-#define loader_port_serial_read loader_port_read
-
-#include "esp_loader_io.h"

+ 0 - 181
esp_flasher/lib/esp-serial-flasher/port/esp32_port.c

@@ -1,181 +0,0 @@
-/* Copyright 2020-2023 Espressif Systems (Shanghai) CO LTD
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "esp32_port.h"
-#include "driver/uart.h"
-#include "driver/gpio.h"
-#include "esp_timer.h"
-#include "esp_log.h"
-#include "esp_idf_version.h"
-#include <unistd.h>
-
-#ifdef SERIAL_FLASHER_DEBUG_TRACE
-static void transfer_debug_print(const uint8_t *data, uint16_t size, bool write)
-{
-    static bool write_prev = false;
-
-    if (write_prev != write) {
-        write_prev = write;
-        printf("\n--- %s ---\n", write ? "WRITE" : "READ");
-    }
-
-    for (uint32_t i = 0; i < size; i++) {
-        printf("%02x ", data[i]);
-    }
-}
-#endif
-
-static int64_t s_time_end;
-static int32_t s_uart_port;
-static int32_t s_reset_trigger_pin;
-static int32_t s_gpio0_trigger_pin;
-
-esp_loader_error_t loader_port_esp32_init(const loader_esp32_config_t *config)
-{
-    s_uart_port = config->uart_port;
-    s_reset_trigger_pin = config->reset_trigger_pin;
-    s_gpio0_trigger_pin = config->gpio0_trigger_pin;
-
-    // Initialize UART
-    uart_config_t uart_config = {
-        .baud_rate = config->baud_rate,
-        .data_bits = UART_DATA_8_BITS,
-        .parity    = UART_PARITY_DISABLE,
-        .stop_bits = UART_STOP_BITS_1,
-        .flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
-#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
-        .source_clk = UART_SCLK_DEFAULT,
-#endif
-    };
-
-    int rx_buffer_size = config->rx_buffer_size ? config->rx_buffer_size : 400;
-    int tx_buffer_size = config->tx_buffer_size ? config->tx_buffer_size : 400;
-    QueueHandle_t *uart_queue = config->uart_queue ? config->uart_queue : NULL;
-    int queue_size = config->queue_size ? config->queue_size : 0;
-
-    if ( uart_param_config(s_uart_port, &uart_config) != ESP_OK ) {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-    if ( uart_set_pin(s_uart_port, config->uart_tx_pin, config->uart_rx_pin, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE) != ESP_OK ) {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-    if ( uart_driver_install(s_uart_port, rx_buffer_size, tx_buffer_size, queue_size, uart_queue, 0) != ESP_OK ) {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-
-    // Initialize boot pin selection pins
-    gpio_reset_pin(s_reset_trigger_pin);
-    gpio_set_pull_mode(s_reset_trigger_pin, GPIO_PULLUP_ONLY);
-    gpio_set_direction(s_reset_trigger_pin, GPIO_MODE_OUTPUT);
-
-    gpio_reset_pin(s_gpio0_trigger_pin);
-    gpio_set_pull_mode(s_gpio0_trigger_pin, GPIO_PULLUP_ONLY);
-    gpio_set_direction(s_gpio0_trigger_pin, GPIO_MODE_OUTPUT);
-
-    return ESP_LOADER_SUCCESS;
-}
-
-void loader_port_esp32_deinit(void)
-{
-    uart_driver_delete(s_uart_port);
-}
-
-
-esp_loader_error_t loader_port_write(const uint8_t *data, uint16_t size, uint32_t timeout)
-{
-    uart_write_bytes(s_uart_port, (const char *)data, size);
-    esp_err_t err = uart_wait_tx_done(s_uart_port, timeout);
-
-    if (err == ESP_OK) {
-#ifdef SERIAL_FLASHER_DEBUG_TRACE
-        transfer_debug_print(data, size, true);
-#endif
-        return ESP_LOADER_SUCCESS;
-    } else if (err == ESP_ERR_TIMEOUT) {
-        return ESP_LOADER_ERROR_TIMEOUT;
-    } else {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-}
-
-
-esp_loader_error_t loader_port_read(uint8_t *data, uint16_t size, uint32_t timeout)
-{
-    int read = uart_read_bytes(s_uart_port, data, size, timeout);
-
-    if (read < 0) {
-        return ESP_LOADER_ERROR_FAIL;
-    } else if (read < size) {
-#ifdef SERIAL_FLASHER_DEBUG_TRACE
-        transfer_debug_print(data, read, false);
-#endif
-        return ESP_LOADER_ERROR_TIMEOUT;
-    } else {
-#ifdef SERIAL_FLASHER_DEBUG_TRACE
-        transfer_debug_print(data, read, false);
-#endif
-        return ESP_LOADER_SUCCESS;
-    }
-}
-
-
-// Set GPIO0 LOW, then
-// assert reset pin for 50 milliseconds.
-void loader_port_enter_bootloader(void)
-{
-    gpio_set_level(s_gpio0_trigger_pin, 0);
-    loader_port_reset_target();
-    loader_port_delay_ms(SERIAL_FLASHER_BOOT_HOLD_TIME_MS);
-    gpio_set_level(s_gpio0_trigger_pin, 1);
-}
-
-
-void loader_port_reset_target(void)
-{
-    gpio_set_level(s_reset_trigger_pin, 0);
-    loader_port_delay_ms(SERIAL_FLASHER_RESET_HOLD_TIME_MS);
-    gpio_set_level(s_reset_trigger_pin, 1);
-}
-
-
-void loader_port_delay_ms(uint32_t ms)
-{
-    usleep(ms * 1000);
-}
-
-
-void loader_port_start_timer(uint32_t ms)
-{
-    s_time_end = esp_timer_get_time() + ms * 1000;
-}
-
-
-uint32_t loader_port_remaining_time(void)
-{
-    int64_t remaining = (s_time_end - esp_timer_get_time()) / 1000;
-    return (remaining > 0) ? (uint32_t)remaining : 0;
-}
-
-
-void loader_port_debug_print(const char *str)
-{
-    printf("DEBUG: %s\n", str);
-}
-
-esp_loader_error_t loader_port_change_transmission_rate(uint32_t baudrate)
-{
-    esp_err_t err = uart_set_baudrate(s_uart_port, baudrate);
-    return (err == ESP_OK) ? ESP_LOADER_SUCCESS : ESP_LOADER_ERROR_FAIL;
-}

+ 0 - 59
esp_flasher/lib/esp-serial-flasher/port/esp32_port.h

@@ -1,59 +0,0 @@
-/* Copyright 2020-2023 Espressif Systems (Shanghai) CO LTD
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
- #pragma once
-
-#include "esp_loader_io.h"
-#include "freertos/FreeRTOS.h"
-#include "freertos/queue.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct
-{
-  uint32_t baud_rate;     /*!< Initial baud rate, can be changed later */
-  uint32_t uart_port;     /*!< UART port */
-  uint32_t uart_rx_pin;   /*!< This pin will be configured as UART Rx pin */
-  uint32_t uart_tx_pin;   /*!< This pin will be configured as UART Tx pin */
-  uint32_t reset_trigger_pin; /*!< This pin will be used to reset target chip */
-  uint32_t gpio0_trigger_pin; /*!< This pin will be used to toggle set IO0 of target chip */
-  uint32_t rx_buffer_size;    /*!< Set to zero for default RX buffer size */
-  uint32_t tx_buffer_size;    /*!< Set to zero for default TX buffer size */
-  uint32_t queue_size;        /*!< Set to zero for default UART queue size */
-  QueueHandle_t *uart_queue;  /*!< Set to NULL, if UART queue handle is not
-                                   necessary. Otherwise, it will be assigned here */
-} loader_esp32_config_t;
-
-/**
-  * @brief Initializes serial interface.
-  *
-  * @param baud_rate[in]       Communication speed.
-  *
-  * @return
-  *     - ESP_LOADER_SUCCESS Success
-  *     - ESP_LOADER_ERROR_FAIL Initialization failure
-  */
-esp_loader_error_t loader_port_esp32_init(const loader_esp32_config_t *config);
-
-/**
-  * @brief Deinitialize serial interface.
-  */
-void loader_port_esp32_deinit(void);
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 298
esp_flasher/lib/esp-serial-flasher/port/esp32_spi_port.c

@@ -1,298 +0,0 @@
-/* Copyright 2020-2023 Espressif Systems (Shanghai) CO LTD
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "esp32_spi_port.h"
-#include "esp_log.h"
-#include "driver/gpio.h"
-#include "esp_timer.h"
-#include "esp_log.h"
-#include "esp_idf_version.h"
-#include <unistd.h>
-
-// #define SERIAL_DEBUG_ENABLE
-
-#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 3, 0)
-#define DMA_CHAN SPI_DMA_CH_AUTO
-#else
-#define DMA_CHAN 1
-#endif
-
-#define WORD_ALIGNED(ptr) ((size_t)ptr % sizeof(size_t) == 0)
-
-#ifdef SERIAL_DEBUG_ENABLE
-
-static void dec_to_hex_str(const uint8_t dec, uint8_t hex_str[3])
-{
-    static const uint8_t dec_to_hex[] = {
-        '0', '1', '2', '3', '4', '5', '6', '7',
-        '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
-    };
-
-    hex_str[0] = dec_to_hex[dec >> 4];
-    hex_str[1] = dec_to_hex[dec & 0xF];
-    hex_str[2] = '\0';
-}
-
-static void serial_debug_print(const uint8_t *data, uint16_t size, bool write)
-{
-    static bool write_prev = false;
-    uint8_t hex_str[3];
-
-    if(write_prev != write) {
-        write_prev = write;
-        printf("\n--- %s ---\n", write ? "WRITE" : "READ");
-    }
-
-    for(uint32_t i = 0; i < size; i++) {
-        dec_to_hex_str(data[i], hex_str);
-        printf("%s ", hex_str);
-    }
-}
-
-#else
-static void serial_debug_print(const uint8_t *data, uint16_t size, bool write) { }
-#endif
-
-static spi_host_device_t s_spi_bus;
-static spi_bus_config_t s_spi_config;
-static spi_device_handle_t s_device_h;
-static spi_device_interface_config_t s_device_config;
-static int64_t s_time_end;
-static uint32_t s_reset_trigger_pin;
-static uint32_t s_strap_bit0_pin;
-static uint32_t s_strap_bit1_pin;
-static uint32_t s_strap_bit2_pin;
-static uint32_t s_strap_bit3_pin;
-static uint32_t s_spi_cs_pin;
-
-esp_loader_error_t loader_port_esp32_spi_init(const loader_esp32_spi_config_t *config)
-{
-    /* Initialize the global static variables*/
-    s_spi_bus = config->spi_bus;
-    s_reset_trigger_pin = config->reset_trigger_pin;
-    s_strap_bit0_pin = config->strap_bit0_pin;
-    s_strap_bit1_pin = config->strap_bit1_pin;
-    s_strap_bit2_pin = config->strap_bit2_pin;
-    s_strap_bit3_pin = config->strap_bit3_pin;
-    s_spi_cs_pin = config->spi_cs_pin;
-
-    /* Configure and initialize the SPI bus*/
-    s_spi_config.mosi_io_num = config->spi_mosi_pin;
-    s_spi_config.miso_io_num = config->spi_miso_pin;
-    s_spi_config.sclk_io_num = config->spi_clk_pin;
-    s_spi_config.quadwp_io_num = config->spi_quadwp_pin;
-    s_spi_config.quadhd_io_num = config->spi_quadhd_pin;
-    s_spi_config.max_transfer_sz = 4096 * 4;
-
-    if (spi_bus_initialize(s_spi_bus, &s_spi_config, DMA_CHAN) != ESP_OK) {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-
-    /* Configure and add the device */
-    s_device_config.clock_speed_hz = config->frequency;
-    s_device_config.spics_io_num = -1; /* We're using the chip select pin as GPIO as we need to
-                                          chain multiple transactions with CS pulled down */
-    s_device_config.flags = SPI_DEVICE_HALFDUPLEX;
-    s_device_config.queue_size = 16;
-
-    if (spi_bus_add_device(s_spi_bus, &s_device_config, &s_device_h) != ESP_OK) {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-
-    /* Initialize the pins except for the strapping ones */
-    gpio_reset_pin(s_reset_trigger_pin);
-    gpio_set_pull_mode(s_reset_trigger_pin, GPIO_PULLUP_ONLY);
-    gpio_set_direction(s_reset_trigger_pin, GPIO_MODE_OUTPUT);
-    gpio_set_level(s_reset_trigger_pin, 1);
-
-    gpio_reset_pin(s_spi_cs_pin);
-    gpio_set_pull_mode(s_spi_cs_pin, GPIO_PULLUP_ONLY);
-    gpio_set_direction(s_spi_cs_pin, GPIO_MODE_OUTPUT);
-    gpio_set_level(s_spi_cs_pin, 1);
-
-    return ESP_LOADER_SUCCESS;
-}
-
-
-void loader_port_esp32_spi_deinit(void)
-{
-    gpio_reset_pin(s_reset_trigger_pin);
-    gpio_reset_pin(s_spi_cs_pin);
-    spi_bus_remove_device(s_device_h);
-    spi_bus_free(s_spi_bus);
-}
-
-
-void loader_port_spi_set_cs(const uint32_t level) {
-    gpio_set_level(s_spi_cs_pin, level);
-}
-
-
-esp_loader_error_t loader_port_write(const uint8_t *data, const uint16_t size, const uint32_t timeout)
-{
-    /* Due to the fact that the SPI driver uses DMA for larger transfers,
-       and the DMA requirements, the buffer must be word aligned */
-    if (data == NULL || !WORD_ALIGNED(data)) {
-        return ESP_LOADER_ERROR_INVALID_PARAM;
-    }
-
-    serial_debug_print(data, size, true);
-
-    spi_transaction_t transaction = {
-        .tx_buffer = data,
-        .rx_buffer = NULL,
-        .length = size * 8U,
-        .rxlength = 0,
-    };
-
-    esp_err_t err = spi_device_transmit(s_device_h, &transaction);
-
-    if (err == ESP_OK) {
-        serial_debug_print(data, size, false);
-        return ESP_LOADER_SUCCESS;
-    } else if (err == ESP_ERR_TIMEOUT) {
-        return ESP_LOADER_ERROR_TIMEOUT;
-    } else {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-}
-
-
-esp_loader_error_t loader_port_read(uint8_t *data, const uint16_t size, const uint32_t timeout)
-{
-    /* Due to the fact that the SPI driver uses DMA for larger transfers,
-       and the DMA requirements, the buffer must be word aligned */
-    if (data == NULL || !WORD_ALIGNED(data)) {
-        return ESP_LOADER_ERROR_INVALID_PARAM;
-    }
-
-    serial_debug_print(data, size, true);
-
-    spi_transaction_t transaction = {
-        .tx_buffer = NULL,
-        .rx_buffer = data,
-        .rxlength = size * 8,
-    };
-
-    esp_err_t err = spi_device_transmit(s_device_h, &transaction);
-
-    if (err == ESP_OK) {
-        serial_debug_print(data, size, false);
-        return ESP_LOADER_SUCCESS;
-    } else if (err == ESP_ERR_TIMEOUT) {
-        return ESP_LOADER_ERROR_TIMEOUT;
-    } else {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-}
-
-
-void loader_port_enter_bootloader(void)
-{
-    /*
-        We have to initialize the GPIO pins for the target strapping pins here,
-        as they may overlap with target SPI pins.
-        For instance in the case of ESP32C3 MISO and strapping bit 0 pins overlap.
-    */
-    spi_bus_remove_device(s_device_h);
-    spi_bus_free(s_spi_bus);
-
-    gpio_reset_pin(s_strap_bit0_pin);
-    gpio_set_pull_mode(s_strap_bit0_pin, GPIO_PULLUP_ONLY);
-    gpio_set_direction(s_strap_bit0_pin, GPIO_MODE_OUTPUT);
-
-    gpio_reset_pin(s_strap_bit1_pin);
-    gpio_set_pull_mode(s_strap_bit1_pin, GPIO_PULLUP_ONLY);
-    gpio_set_direction(s_strap_bit1_pin, GPIO_MODE_OUTPUT);
-
-    gpio_reset_pin(s_strap_bit2_pin);
-    gpio_set_pull_mode(s_strap_bit2_pin, GPIO_PULLUP_ONLY);
-    gpio_set_direction(s_strap_bit2_pin, GPIO_MODE_OUTPUT);
-
-    gpio_reset_pin(s_strap_bit3_pin);
-    gpio_set_pull_mode(s_strap_bit3_pin, GPIO_PULLUP_ONLY);
-    gpio_set_direction(s_strap_bit3_pin, GPIO_MODE_OUTPUT);
-
-    /* Set the strapping pins and perform the reset sequence */
-    gpio_set_level(s_strap_bit0_pin, 1);
-    gpio_set_level(s_strap_bit1_pin, 0);
-    gpio_set_level(s_strap_bit2_pin, 0);
-    gpio_set_level(s_strap_bit3_pin, 0);
-    loader_port_reset_target();
-    loader_port_delay_ms(SERIAL_FLASHER_BOOT_HOLD_TIME_MS);
-    gpio_set_level(s_strap_bit3_pin, 1);
-    gpio_set_level(s_strap_bit0_pin, 0);
-
-    /* Disable the strapping pins so they can be used by the slave later */
-    gpio_reset_pin(s_strap_bit0_pin);
-    gpio_reset_pin(s_strap_bit1_pin);
-    gpio_reset_pin(s_strap_bit2_pin);
-    gpio_reset_pin(s_strap_bit3_pin);
-
-    /* Restore the SPI bus pins */
-    spi_bus_initialize(s_spi_bus, &s_spi_config, DMA_CHAN);
-    spi_bus_add_device(s_spi_bus, &s_device_config, &s_device_h);
-}
-
-
-void loader_port_reset_target(void)
-{
-    gpio_set_level(s_reset_trigger_pin, 0);
-    loader_port_delay_ms(SERIAL_FLASHER_RESET_HOLD_TIME_MS);
-    gpio_set_level(s_reset_trigger_pin, 1);
-}
-
-
-void loader_port_delay_ms(const uint32_t ms)
-{
-    usleep(ms * 1000);
-}
-
-
-void loader_port_start_timer(const uint32_t ms)
-{
-    s_time_end = esp_timer_get_time() + ms * 1000;
-}
-
-
-uint32_t loader_port_remaining_time(void)
-{
-    int64_t remaining = (s_time_end - esp_timer_get_time()) / 1000;
-    return (remaining > 0) ? (uint32_t)remaining : 0;
-}
-
-
-void loader_port_debug_print(const char *str)
-{
-    printf("DEBUG: %s\n", str);
-}
-
-
-esp_loader_error_t loader_port_change_transmission_rate(const uint32_t frequency)
-{
-    if (spi_bus_remove_device(s_device_h) != ESP_OK) {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-
-    uint32_t old_frequency = s_device_config.clock_speed_hz;
-    s_device_config.clock_speed_hz = frequency;
-
-    if (spi_bus_add_device(s_spi_bus, &s_device_config, &s_device_h) != ESP_OK) {
-        s_device_config.clock_speed_hz = old_frequency;
-        return ESP_LOADER_ERROR_FAIL;
-    }
-
-    return ESP_LOADER_SUCCESS;
-}

+ 0 - 60
esp_flasher/lib/esp-serial-flasher/port/esp32_spi_port.h

@@ -1,60 +0,0 @@
-/* Copyright 2020-2023 Espressif Systems (Shanghai) CO LTD
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
- #pragma once
-
-#include "esp_loader_io.h"
-#include "driver/spi_master.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct
-{
-    spi_host_device_t spi_bus;
-    uint32_t frequency;
-    uint32_t spi_clk_pin;
-    uint32_t spi_miso_pin;
-    uint32_t spi_mosi_pin;
-    uint32_t spi_cs_pin;
-    uint32_t spi_quadwp_pin;
-    uint32_t spi_quadhd_pin;
-    uint32_t reset_trigger_pin;
-    uint32_t strap_bit0_pin;
-    uint32_t strap_bit1_pin;
-    uint32_t strap_bit2_pin;
-    uint32_t strap_bit3_pin;
-} loader_esp32_spi_config_t;
-
-/**
-  * @brief Initializes the SPI interface.
-  *
-  * @param config[in] Configuration structure
-  *
-  * @return
-  *     - ESP_LOADER_SUCCESS Success
-  *     - ESP_LOADER_ERROR_FAIL Initialization failure
-  */
-esp_loader_error_t loader_port_esp32_spi_init(const loader_esp32_spi_config_t *config);
-
-/**
-  * @brief Deinitializes the SPI interface.
-  */
-void loader_port_esp32_spi_deinit(void);
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 302
esp_flasher/lib/esp-serial-flasher/port/raspberry_port.c

@@ -1,302 +0,0 @@
-/* Copyright 2020-2023 Espressif Systems (Shanghai) CO LTD
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "esp_loader_io.h"
-#include "protocol.h"
-#include <pigpio.h>
-#include "raspberry_port.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <termios.h>
-#include <time.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdarg.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/param.h>
-
-#ifdef SERIAL_FLASHER_DEBUG_TRACE
-static void transfer_debug_print(const uint8_t *data, uint16_t size, bool write)
-{
-    static bool write_prev = false;
-
-    if (write_prev != write) {
-        write_prev = write;
-        printf("\n--- %s ---\n", write ? "WRITE" : "READ");
-    }
-
-    for (uint32_t i = 0; i < size; i++) {
-        printf("%02x ", data[i]);
-    }
-}
-#endif
-
-static int serial;
-static int64_t s_time_end;
-static int32_t s_reset_trigger_pin;
-static int32_t s_gpio0_trigger_pin;
-
-
-static speed_t convert_baudrate(int baud)
-{
-    switch (baud) {
-        case 50: return B50;
-        case 75: return B75;
-        case 110: return B110;
-        case 134: return B134;
-        case 150: return B150;
-        case 200: return B200;
-        case 300: return B300;
-        case 600: return B600;
-        case 1200: return B1200;
-        case 1800: return B1800;
-        case 2400: return B2400;
-        case 4800: return B4800;
-        case 9600: return B9600;
-        case 19200: return B19200;
-        case 38400: return B38400;
-        case 57600: return B57600;
-        case 115200: return B115200;
-        case 230400: return B230400;
-        case 460800: return B460800;
-        case 500000: return B500000;
-        case 576000: return B576000;
-        case 921600: return B921600;
-        case 1000000: return B1000000;
-        case 1152000: return B1152000;
-        case 1500000: return B1500000;
-        case 2000000: return B2000000;
-        case 2500000: return B2500000;
-        case 3000000: return B3000000;
-        case 3500000: return B3500000;
-        case 4000000: return B4000000;
-        default: return -1;
-    }
-}
-
-static int serialOpen (const char *device, uint32_t baudrate)
-{
-    struct termios options;
-    int status, fd;
-
-    if ((fd = open (device, O_RDWR | O_NOCTTY | O_NDELAY | O_NONBLOCK)) == -1) {
-        printf("Error occured while opening serial port !\n");
-        return -1 ;
-    }
-
-    fcntl (fd, F_SETFL, O_RDWR) ;
-
-    // Get and modify current options:
-
-    tcgetattr (fd, &options);
-    speed_t baud = convert_baudrate(baudrate);
-
-    if(baud < 0) {
-        printf("Invalid baudrate!\n");
-        return -1;
-    }
-
-    cfmakeraw   (&options) ;
-    cfsetispeed (&options, baud) ;
-    cfsetospeed (&options, baud) ;
-
-    options.c_cflag |= (CLOCAL | CREAD) ;
-    options.c_cflag &= ~(PARENB | CSTOPB | CSIZE) ;
-    options.c_cflag |= CS8 ;
-    options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG) ;
-    options.c_oflag &= ~OPOST ;
-    options.c_iflag &= ~(IXON | IXOFF | IXANY); // Turn off s/w flow ctrl
-    options.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL); // Disable any special handling of received bytes
-
-    options.c_cc [VMIN]  = 0 ;
-    options.c_cc [VTIME] = 10 ; // 1 Second
-
-    tcsetattr (fd, TCSANOW, &options) ;
-
-    ioctl (fd, TIOCMGET, &status);
-
-    status |= TIOCM_DTR ;
-    status |= TIOCM_RTS ;
-
-    ioctl (fd, TIOCMSET, &status);
-
-    usleep (10000) ;  // 10mS
-
-    return fd ;
-}
-
-static esp_loader_error_t change_baudrate(int file_desc, int baudrate)
-{
-    struct termios options;
-    speed_t baud = convert_baudrate(baudrate);
-
-    if(baud < 0) {
-        return ESP_LOADER_ERROR_INVALID_PARAM;
-    }
-
-    tcgetattr (file_desc, &options);
-
-    cfmakeraw   (&options) ;
-    cfsetispeed (&options, baud);
-    cfsetospeed (&options, baud);
-
-    tcsetattr (file_desc, TCSANOW, &options);
-
-    return ESP_LOADER_SUCCESS;
-}
-
-static void set_timeout(uint32_t timeout)
-{
-    struct termios options;
-
-    timeout /= 100;
-    timeout = MAX(timeout, 1);
-
-    tcgetattr(serial, &options);
-    options.c_cc[VTIME] = timeout;
-    tcsetattr(serial, TCSANOW, &options);
-}
-
-static esp_loader_error_t read_char(char *c, uint32_t timeout)
-{
-    set_timeout(timeout);
-    int read_bytes = read(serial, c, 1);
-
-    if (read_bytes == 1) {
-        return ESP_LOADER_SUCCESS;
-    } else if (read_bytes == 0) {
-        return ESP_LOADER_ERROR_TIMEOUT;
-    } else {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-}
-
-static esp_loader_error_t read_data(char *buffer, uint32_t size)
-{
-    for (int i = 0; i < size; i++) {
-        uint32_t remaining_time = loader_port_remaining_time();
-        RETURN_ON_ERROR( read_char(&buffer[i], remaining_time) );
-    }
-
-    return ESP_LOADER_SUCCESS;
-}
-
-esp_loader_error_t loader_port_raspberry_init(const loader_raspberry_config_t *config)
-{
-    s_reset_trigger_pin = config->reset_trigger_pin;
-    s_gpio0_trigger_pin = config->gpio0_trigger_pin;
-
-    serial = serialOpen(config->device, config->baudrate);
-    if (serial < 0) {
-        printf("Serial port could not be opened!\n");
-        return ESP_LOADER_ERROR_FAIL;
-    }
-
-    if (gpioInitialise() < 0) {
-        printf("pigpio initialisation failed\n");
-        return ESP_LOADER_ERROR_FAIL;
-    }
-
-    gpioSetMode(config->reset_trigger_pin, PI_OUTPUT);
-    gpioSetMode(config->gpio0_trigger_pin, PI_OUTPUT);
-
-    return ESP_LOADER_SUCCESS;
-}
-
-
-esp_loader_error_t loader_port_write(const uint8_t *data, uint16_t size, uint32_t timeout)
-{
-    int written = write(serial, data, size);
-
-    if (written < 0) {
-        return ESP_LOADER_ERROR_FAIL;
-    } else if (written < size) {
-#ifdef SERIAL_FLASHER_DEBUG_TRACE
-        transfer_debug_print(data, written, true);
-#endif
-        return ESP_LOADER_ERROR_TIMEOUT;
-    } else {
-#ifdef SERIAL_FLASHER_DEBUG_TRACE
-        transfer_debug_print(data, written, true);
-#endif
-        return ESP_LOADER_SUCCESS;
-    }
-}
-
-
-esp_loader_error_t loader_port_read(uint8_t *data, uint16_t size, uint32_t timeout)
-{
-    RETURN_ON_ERROR( read_data(data, size) );
-
-#ifdef SERIAL_FLASHER_DEBUG_TRACE
-    transfer_debug_print(data, size, false);
-#endif
-
-    return ESP_LOADER_SUCCESS;
-}
-
-
-// Set GPIO0 LOW, then assert reset pin for 50 milliseconds.
-void loader_port_enter_bootloader(void)
-{
-    gpioWrite(s_gpio0_trigger_pin, 0);
-    loader_port_reset_target();
-    loader_port_delay_ms(SERIAL_FLASHER_BOOT_HOLD_TIME_MS);
-    gpioWrite(s_gpio0_trigger_pin, 1);
-}
-
-
-void loader_port_reset_target(void)
-{
-    gpioWrite(s_reset_trigger_pin, 0);
-    loader_port_delay_ms(SERIAL_FLASHER_RESET_HOLD_TIME_MS);
-    gpioWrite(s_reset_trigger_pin, 1);
-}
-
-
-void loader_port_delay_ms(uint32_t ms)
-{
-    usleep(ms * 1000);
-}
-
-
-void loader_port_start_timer(uint32_t ms)
-{
-    s_time_end = clock() + (ms * (CLOCKS_PER_SEC / 1000));
-}
-
-
-uint32_t loader_port_remaining_time(void)
-{
-    int64_t remaining = (s_time_end - clock()) / 1000;
-    return (remaining > 0) ? (uint32_t)remaining : 0;
-}
-
-
-void loader_port_debug_print(const char *str)
-{
-    printf("DEBUG: %s\n", str);
-}
-
-esp_loader_error_t loader_port_change_transmission_rate(uint32_t baudrate)
-{
-    return change_baudrate(serial, baudrate);
-}

+ 0 - 36
esp_flasher/lib/esp-serial-flasher/port/raspberry_port.h

@@ -1,36 +0,0 @@
-/* Copyright 2020-2023 Espressif Systems (Shanghai) CO LTD
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <stdint.h>
-#include "esp_loader_io.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct {
-    const char *device;
-    uint32_t baudrate;
-    uint32_t reset_trigger_pin;
-    uint32_t gpio0_trigger_pin;
-} loader_raspberry_config_t;
-
-esp_loader_error_t loader_port_raspberry_init(const loader_raspberry_config_t *config);
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 140
esp_flasher/lib/esp-serial-flasher/port/stm32_port.c

@@ -1,140 +0,0 @@
-/* Copyright 2020-2023 Espressif Systems (Shanghai) CO LTD
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <string.h>
-#include <unistd.h>
-#include <stdint.h>
-#include <sys/param.h>
-#include <stdio.h>
-#include "stm32_port.h"
-
-static UART_HandleTypeDef *uart;
-static GPIO_TypeDef* gpio_port_io0, *gpio_port_rst;
-static uint16_t gpio_num_io0, gpio_num_rst;
-
-#ifdef SERIAL_FLASHER_DEBUG_TRACE
-static void transfer_debug_print(const uint8_t *data, uint16_t size, bool write)
-{
-    static bool write_prev = false;
-
-    if (write_prev != write) {
-        write_prev = write;
-        printf("\n--- %s ---\n", write ? "WRITE" : "READ");
-    }
-
-    for (uint32_t i = 0; i < size; i++) {
-        printf("%02x ", data[i]);
-    }
-}
-#endif
-
-static uint32_t s_time_end;
-
-esp_loader_error_t loader_port_write(const uint8_t *data, uint16_t size, uint32_t timeout)
-{
-    HAL_StatusTypeDef err = HAL_UART_Transmit(uart, (uint8_t *)data, size, timeout);
-
-    if (err == HAL_OK) {
-#ifdef SERIAL_FLASHER_DEBUG_TRACE
-        transfer_debug_print(data, size, true);
-#endif
-        return ESP_LOADER_SUCCESS;
-    } else if (err == HAL_TIMEOUT) {
-        return ESP_LOADER_ERROR_TIMEOUT;
-    } else {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-}
-
-
-esp_loader_error_t loader_port_read(uint8_t *data, uint16_t size, uint32_t timeout)
-{
-    HAL_StatusTypeDef err = HAL_UART_Receive(uart, data, size, timeout);
-
-    if (err == HAL_OK) {
-#ifdef SERIAL_FLASHER_DEBUG_TRACE
-        transfer_debug_print(data, size, false);
-#endif
-        return ESP_LOADER_SUCCESS;
-    } else if (err == HAL_TIMEOUT) {
-        return ESP_LOADER_ERROR_TIMEOUT;
-    } else {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-}
-
-void loader_port_stm32_init(loader_stm32_config_t *config)
-
-{
-    uart = config->huart;
-    gpio_port_io0 = config->port_io0;
-    gpio_port_rst = config->port_rst;
-    gpio_num_io0 = config->pin_num_io0;
-    gpio_num_rst = config->pin_num_rst;
-}
-
-// Set GPIO0 LOW, then
-// assert reset pin for 100 milliseconds.
-void loader_port_enter_bootloader(void)
-{
-    HAL_GPIO_WritePin(gpio_port_io0, gpio_num_io0, GPIO_PIN_RESET);
-    loader_port_reset_target();
-    HAL_Delay(SERIAL_FLASHER_BOOT_HOLD_TIME_MS);
-    HAL_GPIO_WritePin(gpio_port_io0, gpio_num_io0, GPIO_PIN_SET);
-}
-
-
-void loader_port_reset_target(void)
-{
-    HAL_GPIO_WritePin(gpio_port_rst, gpio_num_rst, GPIO_PIN_RESET);
-    HAL_Delay(SERIAL_FLASHER_RESET_HOLD_TIME_MS);
-    HAL_GPIO_WritePin(gpio_port_rst, gpio_num_rst, GPIO_PIN_SET);
-}
-
-
-void loader_port_delay_ms(uint32_t ms)
-{
-    HAL_Delay(ms);
-}
-
-
-void loader_port_start_timer(uint32_t ms)
-{
-    s_time_end = HAL_GetTick() + ms;
-}
-
-
-uint32_t loader_port_remaining_time(void)
-{
-    int32_t remaining = s_time_end - HAL_GetTick();
-    return (remaining > 0) ? (uint32_t)remaining : 0;
-}
-
-
-void loader_port_debug_print(const char *str)
-{
-    printf("DEBUG: %s", str);
-}
-
-esp_loader_error_t loader_port_change_transmission_rate(uint32_t baudrate)
-{
-    uart->Init.BaudRate = baudrate;
-
-    if( HAL_UART_Init(uart) != HAL_OK ) {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-
-    return ESP_LOADER_SUCCESS;
-}

+ 0 - 38
esp_flasher/lib/esp-serial-flasher/port/stm32_port.h

@@ -1,38 +0,0 @@
-/* Copyright 2020-2023 Espressif Systems (Shanghai) CO LTD
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <stdint.h>
-#include "esp_loader_io.h"
-#include "stm32f4xx_hal.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct {
-    UART_HandleTypeDef *huart;
-    GPIO_TypeDef *port_io0;
-    uint16_t pin_num_io0;
-    GPIO_TypeDef *port_rst;
-    uint16_t pin_num_rst;
-} loader_stm32_config_t;
-
-void loader_port_stm32_init(loader_stm32_config_t *config);
-
-#ifdef __cplusplus
-}
-#endif

+ 0 - 170
esp_flasher/lib/esp-serial-flasher/port/zephyr_port.c

@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 2022 KT-Elektronik, Klaucke und Partner GmbH
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "zephyr_port.h"
-#include <zephyr/drivers/uart.h>
-#include <zephyr/console/tty.h>
-
-static const struct device *uart_dev;
-static struct gpio_dt_spec enable_spec;
-static struct gpio_dt_spec boot_spec;
-
-static struct tty_serial tty;
-static char tty_rx_buf[CONFIG_ESP_SERIAL_FLASHER_UART_BUFSIZE];
-static char tty_tx_buf[CONFIG_ESP_SERIAL_FLASHER_UART_BUFSIZE];
-
-#ifdef SERIAL_FLASHER_DEBUG_TRACE
-static void transfer_debug_print(const uint8_t *data, uint16_t size, bool write)
-{
-    static bool write_prev = false;
-
-    if (write_prev != write) {
-        write_prev = write;
-        printk("\n--- %s ---\n", write ? "WRITE" : "READ");
-    }
-
-    for (uint32_t i = 0; i < size; i++) {
-        printk("%02x ", data[i]);
-    }
-}
-#endif
-
-esp_loader_error_t configure_tty()
-{
-    if (tty_init(&tty, uart_dev) < 0 ||
-        tty_set_rx_buf(&tty, tty_rx_buf, sizeof(tty_rx_buf)) < 0 ||
-        tty_set_tx_buf(&tty, tty_tx_buf, sizeof(tty_tx_buf)) < 0) {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-
-    return ESP_LOADER_SUCCESS;
-}
-
-esp_loader_error_t loader_port_read(uint8_t *data, const uint16_t size, const uint32_t timeout)
-{
-    if (!device_is_ready(uart_dev) || data == NULL || size == 0) {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-
-    ssize_t total_read = 0;
-    ssize_t remaining = size;
-
-    tty_set_rx_timeout(&tty, timeout);
-    while (remaining > 0) {
-        const uint16_t chunk_size = remaining < CONFIG_ESP_SERIAL_FLASHER_UART_BUFSIZE ?
-            remaining : CONFIG_ESP_SERIAL_FLASHER_UART_BUFSIZE;
-        ssize_t read = tty_read(&tty, &data[total_read], chunk_size);
-        if (read < 0) {
-            return ESP_LOADER_ERROR_TIMEOUT;
-        }
-#ifdef SERIAL_FLASHER_DEBUG_TRACE
-        transfer_debug_print(data, read, false);
-#endif
-        total_read += read;
-        remaining -= read;
-    }
-
-    return ESP_LOADER_SUCCESS;
-}
-
-esp_loader_error_t loader_port_write(const uint8_t *data, const uint16_t size, const uint32_t timeout)
-{
-    if (!device_is_ready(uart_dev) || data == NULL || size == 0) {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-
-    ssize_t total_written = 0;
-    ssize_t remaining = size;
-
-    tty_set_tx_timeout(&tty, timeout);
-    while (remaining > 0) {
-        const uint16_t chunk_size = remaining < CONFIG_ESP_SERIAL_FLASHER_UART_BUFSIZE ?
-            remaining : CONFIG_ESP_SERIAL_FLASHER_UART_BUFSIZE;
-        ssize_t written = tty_write(&tty, &data[total_written], chunk_size);
-        if (written < 0) {
-            return ESP_LOADER_ERROR_TIMEOUT;
-        }
-#ifdef SERIAL_FLASHER_DEBUG_TRACE
-        transfer_debug_print(data, written, true);
-#endif
-        total_written += written;
-        remaining -= written;
-    }
-
-    return ESP_LOADER_SUCCESS;
-}
-
-esp_loader_error_t loader_port_zephyr_init(const loader_zephyr_config_t *config)
-{
-    uart_dev = config->uart_dev;
-    enable_spec = config->enable_spec;
-    boot_spec = config->boot_spec;
-    return configure_tty();
-}
-
-void loader_port_reset_target(void)
-{
-    gpio_pin_set_dt(&enable_spec, false);
-    loader_port_delay_ms(CONFIG_SERIAL_FLASHER_RESET_HOLD_TIME_MS);
-    gpio_pin_set_dt(&enable_spec, true);
-}
-
-void loader_port_enter_bootloader(void)
-{
-    gpio_pin_set_dt(&boot_spec, false);
-    loader_port_reset_target();
-    loader_port_delay_ms(CONFIG_SERIAL_FLASHER_BOOT_HOLD_TIME_MS);
-    gpio_pin_set_dt(&boot_spec, true);
-}
-
-void loader_port_delay_ms(uint32_t ms)
-{
-    k_msleep(ms);
-}
-
-static uint64_t s_time_end;
-
-void loader_port_start_timer(uint32_t ms)
-{
-    s_time_end = sys_clock_timeout_end_calc(Z_TIMEOUT_MS(ms));
-}
-
-uint32_t loader_port_remaining_time(void)
-{
-    int64_t remaining = k_ticks_to_ms_floor64(s_time_end - k_uptime_ticks());
-    return (remaining > 0) ? (uint32_t)remaining : 0;
-}
-
-esp_loader_error_t loader_port_change_transmission_rate(uint32_t baudrate)
-{
-    struct uart_config uart_config;
-
-    if (!device_is_ready(uart_dev)) {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-
-    if (uart_config_get(uart_dev, &uart_config) != 0) {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-    uart_config.baudrate = baudrate;
-
-    if (uart_configure(uart_dev, &uart_config) != 0) {
-        return ESP_LOADER_ERROR_FAIL;
-    }
-
-    /* bitrate-change can require tty re-configuration */
-    return configure_tty();
-}

+ 0 - 39
esp_flasher/lib/esp-serial-flasher/port/zephyr_port.h

@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2022 KT-Elektronik, Klaucke und Partner GmbH
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include "esp_loader_io.h"
-#include <zephyr/kernel.h>
-#include <zephyr/drivers/gpio.h>
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct {
-    const struct device *uart_dev;
-    const struct gpio_dt_spec enable_spec;
-    const struct gpio_dt_spec boot_spec;
-} loader_zephyr_config_t;
-
-esp_loader_error_t loader_port_zephyr_init(const loader_zephyr_config_t *config);
-
-#ifdef __cplusplus
-}
-#endif
-

+ 0 - 33
esp_flasher/lib/esp-serial-flasher/private_include/esp_targets.h

@@ -1,33 +0,0 @@
-/* Copyright 2020 Espressif Systems (Shanghai) PTE LTD
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <stdint.h>
-#include "esp_loader.h"
-
-typedef struct {
-    uint32_t cmd;
-    uint32_t usr;
-    uint32_t usr1;
-    uint32_t usr2;
-    uint32_t w0;
-    uint32_t mosi_dlen;
-    uint32_t miso_dlen;
-} target_registers_t;
-
-esp_loader_error_t loader_detect_chip(target_chip_t *target, const target_registers_t **regs);
-esp_loader_error_t loader_read_spi_config(target_chip_t target_chip, uint32_t *spi_config);
-bool encryption_in_begin_flash_cmd(target_chip_t target);

Некоторые файлы не были показаны из-за большого количества измененных файлов