Skip to content

Commit 823b0d3

Browse files
committed
Baremetal ARM image (Compiler 14.2.Rel1)
* ARM GCC 14.2.Rel1 (arm-none-eabi) * OpenOCD 0.12.0-6 * st-link 1.8.0 * pyocd 0.36.0 * pyocd packs for ST and nRF * python 3.8 and 3.12 * STM32CubeProgrammer 2.13.0 (CLI) * orbuculum 2.2.0 * clangd 20.1.0 Close: #12
1 parent 046a570 commit 823b0d3

File tree

3 files changed

+38
-27
lines changed

3 files changed

+38
-27
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ To use a devcontainer inside your project you have to:
3939
2. In this folder add a `devcontainer.json`, with the following content:
4040
```json
4141
{
42-
"image": "ghcr.io/protech-engineering/devcontainers:barearm-12.2.Rel1"
42+
"image": "ghcr.io/protech-engineering/devcontainers:barearm-14.2.Rel1"
4343
}
4444
```
4545
3. Open the command palette (`CTRL+SHIFT+P` or `F1`), search and run "Dev Containers: Reopen in Container".
@@ -48,7 +48,7 @@ To use a devcontainer inside your project you have to:
4848

4949
| Name | Tagging convention | Latest version | Notes |
5050
|------|--------------------|----------------|------|
51-
| barearm | `barearm-[ARM toolchain version]` | `12.2.Rel1` | This image implements basic support for ARM bare metal targets. The latest version contains: <br><ul><li>ARM GCC 12.2.Rel1 (arm-none-eabi)</li><li>OpenOCD 0.12.0-1</li><li>st-link 1.7.0</li><li>pyocd 0.35.1</li><li>pyocd packs for ST and nRF</li><li>python 3.8 and 3.10</li><li>STM32CubeProgrammer 2.13.0 (CLI)</li><li>orbuculum 2.1.0</li><li>clangd 16.0.2</li></ul> |
51+
| barearm | `barearm-[ARM toolchain version]` | `14.2.Rel1` | This image implements basic support for ARM bare metal targets. The latest version contains: <br><ul><li>ARM GCC 14.2.Rel1 (arm-none-eabi)</li><li>OpenOCD 0.12.0-6</li><li>st-link 1.8.0</li><li>pyocd 0.36.0</li><li>pyocd packs for ST and nRF</li><li>python 3.8 and 3.12</li><li>STM32CubeProgrammer 2.13.0 (CLI)</li><li>orbuculum 2.2.0</li><li>clangd 20.0.1</li></ul> |
5252
| barearmgui | `barearmgui-[ARM toolchain version]` | `11.3.Rel1` | This image inherits the `barearm` image. The latest version contains the following additional packages for GUI development: <br><ul><li>GCC 11.3.0 (x86-64)</li><li>mingw w64 10-win32</li><li>SDL2 + Image module (native + mingw)</li><li>Emscripten 3.1.5</li></ul> |
5353
| barearmnordic | `barearmnordic-[ARM toolchain version]` | `9_2019_q4_major` | This image inherits the `barearm` image. The latest version contains the following additional packages for nRF-SDK (old version) development: <br><ul><li>protobuf 3.19.0</li><li>nrfutil 6.1.6</li><li>ble-serial</li></ul> |
5454
| esp | *still in beta* | NA | This image inherits the ESP32 docker image and adds our default tools and devcontainer settings |
@@ -106,7 +106,7 @@ Variant names and versions must not contain any `-` character (dash), because it
106106
Now you can start the image with the command:
107107

108108
```bash
109-
$ npx @devcontainers/cli up --workspace-folder [variant]
109+
$ npx @devcontainers/cli up --remove-existing-container --workspace-folder [variant]
110110
```
111111

