Workbench cloud compile fails when using subfolders

Hi -

I am running into some trouble using cloud compile/ cloud flash in Workbench. Local compile seems to work fine.

I did read through the other posts on similar issue, mine is little different (I think). I in the source folder I have the .INO file. I have a sub folder under the root directory names ‘external’ in which I am planning to add all ‘other’ files i.e .H and .CPP I created subfolders for each sensor, neatly packing the corresponding set of files into each folder.

Of course I amend the paths in all files to match the location. The works fine for two out of the three sensors so far. The moment I move the temperature sensor .h and .cpp files into the …/external/temperature/ folder, all hell breaks loose and I am unable to cloud compile or flash. Local compile still works though. Please find attached below;

If I move (in this case) HS300x.h and HS300x.cpp back the src folder directly, change the paths again to reflect the same, the flash works seamlessly.

Kind Regards,

If at all possible, you should arrange your source like this:


This mimics the format used by Particle libraries, but does not require that the items in the lib directory are actually libraries. This format is used by Tracker Edge, and works for both cloud and local compiles.

The other advantage of using this format is that you can include the whole thing in your Github repository, or if you integrate other libraries that are stored in Github, you can do so using git submodules.


Hi @rickkas7

Thank you for the response. Still getting to know VSC; for the extremely little programming I have had to do up until this project, I used the webIDE. Thought I would give VSC a chance just incase I might need to start doing more coding myself going forward :slight_smile:

I will restructure the files, no problem. Hopefully it will flash successfully then. The curveball for me was why this one particular library is causing this to fail.

I will make the changes and revert back. Thanks again, appreciate the help!


Hi @rickkas7

Thanks, it solved the problem. Still curious as to why it happened only when I added the HS300x subfolder and moved te files there.

The only scenario I did not test was to see if it maybe happened when exceeding two subfolders in the ‘incorrect way’ of setting up the folder structure. It was by chance that the HS300x folder was the third on each time as it was the third sensor added to the code.

Will add the rest now.

Thanks again!!

1 Like

Hi @rickkas7 -

I am having a similar problem again.... below is my directory structure, I believe it is correct.

I am trying to cloud flash simply because I am in the living room at the moment and the device connected to my bench power supply in my office :smile: I have not used cloud compile first, is this a prerequisite to cloud flash ??

When trying to cloud flash I get quite a very short and discrete failed message in Workbench but the log file is quite extensive. Will take the best of a day just to read through it. Any advice?


Try a Particle: Cloud Compile to determine whether it's a compile error or flashing error.

For anything in your lib directory, make sure there isn't a dependencies line in your file. For example, if you have this:


change it to be:


If you have something in both lib and, the local compiler used the local version, but the cloud compiler use the official version in the community libraries, not the one you have in lib.

Also just the last page of the detailed log is probably where there error is.

1 Like

Thanks, I will try this!

I have done this already in an effort to get the cloud flash working. Think it was mentioned in another thread as well.

Generally why I don't like cloud flash as it took my couple of days to figure out what was happening o my TFT on a particle Tutorial while back... only later discovered the cloud flash/compile was changing the library back each time :smile:

I will try to test this tomorrow, just fell a bit behind over the weekend thanks to a diode.... :triumph:

Thanks again for the response, much appreciated!!