Well, you should not need to reinstall or rename anything. Tools are versioned for that reason after all - to use correct specified and tested version. When I switch IDF version I use different workspaces or even Eclipse executables to avoid confusion. If in terminal, I simply export different IDF folder and source its export.sh script to set the environment for that terminal process.
Interesting. I had always kept my same workspace and switched IDFs. I understand the tools are versioned but by keeping the .espressif folders separate it removes the previous, no longer used versions of the tools. My .espressif folder is 3.5GB. And once I migrate everything to 5.0.1 I will remove .expressif-4.4.4 which is very close to happening.
Btw, what I also learned is that it is safer not to change IDF version for existing project at all. If I want to try new IDF version, I copy the project sources to new location, delete all genetated files (including eclipse project settings) and import to new Eclipse workspace with new IDF setup. Otherwise eclipse could use some cached files from previous version and things get messy. It also happened that I had to switch back to previous IDE version (especially v4/v5 change), so it is good to keep your already working project untouched.
Yeah, changing the IDF version for an existing project doesn't work, I learned that a while ago. I typically check out a copy of the project into my workspace, switch the .espressif folder, perform a tool reinstall so Eclipse has the correct versions and doesn't use a cached version (it is very quick when you swap the .espressif folder) and then import the project. I will also right click on the newly imported project and "Close Unrelated Projects" so I don't get confused and accidentally try to build a project I don't mean to. Fortunately I don't need to do this very often. Once I migrate I don't ever look back as my user base gets updated OTA.
However, the closing and reopening of projects with IDE plugin 2.9 has a fatal flaw and will end up hanging the IDE when reopening projects. That is how I ended up back on this forum. I asked about it here
viewtopic.php?f=40&t=32927 and got not response so I ended up submitting a bug report here
https://github.com/espressif/idf-eclips ... 8922148584 and a pull request that fixed it was approved very recently. I'm still on plugin version 2.7 but will test this update soon.
Glad moving the import worked for you. I had this happen once before
viewtopic.php?f=40&t=22819 As I recall I submitted a bug report for this at one point and it ended up getting fixed with a change to their indexer. But with that issue it only looked bad in the IDE. Since 5.0.1 it will now pop up a window and tell you there is an error and ask you if you want to proceed. You then have to go back and look at the build output to see if there really was a build/link error. I wish they would change it back to only using errors from the build console rather than errors reported by the IDE/indexer.