112112
And execute a command (for example starting a shell to explore the contents):
@@ -167,4 +167,4 @@ If everything is done you can release a new stable image:
167167
}
168168
},
169169
```
170-
This will add al the needed packages to make it usable as a devcontainer, even if it's not derived from a `devcontainer/base` image.
170+
This will add al the needed packages to make it usable as a devcontainer, even if it's not derived from a `devcontainer/base` image.

barearm/.devcontainer/Dockerfile

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,80 @@
1-
FROM ubuntu:22.04 AS orbuculum_build
1+
FROM ubuntu:24.04 AS orbuculum_build
22

33
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && \
4-
apt-get -y install git build-essential curl libusb-1.0-0-dev libczmq-dev libncurses-dev meson libsdl2-dev
4+
apt-get -y install git build-essential curl libusb-1.0-0-dev libczmq-dev libncurses-dev meson libsdl2-dev libelf-dev libcapstone-dev
55

6-
RUN git clone --depth 1 --branch V2.1.0 https://github.com/orbcode/orbuculum.git orbuculum_build && \
6+
RUN git clone --depth 1 --branch V2.2.0 https://github.com/orbcode/orbuculum.git orbuculum_build && \
77
cd orbuculum_build && meson setup --prefix=/usr build && \
88
meson compile -C build && \
99
DESTDIR=/orbuculum meson install -C build
1010

11-
FROM mcr.microsoft.com/devcontainers/base:1.0.8-ubuntu-22.04
11+
FROM ubuntu:24.04 AS pyocd_pack_build
1212

13-
RUN echo "deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main" >> /etc/apt/sources.list && \
13+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && \
14+
apt-get -y install python3-pip zip unzip && \
15+
pip install --break-system-packages pyocd==0.36.0
16+
17+
RUN pyocd pack install stm32 nrf51
18+
19+
RUN cd ~/.local/share/cmsis-pack-manager/ && \
20+
for file in $(find . -iname "*.pack"); do zipinfo -1 $file | sed '/^.*\(flm\|pdsc\|svd\|dbgconf\|sdf\)/Id' | xargs zip -d $file; done
21+
22+
FROM mcr.microsoft.com/devcontainers/base:1.2.6-ubuntu-24.04
23+
24+
RUN echo "deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu noble main" >> /etc/apt/sources.list && \
1425
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776
1526

16-
# Texane st-link (version 1.7.0 in repository)
27+
# Texane st-link (version 1.8.0 in repository)
1728
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && \
1829
apt-get -y install \
1930
make \
2031
bear \
2132
picocom \
33+
microcom \
2234
xz-utils \
2335
python3-pip \
2436
telnet \
25-
libncursesw5 \
2637
python3.8 \
38+
libpython3.8 \
2739
libusb-1.0 \
2840
libczmq4 \
41+
libelf1 \
42+
libsdl2-2.0-0 \
43+
libcapstone4 \
2944
libncurses6 \
3045
libglib2.0-0 \
3146
cmake \
3247
stlink-tools \
48+
gdb-multiarch \
3349
&& rm -rf /var/lib/apt/lists/*
3450

3551
# ARM GCC Compiler
36-
RUN curl -sL "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz" | tar -xJf - -C /usr/local --strip-components=1
52+
RUN curl -sL "https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz" | tar -xJf - -C /usr/local --strip-components=1
3753

38-
# OpenOCD (version 0.12.0-1)
54+
# OpenOCD (version 0.12.0-6)
3955
RUN mkdir /opt/openocd && \
40-
curl -sL "https://github.com/xpack-dev-tools/openocd-xpack/releases/download/v0.12.0-1/xpack-openocd-0.12.0-1-linux-x64.tar.gz" | tar -xzf - -C /opt/openocd --strip-components=1 && \
56+
curl -sL "https://github.com/xpack-dev-tools/openocd-xpack/releases/download/v0.12.0-6/xpack-openocd-0.12.0-6-linux-x64.tar.gz" | tar -xzf - -C /opt/openocd --strip-components=1 && \
4157
ln -s /opt/openocd/bin/openocd /usr/local/bin/openocd
4258

4359
# STM32CubeProgrammer (version 2.13.0)
4460
ADD stm32cubeprogrammer /opt/stm32cubeprogrammer
4561
RUN ln -s /opt/stm32cubeprogrammer/bin/STM32_Programmer_CLI /usr/local/bin/STM32_Programmer_CLI
4662

4763
# PyOCD
48-
RUN pip install pyocd==0.36.0
49-
50-
USER vscode
51-
52-
RUN pyocd pack install stm32 nrf51 && \
53-
cd ~/.local/share/cmsis-pack-manager/ && \
54-
for file in $(find . -iname "*.pack"); do zipinfo -1 $file | sed '/^.*\(flm\|pdsc\|svd\|dbgconf\|sdf\)/Id' | xargs zip -d $file; done
55-
56-
USER root
64+
RUN pip install --break-system-packages pyocd==0.36.0
5765

5866
# clangd (version 17.0.3)
5967
RUN mkdir /tmp/clangd && \
60-
curl -sL -o /tmp/clangd/clangd.zip "https://github.com/clangd/clangd/releases/download/17.0.3/clangd-linux-17.0.3.zip" && \
68+
curl -sL -o /tmp/clangd/clangd.zip "https://github.com/clangd/clangd/releases/download/20.1.0/clangd-linux-20.1.0.zip" && \
6169
unzip /tmp/clangd/clangd.zip -d /tmp/clangd && \
62-
cp -r /tmp/clangd/clangd_17.0.3/* /usr/local/ && \
70+
cp -r /tmp/clangd/clangd_20.1.0/* /usr/local/ && \
6371
rm /tmp/clangd -rf
6472

6573
# Clangd default configuration
6674
COPY --chown=vscode:vscode config.yaml /home/vscode/.config/clangd/config.yaml
6775

6876
# Orbuculum
6977
COPY --from=orbuculum_build /orbuculum /
78+
79+
# Pyocd packs
80+
COPY --from=pyocd_pack_build --chown=vscode:vscode /root/.local/share/cmsis-pack-manager/ /home/vscode/.local/share/cmsis-pack-manager/

barearm/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ assert_raises "orbcat --version" 255
3030
assert_raises "orbtop --version" 234
3131

3232
# Test gdb
33-
assert "arm-none-eabi-gdb -batch -ex 'python print(\"OK\")'" "OK"
33+
assert "arm-none-eabi-gdb-py -batch -ex 'python print(\"OK\")'" "OK"
3434
# Test all pyocd packs have been downloaded
3535
assert "find ~/.local/share/cmsis-pack-manager/ -type d -empty | wc -l" "0"
3636

37-
assert_end barearm
37+
assert_end barearm

0 commit comments

Comments
 (0)