# First local build - problem with Netbean build

**URL:** <https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449>\
**Category:** Troubleshooting\
**Created:** [June 30, 2014, 1:08pm UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449 "2014-06-30T13:08:01Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevespark](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@stevespark](https://community.particle.io/u/stevespark)\
**Post date:** [June 30, 2014, 1:08pm UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/1 "2014-06-30T13:08:01Z")

</div>

I can make the files from a DOS terminal in Windows 7 but I keep getting the following error when making the initial file in NetBeans. It appears to be fine for the first two libraries:-

Building core-common-lib  
make[1]: Nothing to be done for `all’.

Building core-communication-lib  
make[1]: Nothing to be done for `all’.

But then errors when building the firmware:-

make: \*\*\* [core-firmware.elf] Error 2

---

<div class="post-metadata">

**Author:** ![suda](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/suda/32/18449_2.png) [@suda](https://community.particle.io/u/suda)\
**Post date:** [June 30, 2014, 1:11pm UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/2 "2014-06-30T13:11:24Z")

</div>

Check if `arm-none-eabi-gcc` is in your PATH (i.e. try to run it in command line). If it’s not, try following this: [How to set the path in Windows 7](http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx)

---

<div class="post-metadata">

**Author:** ![mdma](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mdma/32/1924_2.png) [@mdma](https://community.particle.io/u/mdma)\
**Post date:** [June 30, 2014, 1:13pm UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/3 "2014-06-30T13:13:55Z")

</div>

Error 2 is file not found. 😃 If you can post the errors you get, we might be able to see which file is not found.

---

<div class="post-metadata">

**Author:** ![stevespark](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@stevespark](https://community.particle.io/u/stevespark)\
**Post date:** [June 30, 2014, 2:43pm UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/4 "2014-06-30T14:43:36Z")

</div>

Thanks. I have made sure the PATH variables have been set for the development tolls as per instructions but I will add that path and see what happens

---

<div class="post-metadata">

**Author:** ![stevespark](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@stevespark](https://community.particle.io/u/stevespark)\
**Post date:** [June 30, 2014, 2:47pm UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/5 "2014-06-30T14:47:14Z")

</div>

Thanks, as you are aware I have been content using the cloud compiler but had problems with the Flashee library. I’ll persevere and try the additional PATH variable suggested by Suda. If necessary I’ll post more of the error message.

Didn’t work :-

Building core-common-lib  
Building file: …/CC3000\_Host\_Driver/cc3000\_common.c  
Invoking: ARM GCC C Compiler  
mkdir -p obj/CC3000\_Host\_Driver/  
arm-none-eabi-gcc -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -I…/CC3000\_Host\_Driver -I…/SPARK\_Firmware\_Driver/inc -I…/STM32\_USB-FS-Device\_Driver/inc -I…/STM32F10x\_StdPeriph\_Driver/inc -I…/CMSIS/Include -I…/CMSIS/Device/ST/STM32F10x/Include -I. -ffunction-sections -Wall -Wno-switch -fmessage-length=0 -MD -MP -MF obj/CC3000\_Host\_Driver/cc3000\_common.o.d -DUSE\_STDPERIPH\_DRIVER -DSTM32F10X\_MD -DRELEASE\_BUILD -c -o obj/CC3000\_Host\_Driver/cc3000\_common.o …/CC3000\_Host\_Driver/cc3000\_common.c  
process\_begin: CreateProcess(NULL, arm-none-eabi-gcc -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -I…/CC3000\_Host\_Driver -I…/SPARK\_Firmware\_Driver/inc -I…/STM32\_USB-FS-Device\_Driver/inc -I…/STM32F10x\_StdPeriph\_Driver/inc -I…/CMSIS/Include -I…/CMSIS/Device/ST/STM32F10x/Include -I. -ffunction-sections -Wall -Wno-switch -fmessage-length=0 -MD -MP -MF obj/CC3000\_Host\_Driver/cc3000\_common.o.d -DUSE\_STDPERIPH\_DRIVER -DSTM32F10X\_MD -DRELEASE\_BUILD -c -o obj/CC3000\_Host\_Driver/cc3000\_common.o …/CC3000\_Host\_Driver/cc3000\_common.c, …) failed.  
make (e=2): The system cannot find the file specified.

make[1]: \*\*\* [obj/CC3000\_Host\_Driver/cc3000\_common.o] Error 2  
make: \*\*\* [check\_external\_deps] Error 2

---

<div class="post-metadata">

**Author:** ![foggy](https://avatars.discourse-cdn.com/v4/letter/f/f17d59/32.png) [@foggy](https://community.particle.io/u/foggy)\
**Post date:** [June 30, 2014, 3:10pm UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/6 "2014-06-30T15:10:09Z")

</div>

Hi @stevespark,

Did you install as per this video?  
[Spark Core Compiling Locally in Windows](http://www.youtube.com/watch?v=xBCxYbtDbVA)

Please look at the comments:  
There were issues with the suggested path names (dashes included) and also check the Version you actually down loaded match your path.

Hope this helps.  
I just remember that something like this caught me out too. 😄

Best wishes.

James.

---

<div class="post-metadata">

**Author:** ![Hootie81](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hootie81/32/2879_2.png) [@Hootie81](https://community.particle.io/u/Hootie81)\
**Post date:** [June 30, 2014, 3:24pm UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/7 "2014-06-30T15:24:28Z")

</div>

Where are you saving the files? is it in program files or did you do the directories in the setup video?

did you use git to download the repo’s or did you create the folders? Check the typing of folder names for core-fimware… core-common-lib… core-communication-lib etc

---

<div class="post-metadata">

**Author:** ![suda](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/suda/32/18449_2.png) [@suda](https://community.particle.io/u/suda)\
**Post date:** [June 30, 2014, 5:30pm UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/8 "2014-06-30T17:30:49Z")

</div>

@stevespark try typing those commands in the same folder you run make:

- `arm-none-eabi-gcc`
- `chdir`
- `dir ..\..\core-common-lib`

and post results here.

---

<div class="post-metadata">

**Author:** ![stevespark](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@stevespark](https://community.particle.io/u/stevespark)\
**Post date:** [June 30, 2014, 5:38pm UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/9 "2014-06-30T17:38:58Z")

</div>

In the terminal window this is what I get:

C:\Spark\core-common-lib\>arm-none-eabi-gcc  
arm-none-eabi-gcc: fatal error: no input files  
compilation terminated.

C:\Spark\core-common-lib\>

---

<div class="post-metadata">

**Author:** ![suda](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/suda/32/18449_2.png) [@suda](https://community.particle.io/u/suda)\
**Post date:** [June 30, 2014, 6:00pm UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/10 "2014-06-30T18:00:57Z")

</div>

You should be running make from `core-firmware\build` folder. Could you `cd` into this directory and try to run `make` and other commands from previous post?

---

<div class="post-metadata">

**Author:** ![stevespark](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@stevespark](https://community.particle.io/u/stevespark)\
**Post date:** [July 1, 2014, 7:17am UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/11 "2014-07-01T07:17:56Z")

</div>

Thanks everyone for your advice. This has spurred me on and I now have a working system for local compilation. I am not using NetBeans at the moment but will sort it out later.  
Regarding the Flashee library, I have found that the .cpp files need editing to allow them to point to Flashee headers in the src\inc\flashee-eeprom\ folder rather than the standard src.inc\ for headers. Once these library files are edited all works fine.

The data logging is now working using the external eeprom storage - congratulation to mdma on this very useful functionality.

---

<div class="post-metadata">

**Author:** ![v8dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/v8dave/32/2616_2.png) [@v8dave](https://community.particle.io/u/v8dave)\
**Post date:** [July 1, 2014, 10:21am UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/12 "2014-07-01T10:21:53Z")

</div>

I’ve setup Netbeans to build the source and programme it using DFU but each time I do this, the core is not connected to the WiFi anymore.

Is it possible to programme it without losing the WiFi credentials?

Also, does anyone have instructions on how to do debugging with JTAG using Netbeans? I have a SEGGER J-LINK and was wondering if this can be used?

---

<div class="post-metadata">

**Author:** ![mdma](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mdma/32/1924_2.png) [@mdma](https://community.particle.io/u/mdma)\
**Post date:** [July 1, 2014, 10:47am UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/13 "2014-07-01T10:47:56Z")

</div>

Glad you got it working. If you copy the flashee headers to a new inc\flashee-eeprom directory then it will work unmodified. This is described in the [README.md](https://github.com/m-mcgowan/spark-flashee-eeprom/blob/master/README.md). This is in general how you can make libraries work locally - create a new directory for the library headers under `inc`.

---

<div class="post-metadata">

**Author:** ![stevespark](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@stevespark](https://community.particle.io/u/stevespark)\
**Post date:** [July 1, 2014, 11:05am UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/14 "2014-07-01T11:05:25Z")

</div>

I followed the readme file as instructed but still had a problem when make could not build due to the path in the library .cpp files. I had to manually change each of the the library headers from “#include _.h" to "#include flashee-eeprom/_.h”. I used Github to download the files so perhaps that is where the directory path was lost?

---

<div class="post-metadata">

**Author:** ![stevespark](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@stevespark](https://community.particle.io/u/stevespark)\
**Post date:** [July 1, 2014, 11:07am UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/15 "2014-07-01T11:07:49Z")

</div>

I am not able to help with your JTAG issue but can tell you that when I make from a terminal window and dfu the Wifi credentials are retained.

---

<div class="post-metadata">

**Author:** ![mdma](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mdma/32/1924_2.png) [@mdma](https://community.particle.io/u/mdma)\
**Post date:** [July 1, 2014, 11:18am UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/16 "2014-07-01T11:18:46Z")

</div>

Can you post the command line you are using for dfu? DFU programming shouldn’t be knocking out your wifi credentials. Although be sure you only hold the mode button long enough to get to the flashing yellow (dfu-mode) - not flashing white (factory reset), since then you’ll lose the wifi credentials.

---

<div class="post-metadata">

**Author:** ![v8dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/v8dave/32/2616_2.png) [@v8dave](https://community.particle.io/u/v8dave)\
**Post date:** [July 1, 2014, 11:30am UTC](https://community.particle.io/t/first-local-build-problem-with-netbean-build/5449/17 "2014-07-01T11:30:27Z")

</div>

I used the command line for dfu as per the githbub readme

dfu-util -d 1d50:607f -a 0 -s 0x08005000:leave -D core-firmware.bin

I am still working on the JTAG but so far the GDB server with the J-LINK has detected the Spark core so all I need now is to configure Netbeans to do the debugging and I am in business.
