Skip to content

Commit de59b32

Browse files
committed
Upgrade worflow to CXARM
1 parent d0e4cef commit de59b32

5 files changed

Lines changed: 198 additions & 265 deletions

File tree

.github/workflows/arm.yml

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
name: IAR project on GitHub Actions
2+
3+
# This workflow uses cloud-ready images with
4+
# the IAR Build Tools for Arm with ST device support
5+
# from: https://github.com/orgs/iarsystems/packages/arm
6+
7+
on:
8+
# Run the workflow when new code is pushed to the repository
9+
push:
10+
# Run the workflow manually
11+
workflow_dispatch:
12+
# Run the workflow on a nightly schedule
13+
schedule:
14+
- cron: "0 3 * * *"
15+
16+
# Set a new GitHub Actions Secret named IAR_LMS_BEARER_TOKEN
17+
# for your repository. The secret is then propagated to an
18+
# Environment variable used for all jobs within this workflow
19+
env:
20+
IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }}
21+
22+
jobs:
23+
build-library:
24+
name: Build library
25+
runs-on: ubuntu-latest
26+
container: ghcr.io/iarsystems/arm:9.60.4-st
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Check compiler version
31+
run: iccarm --version
32+
33+
- name: Build library
34+
run: |
35+
iarbuild project/EWARM/ChecksumLibrary.ewp -make Debug -log all
36+
37+
- name: Upload library
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: library
41+
path: project/EWARM/Debug/Exe/ChecksumLibrary.a
42+
if-no-files-found: error
43+
44+
cstat-library:
45+
name: Analyze library
46+
runs-on: ubuntu-latest
47+
container: ghcr.io/iarsystems/arm:9.60.4-st
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- name: C-STAT - Library
52+
run: |
53+
iarbuild project/EWARM/ChecksumLibrary.ewp -cstat_analyze Debug -log all
54+
iarbuild project/EWARM/ChecksumLibrary.ewp -cstat_report Debug -log all
55+
56+
- name: Upload library report (C-STAT)
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: library-report.html
60+
path: project/EWARM/Debug/C-STAT/*.html
61+
if-no-files-found: error
62+
63+
build-project:
64+
name: Build project
65+
needs: build-library
66+
runs-on: ubuntu-latest
67+
container: ghcr.io/iarsystems/arm:9.60.4-st
68+
steps:
69+
- uses: actions/checkout@v4
70+
- name: Download library
71+
uses: actions/download-artifact@v4
72+
with:
73+
name: library
74+
path: project/EWARM/Debug/Exe/
75+
76+
- name: Build project
77+
run: |
78+
iarbuild project/EWARM/project.ewp -make Debug -log all
79+
80+
- name: Upload project
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: project
84+
path: project/EWARM/Debug/Exe/project.out
85+
if-no-files-found: error
86+
87+
cstat-project:
88+
name: Static Code Analysis
89+
needs: build-project
90+
runs-on: ubuntu-latest
91+
container: ghcr.io/iarsystems/arm:9.60.4-st
92+
steps:
93+
- uses: actions/checkout@v4
94+
- name: Static Analysis
95+
run: |
96+
iarbuild project/EWARM/project.ewp -cstat_analyze Debug -log all
97+
iarbuild project/EWARM/project.ewp -cstat_report Debug -log all
98+
99+
- name: Upload project report (C-STAT)
100+
uses: actions/upload-artifact@v4
101+
with:
102+
name: project-cstat.html
103+
path: project/EWARM/project/C-STAT/*.html
104+
if-no-files-found: error
105+
106+
crun-project:
107+
name: Runtime Analysis
108+
needs: build-project
109+
runs-on: ubuntu-latest
110+
container: ghcr.io/iarsystems/arm:9.60.4-st
111+
steps:
112+
- name: Download project
113+
uses: actions/download-artifact@v4
114+
with:
115+
name: project
116+
path: project/EWARM/Debug/Exe/
117+
118+
- name: Runtime Analysis (C-RUN)
119+
run: |
120+
CSpyBat \
121+
/opt/iar/cxarm/arm/bin/libarmPROC.so \
122+
/opt/iar/cxarm/arm/bin/libarmSIM2.so \
123+
--plugin=/opt/iar/cxarm/arm/bin/libarmLibsupportUniversal.so \
124+
--debug_file=project/EWARM/Debug/Exe/project.out \
125+
--rtc_enable \
126+
--rtc_output=crun-messages.txt \
127+
--timeout=2000000 \
128+
--backend \
129+
--cpu=cortex-m4 \
130+
--fpu=vfpv4_sp \
131+
--endian=little \
132+
--semihosting || true
133+
134+
- name: Upload project report (C-RUN)
135+
uses: actions/upload-artifact@v4
136+
with:
137+
name: project-crun.txt
138+
path: ./crun-messages.txt
139+
if-no-files-found: error
140+
141+
# Deploy your firmware
142+
deploy:
143+
name: Deploy firmware
144+
needs: [cstat-project,crun-project]
145+
runs-on: ubuntu-latest
146+
container: ghcr.io/iarsystems/arm:9.60.4-st
147+
steps:
148+
- name: Download ELF
149+
uses: actions/download-artifact@v4
150+
with:
151+
name: project
152+
path: ./
153+
154+
- name: Convert to SREC
155+
run: |
156+
mkdir output
157+
$TARGET_DIR/ielftool --srec --verbose project.out output/project.srec
158+
159+
- name: Convert to HEX
160+
run: |
161+
$TARGET_DIR/ielftool --ihex --verbose project.out output/project.hex
162+
163+
- name: Upload firmwares
164+
uses: actions/upload-artifact@v4
165+
with:
166+
name: firmwares-srec-hex
167+
path: ./output/*.*
168+
if-no-files-found: error

.github/workflows/bxarm.yml

Lines changed: 0 additions & 192 deletions
This file was deleted.

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

LICENSE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
IAR License
2+
3+
Copyright (c) 2025 IAR Systems AB.
4+
5+
By installing and/or using the IAR tools originated from [this repository](https://github.com/iarsystems/arm/) and/or derivated container registries, you agree to the terms and conditions of the [IAR Software License Agreement (SLA)](https://www.iar.com/knowledge/support/licensing-information/software-license-agreement/).

0 commit comments

Comments
 (0)