-
Notifications
You must be signed in to change notification settings - Fork 1.2k
318 lines (275 loc) · 10.8 KB
/
kernel-demos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
name: FreeRTOS-Kernel Demos
on: [push, pull_request]
env:
# The bash escape character is \033
bashPass: \033[32;1mPASSED -
bashInfo: \033[33;1mINFO -
bashFail: \033[31;1mFAILED -
bashEnd: \033[0m
jobs:
WIN32-MSVC:
name: WIN32 MSVC
runs-on: windows-latest
steps:
- name: Checkout the FreeRTOS/FreeRTOS Repository
uses: actions/[email protected]
with:
ref: main
repository: FreeRTOS/FreeRTOS
submodules: 'recursive'
fetch-depth: 1
# Checkout user pull request changes
- name: Checkout Pull Request
uses: actions/[email protected]
with:
path: ./FreeRTOS/Source
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Build WIN32-MSVC Demo
working-directory: FreeRTOS/Demo/WIN32-MSVC
run: msbuild WIN32.sln -t:rebuild
- name: Build WIN32-MSVC-Static-Allocation-Only Demo
working-directory: FreeRTOS/Demo/WIN32-MSVC-Static-Allocation-Only
run: msbuild WIN32.sln -t:rebuild
WIN32-MingW:
name: WIN32 MingW
runs-on: windows-latest
steps:
- name: Checkout the FreeRTOS/FreeRTOS Repository
uses: actions/[email protected]
with:
ref: main
repository: FreeRTOS/FreeRTOS
submodules: 'recursive'
fetch-depth: 1
# Checkout user pull request changes
- name: Checkout Pull Request
uses: actions/[email protected]
with:
path: ./FreeRTOS/Source
- name: Build WIN32-MingW Demo
working-directory: FreeRTOS/Demo/WIN32-MingW
run: |
gcc --version
make --version
make
POSIX-GCC:
name: Native GCC
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the FreeRTOS/FreeRTOS Repository
uses: actions/[email protected]
with:
ref: main
repository: FreeRTOS/FreeRTOS
submodules: 'recursive'
fetch-depth: 1
# Checkout user pull request changes
- name: Checkout Pull Request
uses: actions/[email protected]
with:
path: ./FreeRTOS/Source
- name: Install GCC
shell: bash
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get -y update
sudo apt-get -y install build-essential
- name: Build Posix_GCC Demo
shell: bash
working-directory: FreeRTOS/Demo/Posix_GCC
run: make -j
- name: Build Posix_GCC Demo for Coverage Test
shell: bash
working-directory: FreeRTOS/Demo/Posix_GCC
run: make -j COVERAGE_TEST=1
CMake-Example:
name: CMake Example with Native GCC
runs-on: ubuntu-latest
steps:
# Checkout user pull request changes
- name: Checkout Repository
uses: actions/[email protected]
- name: Install GCC
shell: bash
run: |
sudo apt-get -y update
sudo apt-get -y install build-essential
- name: Build CMake Example Demo
shell: bash
working-directory: examples/cmake_example
run: |
cmake -S . -B build
cmake --build build
- name: Build CMake SMP Example Demo
shell: bash
working-directory: examples/cmake_example
run: |
cmake -S . -B build -DFREERTOS_SMP_EXAMPLE=1
cmake --build build
MSP430-GCC:
name: GNU MSP430 Toolchain
runs-on: ubuntu-latest
steps:
- name: Checkout the FreeRTOS/FreeRTOS Repository
uses: actions/[email protected]
with:
ref: main
repository: FreeRTOS/FreeRTOS
submodules: 'recursive'
fetch-depth: 1
# Checkout user pull request changes
- name: Checkout Pull Request
uses: actions/[email protected]
with:
path: ./FreeRTOS/Source
- name: Install MSP430 Toolchain
shell: bash
run: |
sudo apt-get -y update
sudo apt-get -y install gcc-msp430 build-essential
- name: Build msp430_GCC Demo
shell: bash
working-directory: FreeRTOS/Demo/msp430_GCC
run: make -j
MicroBlaze-GCC:
name: GCC MicroBlaze Toolchain
runs-on: ubuntu-latest
steps:
- name: Checkout the FreeRTOS/FreeRTOS Repository
uses: actions/[email protected]
with:
ref: main
repository: FreeRTOS/FreeRTOS
fetch-depth: 1
- env:
stepName: Fetch Community-Supported-Demos Submodule
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
git submodule update --checkout --init --depth 1 FreeRTOS/Demo/ThirdParty/Community-Supported-Demos
# This repository contains the microblaze_instructions.h header file
git clone https://github.com/Xilinx/embeddedsw.git --branch xilinx_v2023.1
echo "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
# Checkout user pull request changes
- name: Checkout Pull Request
uses: actions/[email protected]
with:
path: ./FreeRTOS/Source
- env:
stepName: Install Dependancies
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
sudo apt update -y
sudo apt upgrade -y
sudo apt install -y build-essential m4 debhelper bison texinfo dejagnu flex
sudo apt install -y autogen gawk libgmp-dev libmpc-dev libmpfr-dev
sudo apt install -y patchutils sharutils zlib1g-dev autoconf2.64
# Download the mb-gcc toolchain from github
curl -L -O https://github.com/mdednev/mb-gcc/releases/download/2021-0623%2B2/binutils-microblaze_2.35-2021-0623+1_amd64.deb;
curl -L -O https://github.com/mdednev/mb-gcc/releases/download/2021-0623%2B2/gcc-microblaze_10.2.0-2021-0623+2_amd64.deb;
curl -L -O https://github.com/mdednev/mb-gcc/releases/download/2021-0623%2B2/libnewlib-microblaze-dev_3.3.0-2021-0623+3_all.deb;
curl -L -O https://github.com/mdednev/mb-gcc/releases/download/2021-0623%2B2/libnewlib-microblaze-doc_3.3.0-2021-0623+3_all.deb;
curl -L -O https://github.com/mdednev/mb-gcc/releases/download/2021-0623%2B2/libnewlib-microblaze_3.3.0-2021-0623+3_all.deb;
curl -L -O https://github.com/mdednev/mb-gcc/releases/download/2021-0623%2B2/newlib-source_3.3.0-2021-0623+3_all.deb;
# Install the packages for the toolchain
sudo apt install -y ./binutils-microblaze*.deb;
sudo apt install -y ./gcc-microblaze*.deb;
sudo apt install -y ./libnewlib-microblaze-dev*.deb;
sudo apt install -y ./libnewlib-microblaze-doc*.deb;
sudo apt install -y ./libnewlib-microblaze*.deb;
sudo apt install -y ./newlib-source*.deb;
# Validate that the toolchain is in the path and can be called
which mb-gcc
mb-gcc --version
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
- env:
stepName: Compile Microblaze Port
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
# Compile MicroBlazeV9 Port files to validate they build
mb-gcc -mcpu=v9.5 -c \
FreeRTOS/Source/portable/GCC/MicroBlazeV9/port.c \
FreeRTOS/Source/portable/GCC/MicroBlazeV9/portasm.S \
FreeRTOS/Source/portable/GCC/MicroBlazeV9/port_exceptions.c \
FreeRTOS/Source/tasks.c \
FreeRTOS/Source/list.c \
-I embeddedsw/lib/bsp/standalone/src/microblaze \
-I FreeRTOS/Source/portable/GCC/MicroBlazeV9/ \
-I FreeRTOS/Source/include \
-I FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src \
-I FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/BSP/microblaze_0/libsrc/standalone_v5_4/src \
-I FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/BSP/microblaze_0/include \
-I FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/BSP/microblaze_0/libsrc/intc_v3_5/src
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
ARM-GCC:
name: GNU ARM Toolchain
runs-on: ubuntu-latest
steps:
- name: Checkout the FreeRTOS/FreeRTOS Repository
uses: actions/[email protected]
with:
ref: main
repository: FreeRTOS/FreeRTOS
fetch-depth: 1
- env:
stepName: Fetch Community-Supported-Demos Submodule
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
git submodule update --checkout --init --depth 1 FreeRTOS/Demo/ThirdParty/Community-Supported-Demos
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
# Checkout user pull request changes
- name: Checkout Pull Request
uses: actions/[email protected]
with:
path: ./FreeRTOS/Source
- name: Install GNU ARM Toolchain
shell: bash
run: |
sudo apt-get -y update
sudo apt-get -y install gcc-arm-none-eabi build-essential cmake git ninja-build python3-minimal
- name: Build CORTEX_MPU_M3_MPS2_QEMU_GCC Demo
shell: bash
working-directory: FreeRTOS/Demo/CORTEX_MPU_M3_MPS2_QEMU_GCC
run: make -j
- name: Build CORTEX_MPU_R4F_TI_RM46_HERCULES_GCC Demo
shell: bash
working-directory: FreeRTOS/Demo/CORTEX_MPU_R4F_TI_RM46_HERCULES_GCC
run: cmake -S . -B build && make -j -C build all
- name: Build CORTEX_MPU_R5F_TI_RM57_HERCULES_GCC Demo
shell: bash
working-directory: FreeRTOS/Demo/CORTEX_MPU_R5F_TI_RM57_HERCULES_GCC
run: cmake -S . -B build && make -j -C build all
- name: Build CORTEX_LM3S102_GCC Demo
shell: bash
working-directory: FreeRTOS/Demo/CORTEX_LM3S102_GCC
run: make -j
- name: Build CORTEX_LM3S811_GCC Demo
shell: bash
working-directory: FreeRTOS/Demo/CORTEX_LM3S811_GCC
run: make -j
- name: Build CORTEX_M0+_RP2040 Demos
shell: bash
working-directory: FreeRTOS/Demo/ThirdParty/Community-Supported-Demos/CORTEX_M0+_RP2040
run: |
git clone https://github.com/raspberrypi/pico-sdk.git
cmake -B build -DPICO_SDK_PATH=pico-sdk -GNinja
ninja -C build --verbose
- name: Build CORTEX_MPS2_QEMU_IAR_GCC Demo
shell: bash
working-directory: FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC
run: make -C build/gcc -j