Sysprogs forums › Forums › VisualGDB › Problems upgrading ESP32 Projects with latest update
- This topic has 1 reply, 2 voices, and was last updated 1 year, 4 months ago by support.
-
AuthorPosts
-
July 27, 2023 at 15:17 #34540gojimmypiParticipant
As noted in #post-34131 there are a variety of challenges when changing ESP-IDF versions that is a concern with the latest VisualGDB update.
Although a minor version increment from Espressif ESP-IDF v5.0 to v5.1, it does seem like quite a bit has changed.
The most recent VisualGDB update was particularly difficult for me as not only was the ESP-IDF version updated, but also the gcc (which btw, does not seem to be happy with ESP-IDF projects prior to v5.1).
My advice to anyone coming here looking for help with existing projects: delete the build directory. Perhaps multiple times.
I had a project that targeted the gcc11.2 toolchain with ESP-IDF v5. My solution: Delete the respective build directory before even opening the project. Once the project is opened, change to the respective latest toolchain and ESP-IDF versions. VisualGDB is pretty good about detecting and resolving the conflicts. If the project does not immediately work (e.g. cannot find compiler, cmake errors), exit visual Studio, and again delete the build directory. Then try again.
Upon launching VisualGDB a second time, all was well for me.
As a reminder: the entire
C:\SysGCC\esp32
directory and any toolchains contained therein get deleted when updating the most recent “debug methods” and “ESP32 toolchain” in VisualGDB. I think this was part of the problem: my existing projects no longer had the assigned gcc and ESP-IDF version. Perhaps I should have clicked the “install side-by-side” checkbox.It also appears that when initializing from a command prompt, no longer is
export.bat
used, but rather theC:\Espressif>idf_cmd_init.bat
command (apparently not included with VisualGDB, but was installed for me with the latest Espressif install at https://dl.espressif.com/dl/esp-idf/I hope this helps others avoid the problems I encountered.
July 31, 2023 at 10:54 #34545supportKeymasterHi,
Thanks for sharing your feedback.
Most ESP-IDF releases indeed require a specific toolchain version and show an error message otherwise. This is exactly the reason why have separate prepackaged toolchains, each bundled together with a compatible version of ESP-IDF. The “debug methods” package (which is actually just OpenOCD) is usually backwards-compatible with older ESP-IDFs, hence it is shipped and installed separately (under %LOCALAPPDATA%\VisualGDB\EmbeddedDebugPackages\com.sysprogs.esp32.core).
We also have a documentation page explaining how different components of the ESP32 tooling work together, and how to troubleshoot (and avoid) most common problems. If you keep running into issues with every ESP32 update, please take your time to look through it – we made it based on the most common issues our users ran into, and it will save you a lot of troubleshooting time.
As for the project rebuild, normally just doing a “Build->Rebuild Solution” should automatically clean up the references to the old toolchain. This will work even if the project fails to load and shows an error message in Solution Explorer (unless the project was modified to reference specific things from the old toolchain). If you had to remove the build directory multiple times, something else (e.g. antivirus) might be interfering with the build.
-
AuthorPosts
- You must be logged in to reply to this topic.