From b9401f441450988d655d3e2d4d7fd4b899ff536e Mon Sep 17 00:00:00 2001 From: Jonas Arnold Date: Thu, 27 Oct 2022 16:26:05 +0200 Subject: [PATCH] configured ESP32 project to work with eclipse --- ADIS_ESP32_Eclipse/.cproject | 184 ++++++++++++++++++ ADIS_ESP32_Eclipse/.project | 27 +++ .../OpenOCD_server-FT2232HL.bat | 1 + ADIS_ESP32_Eclipse/main/CMakeLists.txt | 2 +- .../main/{hello_world_main.c => main.c} | 0 .../OpenOCD_flash-FT2232HL.bat | 1 + ADIS_IDF_hello_world/main/hello_world_main.c | 5 +- 7 files changed, 217 insertions(+), 3 deletions(-) create mode 100644 ADIS_ESP32_Eclipse/.cproject create mode 100644 ADIS_ESP32_Eclipse/.project create mode 100644 ADIS_ESP32_Eclipse/OpenOCD_server-FT2232HL.bat rename ADIS_ESP32_Eclipse/main/{hello_world_main.c => main.c} (100%) create mode 100644 ADIS_IDF_hello_world/OpenOCD_flash-FT2232HL.bat diff --git a/ADIS_ESP32_Eclipse/.cproject b/ADIS_ESP32_Eclipse/.cproject new file mode 100644 index 0000000..69001c2 --- /dev/null +++ b/ADIS_ESP32_Eclipse/.cproject @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + python + ${IDF_PATH}/tools/idf.py -v + build + true + true + true + + + python + ${IDF_PATH}/tools/idf.py -v + clean + true + true + true + + + python + ${IDF_PATH}/tools/idf.py -v + fullclean + true + true + true + + + python + ${IDF_PATH}/tools/idf.py -v + --port COM3 --baud 115200 flash + true + true + true + + + + \ No newline at end of file diff --git a/ADIS_ESP32_Eclipse/.project b/ADIS_ESP32_Eclipse/.project new file mode 100644 index 0000000..ddcc38f --- /dev/null +++ b/ADIS_ESP32_Eclipse/.project @@ -0,0 +1,27 @@ + + + ADIS_ESP32_Eclipse + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + diff --git a/ADIS_ESP32_Eclipse/OpenOCD_server-FT2232HL.bat b/ADIS_ESP32_Eclipse/OpenOCD_server-FT2232HL.bat new file mode 100644 index 0000000..35fdc41 --- /dev/null +++ b/ADIS_ESP32_Eclipse/OpenOCD_server-FT2232HL.bat @@ -0,0 +1 @@ +openocd -f ./FT2232HL.cfg -f ./esp-adis.cfg diff --git a/ADIS_ESP32_Eclipse/main/CMakeLists.txt b/ADIS_ESP32_Eclipse/main/CMakeLists.txt index 07686dc..8a3ab69 100644 --- a/ADIS_ESP32_Eclipse/main/CMakeLists.txt +++ b/ADIS_ESP32_Eclipse/main/CMakeLists.txt @@ -1,2 +1,2 @@ -idf_component_register(SRCS "hello_world_main.c" +idf_component_register(SRCS "main.c" INCLUDE_DIRS "") diff --git a/ADIS_ESP32_Eclipse/main/hello_world_main.c b/ADIS_ESP32_Eclipse/main/main.c similarity index 100% rename from ADIS_ESP32_Eclipse/main/hello_world_main.c rename to ADIS_ESP32_Eclipse/main/main.c diff --git a/ADIS_IDF_hello_world/OpenOCD_flash-FT2232HL.bat b/ADIS_IDF_hello_world/OpenOCD_flash-FT2232HL.bat new file mode 100644 index 0000000..9fd04e0 --- /dev/null +++ b/ADIS_IDF_hello_world/OpenOCD_flash-FT2232HL.bat @@ -0,0 +1 @@ +openocd -f ./FT2232HL.cfg -f ./esp-adis.cfg -c "program_esp build/hello_world.bin 0x10000 verify exit" diff --git a/ADIS_IDF_hello_world/main/hello_world_main.c b/ADIS_IDF_hello_world/main/hello_world_main.c index ebc5eb0..d867234 100644 --- a/ADIS_IDF_hello_world/main/hello_world_main.c +++ b/ADIS_IDF_hello_world/main/hello_world_main.c @@ -33,8 +33,9 @@ void app_main(void) printf("Minimum free heap size: %d bytes\n", esp_get_minimum_free_heap_size()); - for (int i = 10; i >= 0; i--) { - printf("Restarting in %d seconds...\n", i); + for (int i = 5; i <= 100; i++) { + printf("Hello Test nr. %d\n", i); + //printf("Restarting in %d seconds...\n", i); vTaskDelay(1000 / portTICK_PERIOD_MS); } printf("Restarting now.\n");