Initial commit
This commit is contained in:
commit
dda4c63b75
32
Dockerfile
Normal file
32
Dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG VCS_REF
|
||||
|
||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199 suggests 'mkdir -p /usr/share/man/man1'
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
build-essential \
|
||||
git \
|
||||
bzip2 \
|
||||
tar \
|
||||
wget \
|
||||
libncurses5 \
|
||||
&& mkdir -p /usr/share/man/man1 \
|
||||
&& apt clean \
|
||||
&& \
|
||||
wget "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2" -O - | tar -C /usr/local -xjf -
|
||||
|
||||
# documentation
|
||||
COPY README.md /usr/doc/
|
||||
|
||||
WORKDIR /work
|
||||
|
||||
ENV PATH "/usr/local/gcc-arm-none-eabi-9-2019-q4-major/bin:/usr/local/bin:$PATH"
|
||||
|
||||
|
||||
## usage
|
||||
# docker run --rm -it buildenv-sensor-adapter /bin/bash
|
||||
#
|
82
README.md
Normal file
82
README.md
Normal file
@ -0,0 +1,82 @@
|
||||
# arm-none-eabi.buildenv
|
||||
|
||||
Bare metal compilation environment for the perfirmware projects for the corePCB `periCore`.
|
||||
|
||||
## Creating the image
|
||||
|
||||
The following command can be used to create an image from the docker file. It is assume the Dockerfile is located in the same directory.
|
||||
|
||||
```shell
|
||||
docker build -t arm-none-eabi.buildenv .
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
The working directory of the image is `/work`. To use the image call it similar to the following examples:
|
||||
|
||||
```shell
|
||||
docker run --rm -v $(pwd):/work --user $(id -u):$(id -g) arm-none-eabi.buildenv make
|
||||
```
|
||||
|
||||
This puts your current work directory into the container, builds your code and
|
||||
afterwards it removes the container.
|
||||
|
||||
```shell
|
||||
docker run --rm -v $(pwd):/work --user $(id -u):$(id -g) -it arm-none-eabi.buildenv /bin/bash
|
||||
```
|
||||
|
||||
This puts your current work directory into the container and starts an interactive bash from the container.
|
||||
|
||||
## Example output
|
||||
|
||||
```shell
|
||||
docker run --rm arm-none-eabi.buildenv arm-none-eabi-gcc --version
|
||||
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
|
||||
Copyright (C) 2019 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.
|
||||
```
|
||||
|
||||
## Example integration (vscode)
|
||||
|
||||
For Microsoft's open source visual studio code, the integration of how to invoke make within the docker container is shown in the following excerpt:
|
||||
|
||||
```javascript
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build-elf",
|
||||
"command": "docker",
|
||||
"args": ["run","--rm","-v","${workspaceRoot}/Tickless demo:/work","--user","1000:1001","arm-none-eabi.buildenv","make","-C","gcc","-j8"],
|
||||
"type": "process",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": {
|
||||
"base": "$gcc",
|
||||
"fileLocation": ["relative", "${workspaceRoot}/Tickless demo/gcc"],
|
||||
},
|
||||
"runOptions": {
|
||||
"reveal":"always",
|
||||
"focus":false,
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "build-elf-clean",
|
||||
"command": "docker",
|
||||
"args": ["run","--rm","-v","${workspaceRoot}/Tickless demo:/work","--user","1000:1001","arm-none-eabi.buildenv","make","-C","gcc","-j8","clean"],
|
||||
"type": "process",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": {
|
||||
"base": "$gcc",
|
||||
"fileLocation": ["relative", "${workspaceRoot}/Tickless demo/gcc"],
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
```
|
Loading…
Reference in New Issue
Block a user