I have troubles compiling brewPi Spark code.
I cloned “firmware” and “spark-firmware” repositories into the same folder.
I also downloaded and installed the required dependencies.
My machine is running Debian Wheezy 64-bits.
So, to compile I did the following:
cd firmware/platform/spark
make
(Note: the firmware/spark/ directory listed in the readme doesn’t exist… I guess it was a typo).
I had already tried that, but after recompiling some of the file the compilation exits at the same point.
See terminal output here below.
GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for x86_64-pc-linux-gnu Reading makefiles... Updating goal targets.... File `all' does not exist. File `wiring' does not exist. Must remake target `wiring'. make[1]: Entering directory `/brewpi/spark-firmware/main' Successfully remade target file `wiring'. File `services' does not exist. Must remake target `services'. Successfully remade target file `services'. File `communication' does not exist. Must remake target `communication'. Successfully remade target file `communication'. File `hal' does not exist. Must remake target `hal'. Successfully remade target file `hal'. File `platform' does not exist. Must remake target `platform'. Successfully remade target file `platform'. File `elf' does not exist. File `../build/target/main/prod-0/../../firmware/platform/spark/targetbrewpi.elf' does not exist. File `../build/target/main/prod-0/../../firmware/platform/avr/arduino/cores/arduino/WInterrupts.o' does not exist. Must remake target `../build/target/main/prod-0/../../firmware/platform/avr/arduino/cores/arduino/WInterrupts.o'. ../../firmware/platform/avr/arduino/cores/arduino/WInterrupts.c:28:20: fatal error: avr/io.h: No such file or directory #include <avr/io.h> ^ compilation terminated. make[1]: *** [../build/target/main/prod-0/../../firmware/platform/avr/arduino/cores/arduino/WInterrupts.o] Error 1 make[1]: Leaving directory `/home/fleppi/prj/brewpi/spark-firmware/main' make: *** [run_make] Error 2
According to your last reply this is what I tried today:
cd ~/prj/brewpi/firmware/
git checkout feature/sparktest
So, I’m on 7161f3e commit for the firmware repository.
cd ~/prj/brewpi/spark-firmware/
The problem here is that there is no feature/hal branch.
Did you push it into the origin?
I can see some references to a feature/hal branch in the commit comments and I can see the branch in the core-firmware repository, but not in the spark-firmware repository.
I tried anyway different commits or branches in the spark-firmware repository
Ok, looking at your instructions on the spark forum I found what I was missing.
I just didn’t have the official firmware repository as a remote.
Now that it’s added and the correct commits are checked out, the compilation works like a charm under my linux machine.
Thanks for the support and can’t wait to receive the BrewPi Spark hardware to start contributing!
So here is a summary of the steps I did to get it to work on my pc running Debian:
Install git, make & tig (use tig --all to see all the commits and branches)
sudo apt-get install git make tig
Install the arm gcc compiler (latest version here). Check the readme for more details.
mkdir ~/bin
cd ~/bin
wget https://launchpad.net/gcc-arm-embedded/4.9/4.9-2014-q4-major/+download/gcc-
arm-none-eabi-4_9-2014q4-20141203-linux.tar.bz2
tar xjf gcc-arm-none-eabi-4_9-2014q4-20141203-linux.tar.bz2
I had also to install ia32-libs (may only be needed on 64 bits systems)