Cloud Flashing from cli works, inside VisualStudio it doesn't

Hey,
So i wanted to flash my electron via cloud. If I use CLI to flash the .bin file it works. But when i call

Particle: Cloud Flash

inside Workbench it wont work. (Local Flash works)

The output in the Workbench is very long, here is the part with the error:

collect2: error: ld returned 1 exit status
../../../build/module.mk:232: recipe for target 'target/workspace.elf' failed
make[1]: *** [target/workspace.elf] Error 1
make[1]: Leaving directory '/firmware/modules/electron/user-part'
../build/recurse.mk:11: recipe for target 'modules/electron/user-part' failed
make: *** [modules/electron/user-part] Error 2
Flash device failed: Compiler encountered an error
Error: Command failed with exit code 1: c:\Users\PhilippOverath\.vscode\extensions\particle.particle-vscode-core-1.9.0\src\cli\bin\windows\amd64\particle.exe cloud flash Pydro_E2 --target 1.4.4 --no-update-check
Targeting version:  1.4.4

Any ideas?

Btw. I am using two libraries:
Metro.h
Ubidots.h

Could be that it is the libraries?

Thanks

The interesting bit is not in there tho'

collect2: error: ld returned 1 exit status

indicates that the actual error has already occured before that during the linker run

Alright,
the whole output is too long to post here (>70k).
For what shall I look in the output. Any special keywords?

Usually the linker output is usually max. a couple of dozend lines up from the line I quoted.

I found the error.
It was some library problem with Adafruit_DHT.h and Adafruit_DHT_particle.h and double definitions. Even if I didn’t have those libraries included in my main file. I then saw that they were defined as dependencies in project.properties, i gues some leftovers from my first testing with the electron.
After removing them from the project.properties list it worked.

Thanks

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.