# Can't compile due to Makefile

**URL:** <https://community.particle.io/t/cant-compile-due-to-makefile/65508>\
**Category:** Firmware\
**Created:** [September 26, 2023, 11:50am UTC](https://community.particle.io/t/cant-compile-due-to-makefile/65508 "2023-09-26T11:50:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![BazookaBan](https://avatars.discourse-cdn.com/v4/letter/b/a5b964/32.png) [@BazookaBan](https://community.particle.io/u/BazookaBan)\
**Post date:** [September 26, 2023, 11:50am UTC](https://community.particle.io/t/cant-compile-due-to-makefile/65508/1 "2023-09-26T11:50:10Z")

</div>

Hi all,

I have suddenly gotten a error when I try to compile my program:

:::: COMPILING APPLICATION & DEVICE OS

make[1]: MyUserName.particle\toolchains\buildscripts\1.15.0\Makefile: No such file or directory  
make[1]: \*\*\* No rule to make target 'MyUserName.particle\toolchains\buildscripts\1.15.0\Makefile'. Stop.  
make: \*\*\* [C:\Users\MyUserName.particle\toolchains\buildscripts\1.15.0\Makefile:95: compile-all] Error 2

- The terminal process "C:\Users\MyUserName.particle\toolchains\buildtools\1.1.1\bin\bash.exe '-c', 'make -f 'C:\Users\MyUserName.particle\toolchains\buildscripts\1.15.0\Makefile' compile-all -s'" terminated with exit code: 2.
- Press any key to close the terminal.

(I have replaced my name with 'MyUserName')

I'm new to this device but I have gotten a few program to run without any error. Now my new program and the previous ones won't compile. Does anyone have a way around this error and perhaps get the compiler to create the Makefiler again?

I'm using Visual Studio Code with the Workbench extension. I have tried to uninstall both and reinstall them.

I'm running an Argon which is connected via USB and the LED is "breating cyan" which should indicate that it is running & ready for compile + flash.

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [September 26, 2023, 1:03pm UTC](https://community.particle.io/t/cant-compile-due-to-makefile/65508/2 "2023-09-26T13:03:31Z")

</div>

I would first try **Particle: Configure Project for Device** and reselect your Device and Device OS version.

If that doesn't work, try **Particle: Install Local Compiler Toolchain**.

You could also try cloud compiling instead of local compiling using **Particle: Cloud flash** which is generally much easier and faster, especially with the Argon.

---

<div class="post-metadata">

**Author:** ![BazookaBan](https://avatars.discourse-cdn.com/v4/letter/b/a5b964/32.png) [@BazookaBan](https://community.particle.io/u/BazookaBan)\
**Post date:** [September 28, 2023, 10:54am UTC](https://community.particle.io/t/cant-compile-due-to-makefile/65508/3 "2023-09-28T10:54:57Z")

</div>

Thank you for your reply !

I tried Particle: Configure Project for Device and Particle: Install Local Compiler Toolchain and both fully processed both the problem remains - it won't compile! It gives the same error code as before.

I tried Cloud compile which is able to compile & flash the Argon but I can't see any messages printed in the console with the Serial.printf("Hello World") command. But I have a test project where I send data to a Thinksspeak project and this project does recieve data from the Argon so it must work in some sense.

I tried to read some of the info from:

[Troubleshooting the Particle Workbench | Troubleshooting | Particle](https://docs.particle.io/troubleshooting/guides/build-tools-troubleshooting/troubleshooting-the-particle-workbench/)

And from this link

 ![image](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/b/b/bb8ca73c349040207a3a6be2fabacbdf8a5d0f42.png)

The "arch" does indicate an x86 on my end and that is not support as I understand it. But how to I change that to something that works with the Argon?

---

<div class="post-metadata">

**Author:** ![hovercraft](https://avatars.discourse-cdn.com/v4/letter/h/e495f1/32.png) [@hovercraft](https://community.particle.io/u/hovercraft)\
**Post date:** [March 19, 2024, 7:21pm UTC](https://community.particle.io/t/cant-compile-due-to-makefile/65508/4 "2024-03-19T19:21:03Z")

</div>

Was this issue ever resolved? I am having the same issue. The only difference is that I working with the BSOM instead of Argon. But the symptoms are the same and the suggested fix posted by rickkas7 doesn't work.

Any updates on how this has been fixed would be appreciated.

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [March 20, 2024, 5:53pm UTC](https://community.particle.io/t/cant-compile-due-to-makefile/65508/5 "2024-03-20T17:53:50Z")

</div>

Did you follow the steps to repair your environment above? There's a [longer list of steps](https://docs.particle.io/troubleshooting/guides/build-tools-troubleshooting/troubleshooting-the-particle-workbench/#ensuring-particle-workbench-is-properly-installed-and-configured-for-your-system) in the docs.

If that doesn't fix it, scroll to the end of that page and follow the instructions to get an environment report.

---

<div class="post-metadata">

**Author:** ![hovercraft](https://avatars.discourse-cdn.com/v4/letter/h/e495f1/32.png) [@hovercraft](https://community.particle.io/u/hovercraft)\
**Post date:** [March 20, 2024, 6:15pm UTC](https://community.particle.io/t/cant-compile-due-to-makefile/65508/6 "2024-03-20T18:15:04Z")

</div>

Can you send that link again? The link that was in your last post was to a New York Times article.

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [March 20, 2024, 6:16pm UTC](https://community.particle.io/t/cant-compile-due-to-makefile/65508/7 "2024-03-20T18:16:03Z")

</div>

Oops. I corrected the link.

---

<div class="post-metadata">

**Author:** ![hovercraft](https://avatars.discourse-cdn.com/v4/letter/h/e495f1/32.png) [@hovercraft](https://community.particle.io/u/hovercraft)\
**Post date:** [March 21, 2024, 12:57am UTC](https://community.particle.io/t/cant-compile-due-to-makefile/65508/8 "2024-03-21T00:57:41Z")

</div>

Thanks for correcting the link. The instructions in the linked website directs me to first run a basic workbench functionality test, wherein I create a new blank project and perform a local compile of a blank firmware. It is during that local compile that I receive the errors referenced previously, which are:

> - Executing task: make -f 'C:\Users\MyUserName.particle\toolchains\buildscripts\1.15.0\Makefile' compile-all
> 
> C:\Users\MyUserName.particle\toolchains\buildscripts\1.15.0\Makefile:156: target '-' given more than once in the same rule
> 
> :::: COMPILING APPLICATION & DEVICE OS
> 
> make -f Name.particle\toolchains\buildscripts\1.15.0\Makefile compile-all-steps  
> make[1]: Entering directory '/cygdrive/c/Users/MyUserName/Company Name/Docs - Documents/Clients/Other Company/Code/Particle/SetupTest'  
> make[1]: Name.particle\toolchains\buildscripts\1.15.0\Makefile: No such file or directory  
> make[1]: \*\*\* No rule to make target 'Name.particle\toolchains\buildscripts\1.15.0\Makefile'. Stop.  
> make[1]: Leaving directory '/cygdrive/c/Users/MyUserName/Company Name/Docs - Documents/Clients/Other Company/Code/Particle/SetupTest'  
> make: \*\*\* [C:\Users\MyUserName.particle\toolchains\buildscripts\1.15.0\Makefile:95: compile-all] Error 2
> 
> - The terminal process "C:\Users\MyUserName.particle\toolchains\buildtools\1.1.1\bin\bash.exe '-c', 'make -f 'C:\Users\MyUserName.particle\toolchains\buildscripts\1.15.0\Makefile' compile-all'" terminated with exit code: 2.

The above is the same error in the initial post of this thread.

I checked all the items in the Environment Report, as specified in the link given. All of the elements appeared exactly as specified.

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [March 21, 2024, 8:21am UTC](https://community.particle.io/t/cant-compile-due-to-makefile/65508/9 "2024-03-21T08:21:06Z")

</div>

Which command are you using to invoke the build? From the command palette (and which command) or from the compiler shell?

What version of the Workbench core plug-in?

Does your project pathname contain spaces? This should work in the most recent version when using the Command Palette, but does not work on earlier versions and is tricky to make work from the command prompt.

---

<div class="post-metadata">

**Author:** ![hovercraft](https://avatars.discourse-cdn.com/v4/letter/h/e495f1/32.png) [@hovercraft](https://community.particle.io/u/hovercraft)\
**Post date:** [March 26, 2024, 3:55pm UTC](https://community.particle.io/t/cant-compile-due-to-makefile/65508/10 "2024-03-26T15:55:19Z")

</div>

The problem was spaces in the pathname. I started a new project in a different location, without spaces in the pathname. The problem no longer appeared.

For reference, I invoked the compile command by clicking on "Local compile" in the Particle Workbench tab. I had exactly the same result by clicking on the "Compile Project" button in the upper right toolbar. I am running version 1.16.15 of the Workbench core plug-in.

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [March 27, 2024, 5:06pm UTC](https://community.particle.io/t/cant-compile-due-to-makefile/65508/11 "2024-03-27T17:06:46Z")

</div>

Closed on March 27, 2024, 5:06pm UTC


