File tree Expand file tree Collapse file tree 16 files changed +91
-41
lines changed Expand file tree Collapse file tree 16 files changed +91
-41
lines changed Original file line number Diff line number Diff line change @@ -52,3 +52,5 @@ deploy/
52
52
controlbox /build
53
53
54
54
app /cbox /proto /cpp /
55
+
56
+ build /target /
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -79,12 +79,9 @@ CFLAGS += -Werror=deprecated-declarations
79
79
# Generate dependency files automatically.
80
80
CFLAGS += -MD -MP -MF $@ .d
81
81
CFLAGS += -DDEBUG_BUILD
82
- # OSX includes sys/wait.h which defines "wait"
83
- CFLAGS += -D_SYS_WAIT_H_ -D_SYS_WAIT_H
84
82
85
83
CPPFLAGS += -std=gnu++11
86
- # doesn't work on osx
87
- # LDFLAGS += -Wl,--gc-sections
84
+ LDFLAGS += -Wl,--gc-sections
88
85
89
86
# Collect all object and dep files
90
87
ALLOBJ += $(addprefix $(BUILD_PATH ) , $(CSRC:.c=.o ) )
Original file line number Diff line number Diff line change 1
-
2
-
3
1
function makeit()
4
2
{
5
3
echo " building $* "
14
12
15
13
function makeapp()
16
14
{
17
- makeit PLATFORM=core $*
18
15
makeit PLATFORM=photon $*
19
16
makeit PLATFORM=P1 $*
20
17
}
21
18
22
19
pwd
23
- makeapp APP=controller
20
+ # makeapp APP=controller
24
21
makeapp APP=cbox
Original file line number Diff line number Diff line change
1
+ $(MAKECMDGOALS ) : run_make
2
+
3
+ .PHONY : run_make
4
+
5
+ current_dir := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST ) ) ) )
6
+ APPDIR := $(realpath $(current_dir ) /..)
7
+ SPARKDIR := $(APPDIR ) /platform/spark/firmware
8
+
9
+ APP ?= controller
10
+ APP_MAKEFILE := app/$(APP ) /build.mk
11
+ WARNINGS_AS_ERRORS ?=n
12
+ USE_PRINTF_FLOAT ?=n
13
+
14
+ run_make :
15
+ echo " Building app $( APP) from $( APP_MAKEFILE) "
16
+ @$(MAKE ) -C $(SPARKDIR ) /main \
17
+ APPDIR=$(APPDIR ) \
18
+ USER_MAKEFILE=$(APP_MAKEFILE ) \
19
+ USE_PRINTF_FLOAT=$(USE_PRINTF_FLOAT ) \
20
+ WARNINGS_AS_ERRORS=$(WARNINGS_AS_ERRORS ) \
21
+ TARGET_DIR=$(current_dir ) /target/$(APP ) -$(PLATFORM ) \
22
+ BUILD_PATH_BASE=$(current_dir ) /target \
23
+ $(MAKEOVERRIDES ) $(MAKECMDGOALS )
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ result=$?
20
20
popd
21
21
status $result
22
22
23
- pushd platform/spark
23
+ pushd build
24
24
./build-all.sh
25
25
result=$?
26
26
popd
Original file line number Diff line number Diff line change 1
- BOOST_VERSION=1_63_0
2
- url=http://downloads.sourceforge.net/project/boost/boost/1.63 .0/boost_$BOOST_VERSION .tar.gz
1
+ BOOST_VERSION=1_67_0
2
+ url=http://downloads.sourceforge.net/project/boost/boost/1.67 .0/boost_$BOOST_VERSION .tar.gz
3
3
mkdir -p .cache/boost
4
4
dl=.cache/boost/boost_$BOOST_VERSION .tar.gz
5
5
test -f $dl || (
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:16.04
2
+
3
+ RUN apt-get update -q && apt-get install -qy git bash curl
4
+ RUN apt-get update -q && apt-get install -qy build-essential
5
+
6
+ ENV GCC_ARM_URL="https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q1-update/+download/gcc-arm-none-eabi-5_3-2016q1-20160330-linux.tar.bz2"
7
+ ENV GCC_ARM_VERSION="5_3-2016q1"
8
+
9
+ RUN dpkg --add-architecture i386 && apt-get update -q && apt-get install -qy make isomd5sum bzip2 vim-common libarchive-zip-perl libc6:i386 \
10
+ && curl -o /tmp/gcc-arm-none-eabi.tar.bz2 -sSL ${GCC_ARM_URL} \
11
+ && tar xjvf /tmp/gcc-arm-none-eabi.tar.bz2 -C /usr/local \
12
+ && mv /usr/local/gcc-arm-none-eabi-${GCC_ARM_VERSION}/ /usr/local/gcc-arm-embedded \
13
+ && apt-get remove -qy bzip2 && apt-get clean && apt-get purge \
14
+ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/local/gcc-arm-embedded/share
15
+
16
+ ENV PATH /usr/local/gcc-arm-embedded/bin:$PATH
17
+
18
+ COPY scripts /scripts
19
+
20
+ ENV BOOST_VERSION=1_67_0
21
+ ENV BOOST_HOME=/boost
22
+ ENV BOOST_ROOT=$BOOST_HOME/boost_$BOOST_VERSION
23
+
24
+ RUN bash /scripts/download_boost.sh
25
+ RUN bash /scripts/build_boost.sh
26
+
27
+ WORKDIR /firmware/build
28
+ CMD bash
Original file line number Diff line number Diff line change
1
+ version : ' 2'
2
+ services :
3
+ compiler :
4
+ build : .
5
+ image : brewpi/firmware-compiler
6
+ container_name : firmware-compiler
7
+ hostname : firmware-compiler.local
8
+ volumes :
9
+ - ../:/firmware
10
+ - " /etc/timezone:/etc/timezone:ro"
11
+ - " /etc/localtime:/etc/localtime:ro"
12
+
13
+ networks :
14
+ default :
15
+ driver : bridge
16
+
Original file line number Diff line number Diff line change
1
+ To make it easier to build the firmware on various platforms, a docker container is used to run the build process.
2
+
3
+ To build simply run these commands in the docker directory:
4
+
5
+ docker-compose build
6
+ docker-compose run compiler make PLATFORM=p1
Original file line number Diff line number Diff line change
1
+ cd /firmware/platform/spark/firmware/modules
2
+ make all PLATFORM=p1
3
+ make all PLATFORM=photon
Original file line number Diff line number Diff line change
1
+ pushd $BOOST_ROOT
2
+ ./bootstrap.sh
3
+ ./b2 --with-thread --with-system --with-program_options --with-random --with-regex --threading=single
4
+ popd
Original file line number Diff line number Diff line change
1
+ url=http://downloads.sourceforge.net/project/boost/boost/1.67.0/boost_$BOOST_VERSION .tar.gz
2
+ mkdir -p $BOOST_HOME
3
+ curl -sSL ${url} | tar -xz -C $BOOST_HOME
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3
3
#include " flashee-eeprom.h"
4
4
5
5
#include " EepromTypes.h"
6
+ #include < algorithm>
6
7
7
8
namespace Flashee {
8
9
class FlashDevice ;
You can’t perform that action at this time.
0 commit comments