Skip to content

Commit 0cf0d0a

Browse files
facchinmumbynos
andauthored
Add pioasm to final package (#11)
* Add pioasm to final package * updated README.md files with pioasm info Co-authored-by: umbynos <[email protected]>
1 parent 343366b commit 0cf0d0a

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,30 @@ jobs:
107107
make
108108
mv elf2uf2${{ matrix.config.extension }} /tmp/
109109
110+
- name: Build pioasm
111+
run: |
112+
cd $GITHUB_WORKSPACE/pico-sdk/tools/pioasm/
113+
if ls $GITHUB_WORKSPACE/rp2040tools/patches/pioasm_*.patch 1> /dev/null 2>&1
114+
then git apply $GITHUB_WORKSPACE/rp2040tools/patches/pioasm_*.patch
115+
fi
116+
mkdir build
117+
cd build
118+
if [ "${{ matrix.config.os }}" = "darwin" ]; then
119+
cmake -DCMAKE_C_COMPILER=${{ matrix.config.cross_compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cross_compiler }}++ -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -framework IOKit -framework Cocoa" ..
120+
else
121+
cmake -DCMAKE_C_COMPILER=${{ matrix.config.cross_compile }}-gcc -DCMAKE_CXX_COMPILER=${{ matrix.config.cross_compile }}-g++ -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++" ..
122+
fi
123+
make
124+
mv pioasm${{ matrix.config.extension }} /tmp/
125+
110126
- name: Upload artifacts
111127
uses: actions/upload-artifact@v3
112128
with:
113129
name: tools_${{matrix.config.os}}_${{matrix.config.arch}}
114130
path: |
115131
/tmp/elf2uf2${{ matrix.config.extension }}
116132
/tmp/picotool${{ matrix.config.extension }}
133+
/tmp/pioasm${{ matrix.config.extension }}
117134
118135
build-go:
119136
name: build-go (${{ matrix.config.os }}, ${{ matrix.config.arch }})

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ This repo contains all the tools used by Arduino to upload compiled code to the
77
- [**picotool**](https://github.com/raspberrypi/picotool): a tool for interacting with a RP2040 device in BOOTSEL mode, or with a RP2040 binary
88
- [**elf2uf2**](https://github.com/raspberrypi/pico-sdk/tree/master/tools/elf2uf2): a tool to convert binary format
99
- **rp2040load** is a go tool which orchestrates the other two
10+
- [**pioasm**](https://github.com/raspberrypi/pico-sdk/tree/master/tools/pioasm)
1011

1112
## CI
1213
The CI is responsible for building and uploading the tools
1314
The [release workflow](https://github.com/arduino/rp2040tools/blob/master/.github/workflows/release.yml) is divided in:
1415

15-
- a job which uses a docker container (called crossbuild) with all the toolchains inside required to cross-compile the two tools from raspberry pi. The binaries produced are as static and self-contained as possible.
16+
- a job which uses a docker container (called crossbuild) with all the toolchains inside required to cross-compile the tools from raspberry pi. The binaries produced are as static and self-contained as possible.
1617
- a job that cross-compiles the go tool called rp2040load.
1718
- one last job used to move in the correct folders the binaries and to `tar.bz2` them and upload them in the [github release page](https://github.com/arduino/rp2040tools/releases) and on s3 download server.

patches/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ To generate a patch use `git`: `git diff > mypatch.patch` and save it in the `pa
44
**Important things to notice**:
55
- if you whant to generate a patch for [`picotool`](https://github.com/raspberrypi/picotool) remember to name the patch `picotool_*.patch`
66
- same thing applies to [`elf2uf2`](https://github.com/raspberrypi/pico-sdk/tree/master/tools/elf2uf2)
7+
- same thing applies to [`pioasm`](https://github.com/raspberrypi/pico-sdk/tree/master/tools/pioasm)
78

8-
The CI will apply automagically the patches (if they are present in the `patches/` directory) and it will search them using the name. see [here](../.github/workflows/release.yml#L81-L83) and [here](../.github/workflows/release.yml#L97-L99)
9+
The CI will apply automagically the patches (if they are present in the `patches/` directory) and it will search them using the name. see [here](../.github/workflows/release.yml#L81-L83) and [here](../.github/workflows/release.yml#L97-L99) and [here](../.github/workflows/release.yml#L113-L115)

0 commit comments

Comments
 (0)