Can't flash firmware [SOLVED]

Something has happened recently. I pulled the recent changes from the official github repos, and suddenly my Eclipse IDE setup is unbale to build the firmware:

Building file: ../src/application.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p obj/src/
arm-none-eabi-gcc -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb  -I../inc -I../../core-common-lib/CMSIS/Include -I../../core-common-lib/CMSIS/Device/ST/STM32F10x/Include -I../../core-common-lib/STM32F10x_StdPeriph_Driver/inc -I../../core-common-lib/STM32_USB-FS-Device_Driver/inc -I../../core-common-lib/CC3000_Host_Driver -I../../core-common-lib/SPARK_Firmware_Driver/inc -I../../core-communication-lib/lib/tropicssl/include -I../../core-communication-lib/src -I. -ffunction-sections -Wall -fmessage-length=0 -MD -MP -MF obj/src/application.o.d -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -DDFU_BUILD_ENABLE -DRELEASE_BUILD -fno-exceptions -fno-rtti  -c -o obj/src/application.o ../src/application.cpp
In file included from ../inc/application.h:31:0,
             from ../src/application.cpp:27:
../inc/spark_wiring.h:30:20: fatal error: config.h: No such file or directory
 #include "config.h"
compilation terminated.
make: *** [obj/src/application.o] Error 1

At the same time, when I try to use the Web IDE the process is, at best, very long: after I click on the flash icon in the IDE the :spark: reacts almost immediately switching to an intermitted blue slow flash which keeps going for about 2 minutes. If I’m lucky, after a couple of minutes the LED then turns magenta and the flash process starts, but must of the times the led just keeps going blue.

Any advice? I wish to get Eclipse IDE back as that is a much faster setup for development.

My first hypothesis would be that there is some mismatch between the branches of the three repositories on your system. Have you updated all three repositories to the latest master?

@rlogiacco I don’t have any suggestions for the Web IDE issue, but today I pulled the latest updates from the spark master branches - core-firmware, core-common-lib and core-communication-lib - and did a clean build. The build was successful.

I’m not familiar with the Eclipse IDE configuration but you may want to manually run make clean in the core-firmware\build directory after pulling the git updates for all three repositories and before doing a new build.

Below is my master branch update script that I run from a git command prompt (Windows). It pulls and rebuilds the latest firmware for the Spark Core. I run it in the parent directory to a 2-master subdirectory. 2-master is the parent directory to the three Spark firmware directories.

Maybe a full rebuild will solve your local build issue.

pushd 2-master

pushd core-firmware\build
make clean

cd core-firmware
git remote update
git checkout master
git pull

cd ..\core-common-lib
git remote update
git checkout master
git pull

cd ..\core-communication-lib
git remote update
git checkout master
git pull


I’ve pulled everything from the three repositories and updated to head. I confirm the mentioned config.h file is available under the core-communication-lib project and I’ve run a clean before executing the all make target.

Somehow the core-communication.lib got some breaking changes:

22:41:03 **** Incremental Build of configuration Build (GNU) for project core-communication-lib ****
make all 
process_begin: CreateProcess(NULL, g++ -g -Wall -W -Winline -ansi -Ilib/tropicssl/include -Isrc -Itests/UnitTest++/src -c -o src/handshake.o src/handshake.cpp, ...) failed.
make (e=2): Impossibile trovare il file specificato.

make: *** [src/handshake.o] Error 2

22:41:03 Build Finished (took 142ms)

Any idea what this could be?

After cloning the project from scratch I was able to execute a make all with no issue.

I’ll mark this as solved and try to figure out what was wrong with my pull.

Thanks everybody.

1 Like