Skip to content

Commit 6967896

Browse files
author
Felipe Torrezan
authored
Bumped to v2024.01 (#6)
- Updated tutorial for BXARM 9.50.1
1 parent 6a2a7d2 commit 6967896

95 files changed

Lines changed: 105922 additions & 304 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/bxarm.yml

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
name: BXARM on Linux
2+
3+
# This workflow will run when a push is made to any branch in the repository
4+
on: push
5+
6+
# Workflow's environment variables can be referred by all jobs
7+
env:
8+
TARGET_DIR: /opt/iarsystems/bxarm-9.50.1/arm/bin
9+
COMMON_DIR: /opt/iarsystems/bxarm-9.50.1/common/bin
10+
11+
jobs:
12+
build-library:
13+
runs-on: [ self-hosted, linux ]
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Check compiler version
18+
run: |
19+
$COMMON_DIR/../../arm/bin/iccarm --version
20+
21+
- name: Build library
22+
run: |
23+
$COMMON_DIR/iarbuild project/EWARM/ChecksumLibrary.ewp -make Debug -log all
24+
25+
- name: Upload library
26+
uses: actions/upload-artifact@v3
27+
with:
28+
name: library
29+
path: project/EWARM/Debug/Exe/ChecksumLibrary.a
30+
if-no-files-found: error
31+
32+
cstat-library:
33+
runs-on: [ self-hosted, linux ]
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- name: C-STAT - Library
38+
run: |
39+
$COMMON_DIR/iarbuild project/EWARM/ChecksumLibrary.ewp -cstat_analyze Debug -log all
40+
$COMMON_DIR/iarbuild project/EWARM/ChecksumLibrary.ewp -cstat_report Debug -log all
41+
42+
- name: Upload library report (C-STAT)
43+
uses: actions/upload-artifact@v3
44+
with:
45+
name: library-report.html
46+
path: project/EWARM/Debug/C-STAT/*.html
47+
if-no-files-found: error
48+
49+
build-project:
50+
needs: build-library
51+
runs-on: [ self-hosted, linux ]
52+
steps:
53+
- uses: actions/checkout@v4
54+
- name: Download library
55+
uses: actions/download-artifact@v3
56+
with:
57+
name: library
58+
path: project/EWARM/Debug/Exe/
59+
60+
- name: Build project
61+
run: |
62+
$COMMON_DIR/iarbuild project/EWARM/project.ewp -make Debug -log all
63+
64+
- name: Upload project
65+
uses: actions/upload-artifact@v3
66+
with:
67+
name: project
68+
path: project/EWARM/Debug/Exe/project.out
69+
if-no-files-found: error
70+
71+
# Comment out the `cstat-project` job if your license has no IAR C-STAT for static code analysis
72+
cstat-project:
73+
needs: build-project
74+
runs-on: [ self-hosted, linux ]
75+
steps:
76+
- uses: actions/checkout@v4
77+
- name: Static Analysis
78+
run: |
79+
$COMMON_DIR/iarbuild project/EWARM/project.ewp -cstat_analyze Debug -log all
80+
$COMMON_DIR/iarbuild project/EWARM/project.ewp -cstat_report Debug -log all
81+
82+
- name: Upload project report (C-STAT)
83+
uses: actions/upload-artifact@v3
84+
with:
85+
name: project-cstat.html
86+
path: project/EWARM/project/C-STAT/*.html
87+
if-no-files-found: error
88+
89+
# Comment out the `crun-project` job if your license has no IAR C-RUN for runtime analysis
90+
crun-project:
91+
needs: build-project
92+
runs-on: [ self-hosted, linux ]
93+
steps:
94+
- name: Download project
95+
uses: actions/download-artifact@v3
96+
with:
97+
name: project
98+
path: project/EWARM/Debug/Exe/
99+
100+
- name: Runtime Analysis
101+
run: |
102+
$COMMON_DIR/CSpyBat \
103+
$TARGET_DIR/libarmPROC.so \
104+
$TARGET_DIR/libarmSIM2.so \
105+
--plugin=$TARGET_DIR/libarmLibsupportUniversal.so \
106+
--debug_file=project/EWARM/Debug/Exe/project.out \
107+
--rtc_enable \
108+
--rtc_output=crun-messages.txt \
109+
--timeout=2000000 \
110+
--backend \
111+
--cpu=cortex-m4 \
112+
--fpu=vfpv4_sp \
113+
--endian=little \
114+
--semihosting || true
115+
116+
- name: Upload project report (C-RUN)
117+
uses: actions/upload-artifact@v3
118+
with:
119+
name: project-crun.txt
120+
path: ./crun-messages.txt
121+
if-no-files-found: error
122+
123+
# Update `needs` to `build-project` if you do not have C-STAT and/or C-RUN enabled for your license
124+
cspy-project-on-hw:
125+
needs: [ cstat-project, crun-project ]
126+
runs-on: [ self-hosted, linux ]
127+
steps:
128+
- name: Download project
129+
uses: actions/download-artifact@v3
130+
with:
131+
name: project
132+
path: project/EWARM/Debug/Exe/
133+
134+
- name: Run project on-hardware
135+
run: |
136+
$COMMON_DIR/CSpyBat \
137+
$TARGET_DIR/libarmPROC.so \
138+
$TARGET_DIR/libarmJET.so \
139+
--plugin=$TARGET_DIR/libarmLibsupportUniversal.so \
140+
--device_macro=$TARGET_DIR/../config/debugger/ST/STM32F4xx.dmac \
141+
--flash_loader=$TARGET_DIR/../config/flashloader/ST/FlashSTM32F4xxx.board \
142+
--debug_file=project/EWARM/Debug/Exe/project.out \
143+
--timeout=2000000 \
144+
--backend \
145+
--board_file=$TARGET_DIR/../config/flashloader/ST/FlashSTM32F4xxx.board \
146+
--endian=little \
147+
--cpu=cortex-m4 \
148+
--fpu=vfpv4_sp \
149+
-p $TARGET_DIR/../config/debugger/ST/STM32F407VG.ddf \
150+
--semihosting \
151+
--device=STM32F407VG \
152+
--multicore_nr_of_cores=1 \
153+
--jet_standard_reset=9,0,0 \
154+
--reset_style=\"0,-,0,Disabled__no_reset_\" \
155+
--reset_style=\"1,-,0,Software\" \
156+
--reset_style=\"2,-,0,Hardware\" \
157+
--reset_style=\"3,-,0,Core\" \
158+
--reset_style=\"4,-,0,System\" \
159+
--reset_style=\"9,ConnectUnderReset,1,Connect_during_reset\" \
160+
--jet_power_from_probe=switch_off \
161+
--drv_communication_log=cspycomm.log \
162+
--drv_interface=SWD \
163+
--jet_swo_protocol=Manchester \
164+
--jet_cpu_clock=72000000 \
165+
--jet_swo_prescaler=1 \
166+
--drv_catch_exceptions=0xff0 \
167+
--drv_trace_settings=None
168+
169+
- name: Upload C-SPY log
170+
uses: actions/upload-artifact@v3
171+
with:
172+
name: cspycomm.log
173+
path: ./cspycomm.log
174+
if-no-files-found: error
175+
176+
# Update `needs` to `build-project` if you do not have C-STAT and/or C-RUN enabled for your license
177+
deploy:
178+
needs: cspy-project-on-hw
179+
runs-on: [ self-hosted, linux ]
180+
steps:
181+
- name: Download ELF
182+
uses: actions/download-artifact@v3
183+
with:
184+
name: project
185+
path: ./
186+
187+
- name: Convert to SREC
188+
run: |
189+
mkdir output
190+
$TARGET_DIR/ielftool --srec --verbose project.out output/project.srec
191+
192+
- name: Convert to HEX
193+
run: |
194+
$TARGET_DIR/ielftool --ihex --verbose project.out output/project.hex
195+
196+
- name: Upload firmwares
197+
uses: actions/upload-artifact@v3
198+
with:
199+
name: firmwares-srec-hex
200+
path: ./output/*.*
201+
if-no-files-found: error

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Debug/
2+
Release/
3+
settings/

.gitmodules

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

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Felipe Torrezan
3+
Copyright (c) 2020-23 IAR Systems AB
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)