Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion Dockerfile.toolchain
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ MAINTAINER runtime.io <contact@runtime.io>
ENV DEBIAN_FRONTEND noninteractive

ARG JLINK_RELEASE
ARG OPENOCD_RELEASE


# gcc-arm-embedded is pulled from ppa:team-gcc-arm-embedded/ppa
RUN apt-get update && \
Expand All @@ -19,7 +21,20 @@ RUN apt-get update && \
gcc-multilib \
gcc-arm-embedded \
gdb \
openocd \
libhidapi-hidraw0 \
libftdi-dev \
libgpiod-dev \
libusb-0.1-4 \
libusb-1.0-0 \
libhidapi-dev \
libusb-1.0-0-dev \
libusb-dev \
libtool \
make \
automake \
pkg-config \
autoconf \
texinfo \
netcat && \
apt-get autoremove && \
apt-get clean && \
Expand All @@ -30,3 +45,29 @@ COPY JLink_Linux_V${JLINK_RELEASE}_x86_64.deb /tmp/
RUN dpkg -i /tmp/JLink_Linux_V${JLINK_RELEASE}_x86_64.deb && \
dpkg-query -l && \
rm /tmp/JLink_Linux_V${JLINK_RELEASE}_x86_64.deb

#build and install OPENOCD from repository
RUN cd /usr/src/ \
&& git clone --depth 1 https://git.code.sf.net/p/openocd/code openocd \
&& cd openocd \
&& git checkout ${OPENOCD_RELEASE} \
&& ./bootstrap \
&& ./configure --enable-cmsis-dap --enable-xlnx-pcie-xvc \
&& make -j"$(nproc)" \
&& make install \
&& cp /usr/local/share/openocd/contrib/60-openocd.rules /etc/udev/rules.d/60-openocd.rules \
&& rm -rf /usr/src/openocd \
&& apt -y purge libftdi-dev \
libgpiod-dev \
libhidapi-dev \
libusb-1.0-0-dev \
libusb-dev \
libtool \
make \
automake \
pkg-config \
autoconf \
texinfo

# OpenOCD telnet port
EXPOSE 4444
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ JLINK_RELEASE := 648
JLINK_BIN := JLink_Linux_V$(JLINK_RELEASE)_x86_64.deb
JLINK_URL := https://www.segger.com/downloads/jlink
JLINK_CHKS := $(JLINK_BIN).sha256
OPENOCD_RELEASE := b3a4f771

all:
@echo "make toolchain-image"
Expand Down