MathieuDeprez / ESP32_CoreDump_Arduino_1.0.6

14 stars 0 forks source link

Double definition of esp_core_dump_image_erase #6

Closed duwuwansch closed 1 year ago

duwuwansch commented 2 years ago

In the example src the function: esp_core_dump_image_erase is defined. But it also includes esp_core_dump.h which also defines the same function. As a result ld.exe complains during build: multiple definition of `esp_core_dump_image_erase';

MathieuDeprez commented 2 years ago

Hi, esp_core_dump_image_erase() is defined for the version after Arduino 1.0.6. I just copied it to use it in the old 1.0.6 version. Are you sure that you are using Arduino 1.0.6?

duwuwansch commented 2 years ago

Oh sorry, did overlook this. I'm using 1.8 and not 1.0.6. So just commenting this function will do the trick?

MathieuDeprez commented 2 years ago

I don't think there is a 1.8 version. I am talking about the arduino-esp32 version (https://github.com/espressif/arduino-esp32/releases). After the 1.0.6 version, there are the 2.0.0, 2.0.1, 2.0.2 and 2.0.3 version.

Here is my repository that allows you to use the esp_core_dump functionnality with the 2.0.2 version : https://github.com/MathieuDeprez/ESP32_CoreDump_Arduino_2.0.2

duwuwansch commented 2 years ago

Hi Matthieu, (tu es francais?)

thank you for your response and the link. In fact I use 2.0.2.

But I'm having issues understanding your project. Currently my struggle is about setting the right flags in sdkconfig which I need for the dump to flash feature.

[env:esp32dev] platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream board = esp32dev framework=arduino platform_packages = platformio/toolchain-xtensa32@^2.50200.97 platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.2 platformio/tool-esptoolpy@^1.30100.210531 lib_deps = arduino-libraries/Arduino_JSON@^0.1.0 board_upload.flash_size = 16MB board_upload.maximum_size = 16777216 ;board_build.partitions = Tom16MBmin_spiffs.csv build_flags = ; -DCONFIG_ESP_COREDUMP_ENABLE=y ; -DCONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y ; -DCONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y ; -DCORE_DEBUG_LEVEL=4 ; -DCONFIG_ESP_COREDUMP_MAX_TASKS_NUM=64 ; -DCONFIG_ESP_COREDUMP_CHECKSUM_CRC32=y ;build_unflags = DCONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y

Would the standard platformio not use 2.0.2 as standard. Why explicitly stating it here?

Thank you for your help. BR David

Am 05.05.2022 um 21:41 schrieb MathieuDeprez:

I don't think there is a 1.8 version. I am talking about the arduino-esp32 version (https://github.com/espressif/arduino-esp32/releases https://github.com/espressif/arduino-esp32/releases). After the 1.0.6 version, there are the 2.0.0, 2.0.1, 2.0.2 and 2.0.3 version.

Here is my repository that allows you to use the esp_core_dump functionnality with the 2.0.2 version : https://github.com/MathieuDeprez/ESP32_CoreDump_Arduino_2.0.2 https://github.com/MathieuDeprez/ESP32_CoreDump_Arduino_2.0.2

— Reply to this email directly, view it on GitHub https://github.com/MathieuDeprez/ESP32_CoreDump_Arduino_1.0.6/issues/6#issuecomment-1118978962, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATMVSBW7IM2SSLHESOEU2HDVIQP5HANCNFSM5VBNZ5RA. You are receiving this because you authored the thread.Message ID: @.***>

MathieuDeprez commented 2 years ago

Hi @duwuwansch, (Oui, je suis Français)

The thing is that the Arduino framework includes a version of ESP-IDF. Arduino 1.0.6 is using ESP-IDF 3.5 and Arduino 2.0.2 is using ESP-IDF 4.4.

By default, platformIO uses Arduino 1.0.6 and we are waiting for the development team to integrate Arduino 2.0.0(at minimum). This following line allows you to use the Arduino 2.0.2 on PlatformIO : platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.2 But it is not perfect, this is why you need to import other tools like:

platformio/toolchain-xtensa32@^2.50200.97
platformio/tool-esptoolpy@^1.30100.210531

You are right, you can't use menuconfig because you are not directly using the ESP-IDF framework. This is why I made my repos ESP32_CoreDump_Arduino_1.0.6 and ESP32_CoreDump_Arduino_2.0.2 This is was I have done:

Finally, I have a custom Arduino SDK (in the out.zip file) that allows for the core dump feature. You just have to replace the content that PlatformIO downloads by the content of that out.zip file and you are good to go!