-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
56 lines (39 loc) · 2.12 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM rweickelt/qbs as downloader
ENV SDK=simplelink_cc13x0_sdk_1_50_00_08 \
XDC=xdctools_3_50_03_33_core
RUN apt-get update && apt-get install -y bzip2 zip wget
RUN wget -nv --continue --tries=20 --waitretry=10 --retry-connrefused \
--no-dns-cache --timeout 300 \
https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2
RUN tar xjf gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 -C /opt/
RUN wget -nv --continue --tries=20 --waitretry=10 --retry-connrefused \
--no-dns-cache --timeout 300 \
"http://downloads.ti.com/ccs/esd/tirex/zips/${SDK}/${SDK}__linux.zip"
RUN unzip -q -o -d /opt/ti/ \
"${SDK}__linux.zip" \
-x "${SDK}/docs/*" \
"${SDK}/examples/*" \
"${SDK}/tools/*" \
"${SDK}/source/ti/blestack/*"
RUN wget -nv --continue --tries=20 --waitretry=10 --retry-connrefused \
--no-dns-cache --timeout 300 \
"http://downloads.ti.com/ccs/esd/tirex/zips/${XDC}/${XDC}__linux.zip"
RUN unzip -q -o -d /opt/ti/ \
"${XDC}__linux.zip"
FROM rweickelt/qbs
ENV SDK=simplelink_cc13x0_sdk_1_50_00_08 \
XDC=xdctools_3_50_03_33_core \
TOOLCHAIN=gcc-arm-none-eabi-6-2017-q2-update
RUN apt-get update && apt-get install -y gcc-multilib
COPY qbs /usr/share/
COPY --from=downloader /opt/ti /opt/ti
COPY --from=downloader /opt/${TOOLCHAIN} /opt/${TOOLCHAIN}
RUN qbs setup-toolchains --type gcc /opt/${TOOLCHAIN}/bin/arm-none-eabi-g++ gcc_arm_6 \
&& qbs config profiles.gcc_arm_6.qbs.architecture arm \
&& qbs config profiles.gcc_arm_6.cpp.compilerName g++ \
&& qbs config profiles.gcc_arm_6.cpp.cxxCompilerName g++
RUN qbs config profiles.simplelink_cc13x0.baseProfile gcc_arm_6 \
&& qbs config profiles.simplelink_cc13x0.simplelink.core.deviceFamily cc13x0 \
&& qbs config profiles.simplelink_cc13x0.simplelink.core.installPath /opt/ti/${SDK} \
&& qbs config profiles.simplelink_cc13x0.simplelink.tirtos.xdcInstallPath /opt/ti/${XDC} \
&& qbs config profiles.simplelink_cc13x0.cpp.platformCommonCompilerFlags "[\"-mcpu=cortex-m3\", \"-mthumb\", \"-mfloat-abi=soft\"]"