sorry about that, it's a silly, non-error message - see:
I created a new project
did you create the project via the Particle: Create Project command (or "create project" button on the main "Welcome" screen that launches when you click the Particle logo in the "Activity" bar on the left)?
I created the project using Particle: Create Project. The project workspace file is not specifically displayed in workbench as indicated in the documentation.
I am using a bare bones system. The program is a copy of Particle’s LED blinker program from the hardware tutorial. Just tried again and created a new project workspace and directory, built it and got same type of errors.
Updated the particle.particle-vscode-pack. Deleted the others noted yesterday.
compile: run the Particle: Compile application (local) task from VSCode’s main menu: “Terminal > Run Task…” then pick the aforementioned task from the list shown
I get this.
After Particle: Compile application (local) I get the below. I never get the change to select what to compile.
../../../build/module.mk:236: warning: overriding recipe for target ParticleIO/WorkbenchWorkspaceLocal/BLINKERLOCAL2/target//Projects' ../../../build/[module.mk:227](http://module.mk:227): warning: ignoring old recipe for target ParticleIO/WorkbenchWorkspaceLocal/BLINKERLOCAL2/target//Projects'
../../../build/module.mk:235: target for' given more than once in the same rule. ../../../build/[module.mk:260](http://module.mk:260): warning: overriding recipe for target /home/john/Projects'
../../../build/module.mk:236: warning: ignoring old recipe for target /home/john/Projects' ../../../build/[module.mk:260](http://module.mk:260): warning: overriding recipe for target for'
../../../build/module.mk:236: warning: ignoring old recipe for target `for'
../../../build/module.mk:259: *** mixed implicit and normal rules. Stop.
make[1]: *** [modules/photon/user-part] Error 2
make: *** [compile-user] Error 2
The terminal process terminated with exit code: 2
No, I have never been able to have a successful compile. Cleaning with either command results with a similar error as before. I will include the dump again after I list differences in your file and mine.
Anything with target before it is missing.
"cli": section has this in addition
"version": "1.40.0",
"installed": 1553803760927
“location”: “/home/john/Projects for ParticleIO/WorkbenchWorkspaceLocal/BLINKERLOCAL2”
if so, we don’t support spaces in file paths since the underlying make system does not handle them well (if at all) - see:
this would explain the error(s) you are seeing - e.g:
recipe for targetParticleIO/WorkbenchWorkspaceLocal/BLINKERLOCAL2/target//Projects’
…/…/…/build/module.mk:235: target for' given more than once in the same rule.
just to confirm, can you try creating a project at a location without any spaces in the path and then building that?
Deleting spaces in the directory name fixed the problem and now I can do a local compile. I have not been a Linux user, so got caught by this. Ubuntu Linux did not prevent me from using spaces in the directory name. It would be good to note this in the example documentation for local compile.
Thank you much the help and for your timely responses.
this means that our openocd lib is not able to run for some reason. on some systems, we need an additional system-wide dependency - see:
to verify this applies to you, run the Particle: Launch Compiler Shell command then in the terminal pane that launches enter arm-none-eabi-gdb --version - if that returns an error like:
error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
run sudo apt-get install libncurses5:i386 to install the missing dependency.
otherwise, try running the Particle: Reset Environment command and once that completes re-run Particle: Audit Environment and check the localCompiler section to see if everything reports ok: true
if that still doesn't get things back on track, try running:
john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/BlinkLED$ arm-none-eabi-gdb --version
arm-none-eabi-gdb: command not found
Tried Reset Environment command and got same result. So now what. I should mention that I could flash the device the the program doesn’t light the LED even though the software matches my wiring. The blue on the Electron D7 LED doesn’t light either, probably due to this problem?
By editinig the .bashrc file in the home directory by adding : ~/.particle/goolchains/gcc-arm/5.3.1/bin/ and saving the file, closing Visual Studio and restating it I was able to compile flash the program and have both the D6 (external whilte) and the D7 (blue) LED flash.
I did another Audit Environment get this as before:
…
{
“id”: “openocd@0.10.0-particle.1”,
“ok”: false
}
Then ran some of your suggested code from above and got the results below:
john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/BlinkLED$ ~/.particle/toolchains/openocd/0.10.0-particle.1/bin/openocd --version
/home/john/.particle/toolchains/openocd/0.10.0-particle.1/bin/openocd: error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory
john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/BlinkLED$
we prepend your current path with a series of directory locations when we launch the compiler shell terminal. from the look of it, it seems your PATH is not being properly set - perhaps due to how you've configured your .bashrc. as you can see from running ls ~/.particle/toolchains/gcc-arm/5.3.1/bin/, the binaries are available, it's just that PATH doesn't have the locations required to look them up properly.
can you check your .bashrc for a line like:
export PATH=
and share the non-sensitive bits of that line
By editinig the .bashrc file in the home directory by adding : ~/.particle/goolchains/gcc-arm/5.3.1/bin/
you shouldn't have to modify your env at all (missing libs aside though my longer-term aim is for you not to have to worry about those either). my hunch is that your .bashrc is doing something funny
error while loading shared libraries: libusb-0.1.so.4
ah, looks like you need yet another lib - running sudo apt-get install libusb-0.1-4 in a standard terminal should get you what you need. more info and options here:
i really appreciate you working through these issues - everything we've uncovered here will help others as we evolve the tool and improve docs
There is no export PATH= statement. I was going to add it that way, but appended the PATH=PATH= statement in the .bashrc file. Don’t think there should be two PATH= 's.
export - exposes a variable or function to child processes PATH=$PATH - prepend the current PATH to your new PATH : - item delimiter <any non-default locations here> - this is where you add any custom (non-default) locations - e.g. /foo/bar:/foo/baz - if you don't have any, you can omit.
I installed the library sudo apt-get install libusb-0.1-4 as you showed above.
I put export PATH=$PATH:/usr/local/gcc-arm/bin at the end of the .bashrc file
Now an Audit Environment shows:
{
“id”: “openocd@0.10.0-particle.1”,
“ok”: true
},
and the other dependencies as true.
As far as I know everything is working as it should and I’ve learned some things. Thanks much!
I am not sure if I’ve left some confidential information in this thread. Could you please take a look and let me know if there is anything else I should have deleted?