Skip to content

Commit 0cc2494

Browse files
committed
Add DAPLink instructions and CI test.
1 parent 9b10a5f commit 0cc2494

File tree

3 files changed

+52
-9
lines changed

3 files changed

+52
-9
lines changed

.github/workflows/deploy-test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,28 @@ jobs:
109109
run: |
110110
cd microbit-v2-samples
111111
python build.py
112+
113+
build-daplink:
114+
name: DAPLink test build with master tag image
115+
needs: deploy
116+
runs-on: ubuntu-latest
117+
container: ghcr.io/carlosperate/microbit-toolchain:master
118+
steps:
119+
- name: Check Versions
120+
run: |
121+
arm-none-eabi-gcc --version
122+
cmake --version
123+
ninja --version
124+
yotta --version
125+
srec_cat --version
126+
- name: Clone DAPLink and checkout develop branch
127+
run: |
128+
git clone https://github.com/mbedmicro/DAPLink
129+
cd DAPLink
130+
git checkout -b develop origin/develop
131+
- name: Install Python dependencies
132+
run: pip install -r requirements.txt
133+
- name: Build all micro:bit DAPLink projects
134+
run: |
135+
cd DAPLink
136+
python tools/progen_compile.py -t make_gcc_arm kl26z_bl kl26z_microbit_if kl27z_microbit_bl kl27z_microbit_if nrf52820_microbit_bl nrf52820_microbit_if

README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,23 @@ $ docker run -v $(pwd):/home --rm ghcr.io/carlosperate/microbit-toolchain:latest
9999
$ docker run -v $(pwd):/home --rm ghcr.io/carlosperate/microbit-toolchain:latest bash -c "cd src && make"
100100
```
101101

102+
### Example: DAPLink for micro:bit V2
103+
104+
The build steps from this example have been obtained from the
105+
[project developer's guide](https://github.com/ARMmbed/DAPLink/blob/develop/docs/DEVELOPERS-GUIDE.md).
106+
107+
```bash
108+
# Clone the repository
109+
$ git clone https://github.com/mbedmicro/DAPLink
110+
$ cd DAPLink
111+
$ git checkout -b develop origin/develop
112+
# Install the Python dependencies in a venv saved in the project directory
113+
$ docker run -v $(pwd):/home --rm ghcr.io/carlosperate/microbit-toolchain:latest bash -c "pip install virtualenv && virtualenv venv && source venv/bin/activate && pip install -r requirements.txt"
114+
# Install the Python dependencies inside the docker image and run the build script
115+
$ docker run -v $(pwd):/home --rm ghcr.io/carlosperate/microbit-toolchain:latest bash -c "source venv/bin/activate && python tools/progen_compile.py -t make_gcc_arm kl27z_microbit_if"
116+
```
117+
118+
102119
## How to use this Docker Image with GitHub Codespaces
103120

104121
This section of the docs is still a WIP.
@@ -127,12 +144,3 @@ docker run --name microbit-toolchain-container -it --entrypoint /bin/bash microb
127144
```
128145
docker cp microbit-toolchain-container:/home/artefacts .
129146
```
130-
131-
### Publish image
132-
133-
```
134-
docker login ghcr.io -u <your_username>
135-
docker images
136-
docker tag IMAGE_ID ghcr.io/carlosperate/microbit-toolchain:VERSION
137-
docker push ghcr.io/carlosperate/microbit-toolchain:VERSION
138-
```

dev-notes.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Developer docs
2+
3+
## Publish image
4+
5+
```
6+
docker login ghcr.io -u <your_username>
7+
docker images
8+
docker tag IMAGE_ID ghcr.io/carlosperate/microbit-toolchain:VERSION
9+
docker push ghcr.io/carlosperate/microbit-toolchain:VERSION
10+
```

0 commit comments

Comments
 (0)