Suddenly getting error on linking

I couldn’t figure out how to copy the build log within Atom. It seems I can only select the visible text which at best is only 40 or 50 lines. (For reference, I am on Windows 10)

In an effort to get all the build commands, I opened a terminal from the PlatformIO menu. I ran the command “platformio run” as I see that is the command to start the build process.

Doing that worked and it was able to build everything without any errors.

Here is the log from the terminal…
https://drive.google.com/file/d/0B3_mHnJlEFDvRU9jOHJuT2prWEU/view?usp=sharing

After the successful terminal build I went back to Atom and tried to upload. It attempted a new build and failed with the same message as before. I shut down Atom and re-opened it then tried Upload again and to my surprise it built the application without any issues and successfully uploaded.

Keep in mind that I did a full reboot last night and that didn’t help anything.

So does the problem still persist?

At this point I can do the build and upload so I will say that it is working.

Having changed nothing I have to wonder what triggered the error and the resolution. As a hobbyist, I use the system in the evenings. If I encounter a similar problem in the future I will post a follow up message.

I posted my original message only because I saw that others had similar issues, and felt that perhaps there is some randomness to this based on settings etc.

thanks…

Do you have all packages updated? Settings (gear) icon > Updates.

Yes, when I first experienced the issue I checked everything was up to date and also restarted the machine to make sure that there was no caching etc. in play. I also removed the .pioenvs folder in an attempt to flush everything.

I wonder if there are any issues related to other versions of (other) software installed on my machine. My home machine is a catch-all for all sorts of development tools and web platforms. Is there any chance that something in my environment could be causing issues?

I know that I had a hardware folder installed (for use with Arduino IDE) on my machine for the ESP2866 - D1 WeMos when I first started working with the device.

Tell me please the actual “create” date of this folder ~/.platformio/packages/framework-arduinoespressif. It seems to me that you had obsolete ESP8266 for Arduino package and the latest PlatformIO. PlatformIO should update all packages when is upgraded. However, if you had a problem with Internet connection or etc, the packages were not updated.

PlatformIO 3.0 has new architecture and package manager. We will not have these issues.

Not sure that one influences the other. Looking at .gcc-flags.json all directories point to the .platformio folder with the exception of my project directory.

The ‘hardware’ folder for Arduino IDE was under my Arduino projects (higher level) directory, so somewhat hidden from platformio As to the .platformio folder in my Users folder (I am on Windows), the creation date is July 18 @ 21:26 EST
The versions.txt file (in that folder) is dated June 28 @ 5:17 am and the boards.txt is June 21 @ 4:06 am

I did previously rebuild a lot of my tools as I tried to resolve the error that I was receiving. I have just tried a build now and it is still working fine.

I look forward to the next version, the tool is very good.

thanks!

Same problem again this evening… all of a sudden the build doesn’t work. I have made no changes to my system, I turned off virus protection as I wondered if that was the issue.

When I run/press the compile button I get the error, same for both compile and upload. However, if I go to the Terminal window and enter the command “platformio run --target upload” everything compiles and uploads without any issue.

I’ve attached a screen shot, the top terminal is my manual compile and upload. Right after I hit the Upload (arrow) and get the output listed; I also tried clean and full build. I also deleted the .pioenvs folder and restarted Atom, with no difference.

I am fine manually building at least I can still build and upload. :grinning: Just seems really odd that this behaviour has returned after everything was fine for most of the evening (and I made no OS software changes, I was only playing with the hardware and changed a bit of my code)

Could you share here the value of Path and PATH environment variables?

Please upgrade to PlatfromIO 1.3.4. Do you still have this issue?

I have upgraded, and so far all is well. If anything changes I will post my PATH

Thanks again!

I am getting the similar issue. All has been working well until I reinstalled PlatformIO and now am unable to compile the code. I get the following error:

collect2.exe: error: ld returned 1 exit status
*** [.pioenvs\d1_mini\firmware.elf] Error 1
========================= [ERROR] Took 9.73 seconds =========================
The terminal process terminated with exit code: 1

However, if I compile using the terminal command platformio run it compiles and similarly upload okay. The problem seems to happen only when using Small Tick Icon or using the menu options.

My path variables are:
User path : C:\user\AM\Appdata\Local\Microsoft.WandowsApps
System path : C:\ProgramData\Oracle\Java/javapath and other systemroot folders.

Any ideas what might be causing this?

Could you provide test project to reproduce this issue?

I do not think it is project specific. The same project sometimes complies sometimes not so it has to be something environment specific. It started happening when I updated PlatformIO from the last version. Any ideas what might be causing this?

Update:

Problem only seems to happen only when additional options are defined in the platformio.ini. E.g.

; Serial Monitor options
UPLOAD_SPEED = 921600
monitor_baud = 9600
upload_port = COM5

if I remove these serial monitor options then all works fine. Strange!

Takes ages to upload projects to NodeMCU.

Could you provide pio run --verbose output?

Here it is. verbose_output - Pastebin.com

I don’t see any errors in that log. Build succeeded.

My Bad! I ran it without the options above. Correct log here https://pastebin.com/9b5cvk2a

Could you try Espressif 8266 — PlatformIO latest documentation ?