Environmental Undefined Reference Error

I started this issue because I had run to the end of my understanding in the subject and believed that it could be related to the platform I was using because of the error message. This issue goes through my steps and the steps of the others that helped me confirm that this is an issue with my environment, but I have been unsuccessful in finding the issue itself. I have uninstalled and cleaned out the remnant files from PlatformIO and Visual Studio Code and re-installed them with the same error result. At this point I am just scrambling for ways to figure out the actual core cause to my headache.

If a project compiles with ESP-IDF v4.3.1 (which is the ESP-IDF version PlatformIO is using per released) and the native ESP-IDF tools but not when compiled with PlatformIO, please open an issue in Issues · platformio/platform-espressif32 · GitHub.

That’s just the thing though, It compiles perfectly fine with PlatformIO on other machines, it appears that it is just my machine environment that is affected. Hence why I did not want to bother the developers with an issue, as I already did to the espressif team.

I wanted to gather more information about my issue before making any other moves because I don’t fully understand why it is happening to only my machine. If this appears to be a bigger issue I assume it is, then I will be posting an issue about it at the provided link. Until then though, any advice on how I can get to the root cause of the issue would be appreciated, as PlatformIO is far from my specialty, and debugging the lower layers of it even further from my comfort zone. I am ready and willing to experiment to find new ways to think about the issue though.

The issue provided in my initial post gives a good amount of information as to where I currently stand on this problem. But if anything is confusing about it, or if you need me to post more code or information, I’ll gladly oblige. Thanks again for the reply!

You can open a CLI and execute pio platform update espressif32 to update the platform, then go into the <user>/.platformio/packages folder and delete every folder inside there. Upon the next build of the project, PlatformIO will re-download those packages. You might have corrupted packages if it works on different machines.

I am running the latest version of espressif32 at current date which is version 4.3.1 as you noted. I have done this step already as well as several other similar attempts to update or clear potentially bad files.

I have gone into Visual Studio code, PlatformIO and uninstalled the espressif32 platform and removed the esp32dev board. I then uninstalled PlatformIO from Visual Studio Code and uninstalled Visual Studio Code from my computer. I went through my computer files and removed any folders associated with Visual Studio Code, PlatformIO and espressif32. After reinstalling all of these, the issue has not been fixed, leading me to conclude that it is the environment that is the issue, not Visual Studio Code, PlatformIO, espressif32 or any of the associated files.

I appreciate your advice though, and they are important steps that I would assume to work on any machine in any case. This seems to me to be a case of improper environment configuration however, which would explain why it works on other machines but even when reinstalling all the components, still does not work on the one I need it to. I however am not well equipped to deal with such an issue and so I found myself here, to try to better arm myself with information.

In my uneducated opinion, the issue appears to be with how PlatformIO is interacting at a lower level with my environment. Though I cannot even begin to fathom how I would go about testing this. I am thinking this because the issue occurs in the object file generated during compilation which is just about as low level as it gets. If the object file is being compiled improperly, then I would think it possible that some things are happening during the process that are not as expected or as they are supposed to be. Which could be environment variables, privileges, you name it. Again though, I have no clue how to actually find out if this is what is going on, just my thoughts from my little experience dealing with compilers.

Thanks again for the help. I appreciate all the suggestions and questions.