-
Notifications
You must be signed in to change notification settings - Fork 215
548 lines (538 loc) · 33.6 KB
/
main.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
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
# This is a basic workflow to help you get started with Actions
name: build
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
board:
[
'esp8266:esp8266:nodemcuv2',
'esp32:esp32:esp32:PartitionScheme=min_spiffs',
'esp32:esp32:esp32s2',
'esp32:esp32:esp32s3',
'esp32:esp32:esp32c3',
'esp32:esp32:esp32c6',
'esp32:esp32:esp32h2',
'STM32:stm32:Nucleo_64',
'STMicroelectronics:stm32:GenF1',
'STMicroelectronics:stm32:GenWL',
'raspberry',
'energia:cc13xx:LAUNCHXL_CC1310',
'CubeCell:CubeCell:CubeCell-GPS',
'CubeCell:CubeCell:CubeCell-Board-PRO',
'adafruit:nrf52:pca10056',
'arduino:mbed_edge:edge_control',
'arduino:samd:mzero_bl',
'arduino:avr:mega',
'arduino:renesas_uno:minima',
'arduino:renesas_uno:unor4wifi',
'rp2040:rp2040:generic',
'rp2040:rp2040:rpipicow',
'rp2040:rp2040:rpipico2',
'arduino:mbed_rp2040:pico',
#'arduino:mbed_nano:nanorp2040connect',
'SiliconLabs:silabs:nano_matter:protocol_stack=ble_arduino',
'WCH:ch32v:CH32V30x_EVT'
]
env:
ARDUINO_IDE_VERSION: 1.8.13
ARDUINO_CLI_VERSION: 0.34.2
ARDUINO_BLE_VERSION: 1.3.7
ENERGIA_IDE_VERSION: 1.8.10E23
NIM_BLE_VERSION: 1.4.1
# NIM_BLE_VERSION: esp32-c6-test
BOARD: ${{ matrix.board }}
PINS_ARDUINO: pins_arduino.h
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
#- name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# Runs a set of commands using the runners shell
- name: Run before_install
run: |
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16
sleep 3
export DISPLAY=:1.0
if [[ "$BOARD" =~ "energia:" ]]; then
sudo dpkg --add-architecture i386 ;
sudo apt-get update ;
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 ;
wget https://energia.nu/downloads/downloadv4.php?file=energia-$ENERGIA_IDE_VERSION-linux64.tar.xz ;
mv "downloadv4.php?file=energia-$ENERGIA_IDE_VERSION-linux64.tar.xz" energia-$ENERGIA_IDE_VERSION-linux64.tar.xz ;
tar xf energia-$ENERGIA_IDE_VERSION-linux64.tar.xz ;
rm energia-$ENERGIA_IDE_VERSION-linux64.tar.xz ;
sudo mv energia-$ENERGIA_IDE_VERSION /usr/local/share/energia ;
sudo ln -s /usr/local/share/energia/energia /usr/local/bin/energia ;
else if [[ "$BOARD" =~ "raspberry" ]]; then
sudo apt-get update ;
sudo apt-get install libsqlite3-dev libasound2-dev libsndfile1-dev ;
else
if [[ "$BOARD" =~ "SiliconLabs:silabs:" ]]; then
wget https://github.com/arduino/arduino-cli/releases/download/${ARDUINO_CLI_VERSION}/arduino-cli_${ARDUINO_CLI_VERSION}_Linux_64bit.tar.gz ;
tar xzf arduino-cli_${ARDUINO_CLI_VERSION}_Linux_64bit.tar.gz arduino-cli ;
rm arduino-cli_${ARDUINO_CLI_VERSION}_Linux_64bit.tar.gz ;
sudo mv arduino-cli /usr/local/bin/ ;
else
wget http://downloads.arduino.cc/arduino-$ARDUINO_IDE_VERSION-linux64.tar.xz ;
tar xf arduino-$ARDUINO_IDE_VERSION-linux64.tar.xz ;
rm arduino-$ARDUINO_IDE_VERSION-linux64.tar.xz ;
sudo mv arduino-$ARDUINO_IDE_VERSION /usr/local/share/arduino ;
sudo ln -s /usr/local/share/arduino/arduino /usr/local/bin/arduino ;
if [[ "$BOARD" =~ "adafruit:nrf52:" ]]; then
sudo apt-get install python3-pip ;
pip3 install setuptools --user ;
pip3 install adafruit-nrfutil --user ;
pip3 install intelhex --user ;
fi
fi
fi
fi
- name: Run install
run: |
if [[ "$BOARD" =~ "energia:" ]]; then
mkdir $HOME/Energia ;
ln -s $PWD/software/firmware/source/libraries $HOME/Energia/libraries ;
else if [[ "$BOARD" =~ "raspberry" ]]; then
cd $GITHUB_WORKSPACE/software/firmware/source/libraries/bcm2835 ;
autoreconf -f ;
else
mkdir $HOME/Arduino ;
ln -s $PWD/software/firmware/source/libraries $HOME/Arduino/libraries ;
fi
fi
if [[ "$BOARD" =~ "esp8266:esp8266:" ]]; then
arduino --pref "boardsmanager.additional.urls=https://arduino.esp8266.com/stable/package_esp8266com_index.json" --save-prefs ;
arduino --install-boards esp8266:esp8266:2.7.0 ;
arduino --board $BOARD --save-prefs ;
arduino --pref "compiler.warning_level=all" --save-prefs ;
arduino --pref "custom_LwIPVariant=nodemcuv2_Prebuilt" --save-prefs ;
arduino --pref "custom_Debug=nodemcuv2_Disabled" --save-prefs ;
arduino --pref "custom_dbg=nodemcuv2_Disabled" --save-prefs ;
arduino --pref "custom_eesz=nodemcuv2_4M1M" --save-prefs ;
arduino --pref "custom_xtal=nodemcuv2_80" --save-prefs ;
cd $HOME/.arduino15/packages/esp8266/hardware/esp8266/2.7.0 ;
sed -i '52 a #define isFlashInterfacePin(p) ((p) == 6 || (p) == 7 || (p) == 8 || (p) == 9 || (p) == 11)' variants/nodemcu/pins_arduino.h ;
sed -i '57 a \ unsigned long getTimeout () const { return _timeout; }' cores/esp8266/Stream.h ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "esp32:esp32:esp32:" ]]; then
arduino --pref "boardsmanager.additional.urls=https://github.com/espressif/arduino-esp32/releases/download/1.0.5/package_esp32_index.json" --save-prefs ;
arduino --install-boards esp32:esp32:1.0.5 ;
arduino --board $BOARD --save-prefs ;
arduino --pref "custom_CPUFreq=esp32_80" --save-prefs ;
arduino --pref "custom_DebugLevel=esp32_none" --save-prefs ;
arduino --pref "custom_FlashFreq=esp32_80" --save-prefs ;
arduino --pref "custom_FlashMode=esp32_dio" --save-prefs ;
arduino --pref "custom_FlashSize=esp32_4M" --save-prefs ;
arduino --pref "custom_PSRAM=esp32_enabled" --save-prefs ;
arduino --pref "custom_PartitionScheme=esp32_min_spiffs" --save-prefs ;
arduino --pref "custom_UploadSpeed=esp32_921600" --save-prefs ;
cd $HOME/.arduino15/packages/esp32/hardware/esp32/1.0.5/tools/sdk/lib ;
rm -f libbt.a ;
cp $GITHUB_WORKSPACE/software/firmware/binaries/ESP32/misc/libbt.a . ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "esp32:esp32:esp32s2" ]]; then
arduino --pref "boardsmanager.additional.urls=https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" --save-prefs ;
arduino --install-boards esp32:esp32:2.0.17 ;
arduino --board $BOARD --save-prefs ;
arduino --pref "custom_CPUFreq=esp32s2_80" --save-prefs ;
arduino --pref "custom_DebugLevel=esp32s2_none" --save-prefs ;
arduino --pref "custom_FlashFreq=esp32s2_80" --save-prefs ;
arduino --pref "custom_FlashMode=esp32s2_dio" --save-prefs ;
arduino --pref "custom_FlashSize=esp32s2_4M" --save-prefs ;
arduino --pref "custom_PSRAM=esp32s2_enabled" --save-prefs ;
arduino --pref "custom_PartitionScheme=esp32s2_min_spiffs" --save-prefs ;
arduino --pref "custom_UploadSpeed=esp32s2_921600" --save-prefs ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "esp32:esp32:esp32s3" ]]; then
arduino --pref "boardsmanager.additional.urls=https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" --save-prefs ;
arduino --install-boards esp32:esp32:2.0.17 ;
arduino --board $BOARD --save-prefs ;
arduino --pref "custom_CPUFreq=esp32s3_80" --save-prefs ;
arduino --pref "custom_DebugLevel=esp32s3_none" --save-prefs ;
arduino --pref "custom_FlashFreq=esp32s3_80" --save-prefs ;
arduino --pref "custom_FlashMode=esp32s3_dio" --save-prefs ;
arduino --pref "custom_FlashSize=esp32s3_8M" --save-prefs ;
arduino --pref "custom_USBMode=esp32s3_default" --save-prefs ;
arduino --pref "custom_CDCOnBoot=esp32s3_cdc" --save-prefs ;
arduino --pref "custom_PSRAM=esp32s3_enabled" --save-prefs ;
arduino --pref "custom_PartitionScheme=esp32s3_default_8MB" --save-prefs ;
arduino --pref "custom_UploadSpeed=esp32s3_921600" --save-prefs ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "esp32:esp32:esp32c3" ]]; then
arduino --pref "boardsmanager.additional.urls=https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" --save-prefs ;
arduino --install-boards esp32:esp32:2.0.17 ;
arduino --board $BOARD --save-prefs ;
arduino --pref "custom_CPUFreq=esp32c3_80" --save-prefs ;
arduino --pref "custom_DebugLevel=esp32c3_none" --save-prefs ;
arduino --pref "custom_FlashFreq=esp32c3_80" --save-prefs ;
arduino --pref "custom_FlashMode=esp32c3_dio" --save-prefs ;
arduino --pref "custom_FlashSize=esp32c3_4M" --save-prefs ;
arduino --pref "custom_PSRAM=esp32c3_enabled" --save-prefs ;
arduino --pref "custom_PartitionScheme=esp32c3_min_spiffs" --save-prefs ;
arduino --pref "custom_UploadSpeed=esp32c3_921600" --save-prefs ;
cd $GITHUB_WORKSPACE ;
fi
#if [[ "$BOARD" =~ "esp32:esp32:esp32c6" ]]; then
# arduino-cli config init ;
# arduino-cli config add board_manager.additional_urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json ;
# arduino-cli core update-index ;
# arduino-cli core install esp32:[email protected] ;
# # arduino-cli board attach -b $BOARD ;
# cd $GITHUB_WORKSPACE ;
#fi
if [[ "$BOARD" =~ "esp32:esp32:esp32c6" ]]; then
arduino --pref "boardsmanager.additional.urls=https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json" --save-prefs ;
arduino --install-boards esp32:esp32:3.0.5 ;
arduino --board $BOARD --save-prefs ;
arduino --pref "custom_CPUFreq=esp32c6_80" --save-prefs ;
arduino --pref "custom_DebugLevel=esp32c6_none" --save-prefs ;
arduino --pref "custom_FlashFreq=esp32c6_80" --save-prefs ;
arduino --pref "custom_FlashMode=esp32c6_dio" --save-prefs ;
arduino --pref "custom_FlashSize=esp32c6_4M" --save-prefs ;
arduino --pref "custom_PSRAM=esp32c6_enabled" --save-prefs ;
arduino --pref "custom_PartitionScheme=esp32c6_huge_app" --save-prefs ;
arduino --pref "custom_UploadSpeed=esp32c6_921600" --save-prefs ;
# cd $HOME/.arduino15/packages/esp32/hardware/esp32/3.0.5 ;
# sed -i "s\echo '-DARDUINO_CORE_BUILD'\echo -DARDUINO_CORE_BUILD\g" platform.txt ;
wget https://github.com/h2zero/NimBLE-Arduino/archive/refs/tags/${NIM_BLE_VERSION}.tar.gz ;
# wget https://github.com/h2zero/NimBLE-Arduino/archive/refs/heads/${NIM_BLE_VERSION}.tar.gz ;
tar xzf ${NIM_BLE_VERSION}.tar.gz ;
rm ${NIM_BLE_VERSION}.tar.gz ;
mv NimBLE-Arduino-${NIM_BLE_VERSION} $HOME/Arduino/libraries/ ;
wget https://github.com/arduino-libraries/ArduinoBLE/archive/refs/tags/${ARDUINO_BLE_VERSION}.tar.gz ;
tar xzf ${ARDUINO_BLE_VERSION}.tar.gz ;
rm ${ARDUINO_BLE_VERSION}.tar.gz ;
mv ArduinoBLE-${ARDUINO_BLE_VERSION} $HOME/Arduino/libraries/ ;
cd $HOME/Arduino/libraries/ArduinoBLE-${ARDUINO_BLE_VERSION}//src/utility ;
sed -i '82 a #if !(CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2)' HCIVirtualTransport.cpp ;
sed -i '84 a #endif' HCIVirtualTransport.cpp ;
cd $GITHUB_WORKSPACE ;
fi
#if [[ "$BOARD" =~ "esp32:esp32:esp32h2" ]]; then
# arduino-cli config init ;
# arduino-cli config add board_manager.additional_urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json ;
# arduino-cli core update-index ;
# arduino-cli core install esp32:[email protected] ;
# # arduino-cli board attach -b $BOARD ;
# cd $GITHUB_WORKSPACE ;
#fi
if [[ "$BOARD" =~ "esp32:esp32:esp32h2" ]]; then
arduino --pref "boardsmanager.additional.urls=https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json" --save-prefs ;
arduino --install-boards esp32:esp32:3.1.0-RC1 ;
arduino --board $BOARD --save-prefs ;
arduino --pref "custom_CPUFreq=esp32h2_80" --save-prefs ;
arduino --pref "custom_DebugLevel=esp32h2_none" --save-prefs ;
arduino --pref "custom_FlashFreq=esp32h2_64" --save-prefs ;
arduino --pref "custom_FlashMode=esp32h2_dio" --save-prefs ;
arduino --pref "custom_FlashSize=esp32h2_4M" --save-prefs ;
arduino --pref "custom_PSRAM=esp32h2_enabled" --save-prefs ;
arduino --pref "custom_PartitionScheme=esp32h2_no_fs" --save-prefs ;
arduino --pref "custom_UploadSpeed=esp32h2_921600" --save-prefs ;
# cd $HOME/.arduino15/packages/esp32/hardware/esp32/3.1.0-RC1 ;
# sed -i "s\echo '-DARDUINO_CORE_BUILD'\echo -DARDUINO_CORE_BUILD\g" platform.txt ;
wget https://github.com/arduino-libraries/ArduinoBLE/archive/refs/tags/${ARDUINO_BLE_VERSION}.tar.gz ;
tar xzf ${ARDUINO_BLE_VERSION}.tar.gz ;
rm ${ARDUINO_BLE_VERSION}.tar.gz ;
mv ArduinoBLE-${ARDUINO_BLE_VERSION} $HOME/Arduino/libraries/ ;
cd $HOME/Arduino/libraries/ArduinoBLE-${ARDUINO_BLE_VERSION}//src/utility ;
sed -i '82 a #if !(CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2)' HCIVirtualTransport.cpp ;
sed -i '84 a #endif' HCIVirtualTransport.cpp ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "STM32:stm32:" ]]; then
arduino --pref "boardsmanager.additional.urls=https://github.com/stm32duino/BoardManagerFiles/raw/07bcfb337e4c9abe83a029b39e33ddff5a6df2ef/STM32/package_stm_index.json" --save-prefs ;
arduino --install-boards STM32:stm32:1.9.0 ;
arduino --board $BOARD --save-prefs ;
if [[ "$BOARD" =~ "STM32:stm32:Nucleo_64" ]]; then
arduino --pref "custom_pnum=Nucleo_64_NUCLEO_L073RZ" --save-prefs ;
arduino --pref "custom_opt=Nucleo_64_osstd" --save-prefs ;
arduino --pref "custom_rtlib=Nucleo_64_nano" --save-prefs ;
arduino --pref "custom_usb=Nucleo_64_CDCgen" --save-prefs ;
arduino --pref "custom_xserial=Nucleo_64_none" --save-prefs ;
arduino --pref "custom_xusb=Nucleo_64_FS" --save-prefs ;
fi ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "STMicroelectronics:stm32:" ]]; then
arduino --pref "boardsmanager.additional.urls=https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/main/package_stmicroelectronics_index.json" --save-prefs ;
arduino --install-boards STMicroelectronics:stm32:2.4.0 ;
arduino --board $BOARD --save-prefs ;
if [[ "$BOARD" =~ "STMicroelectronics:stm32:GenWL" ]]; then
arduino --pref "custom_pnum=GenWL_GENERIC_WLE5CCUX" --save-prefs ;
arduino --pref "custom_opt=GenWL_osstd" --save-prefs ;
arduino --pref "custom_rtlib=GenWL_nano" --save-prefs ;
arduino --pref "custom_xserial=GenWL_generic" --save-prefs ;
fi ;
if [[ "$BOARD" =~ "STMicroelectronics:stm32:GenF1" ]]; then
arduino --pref "custom_pnum=GenF1_BLUEPILL_F103CB" --save-prefs ;
arduino --pref "custom_opt=GenF1_osstd" --save-prefs ;
arduino --pref "custom_rtlib=GenF1_nano" --save-prefs ;
arduino --pref "custom_usb=GenF1_CDCgen" --save-prefs ;
arduino --pref "custom_xserial=GenF1_none" --save-prefs ;
arduino --pref "custom_xusb=GenF1_FS" --save-prefs ;
fi ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "energia:cc13xx:" ]]; then
energia --install-boards energia:cc13xx ;
energia --board $BOARD --save-prefs ;
ln -s $PWD/software/firmware/source/UATbridge $HOME/Energia/UATbridge ;
cd $GITHUB_WORKSPACE/software/firmware/source/UATbridge ;
make links ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "CubeCell:CubeCell:CubeCell-GPS" ]]; then
arduino --pref "boardsmanager.additional.urls=https://github.com/HelTecAutomation/ASR650x-Arduino/releases/download/V1.4.0/package_CubeCell_index.json" --save-prefs ;
arduino --install-boards CubeCell:CubeCell ;
arduino --board $BOARD --save-prefs ;
arduino --pref "custom_LORAWAN_ADR=CubeCell-GPS_1" --save-prefs ;
arduino --pref "custom_LORAWAN_AT_SUPPORT=CubeCell-GPS_1" --save-prefs ;
arduino --pref "custom_LORAWAN_CLASS=CubeCell-GPS_0" --save-prefs ;
arduino --pref "custom_LORAWAN_DEVEUI=CubeCell-GPS_0" --save-prefs ;
arduino --pref "custom_LORAWAN_DebugLevel=CubeCell-GPS_0" --save-prefs ;
arduino --pref "custom_LORAWAN_NETMODE=CubeCell-GPS_1" --save-prefs ;
arduino --pref "custom_LORAWAN_Net_Reserve=CubeCell-GPS_0" --save-prefs ;
arduino --pref "custom_LORAWAN_REGION=CubeCell-GPS_0" --save-prefs ;
arduino --pref "custom_LORAWAN_RGB=CubeCell-GPS_0" --save-prefs ;
arduino --pref "custom_LORAWAN_UPLINKMODE=CubeCell-GPS_1" --save-prefs ;
cd $HOME/.arduino15/packages/CubeCell/hardware/CubeCell/1.4.0 ;
sed -i 's\compiler.sdk.path={runtime.platform.path}/cores/asr650x\compiler.sdk.path={runtime.platform.path}/cores/{build.core}\g' platform.txt ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "CubeCell:CubeCell:CubeCell-Board-PRO" ]]; then
arduino --pref "boardsmanager.additional.urls=https://github.com/HelTecAutomation/ASR650x-Arduino/releases/download/V1.4.0/package_CubeCell_index.json" --save-prefs ;
arduino --install-boards CubeCell:CubeCell ;
arduino --board $BOARD --save-prefs ;
arduino --pref "custom_LORAWAN_ADR=CubeCell-Board-PRO_1" --save-prefs ;
arduino --pref "custom_LORAWAN_AT_SUPPORT=CubeCell-Board-PRO_1" --save-prefs ;
arduino --pref "custom_LORAWAN_CLASS=CubeCell-Board-PRO_0" --save-prefs ;
arduino --pref "custom_LORAWAN_DEVEUI=CubeCell-Board-PRO_0" --save-prefs ;
arduino --pref "custom_LORAWAN_DebugLevel=CubeCell-Board-PRO_0" --save-prefs ;
arduino --pref "custom_LORAWAN_NETMODE=CubeCell-Board-PRO_1" --save-prefs ;
arduino --pref "custom_LORAWAN_Net_Reserve=CubeCell-Board-PRO_0" --save-prefs ;
arduino --pref "custom_LORAWAN_REGION=CubeCell-Board-PRO_0" --save-prefs ;
arduino --pref "custom_LORAWAN_RGB=CubeCell-Board-PRO_0" --save-prefs ;
arduino --pref "custom_LORAWAN_UPLINKMODE=CubeCell-Board-PRO_1" --save-prefs ;
cd $HOME/.arduino15/packages/CubeCell/hardware/CubeCell/1.4.0 ;
sed -i 's\compiler.sdk.path={runtime.platform.path}/cores/asr650x\compiler.sdk.path={runtime.platform.path}/cores/{build.core}\g' platform.txt ;
sed -i 's\#define #define _EEPROM_SIZE 0xC00\#define _EEPROM_SIZE 0xC00\g' libraries/EEPROM/EEPROM.cpp;
sed -i 's\_baddr(CY_SFLASH_USERBASE)\_baddr(_EEPROM_BASE)\g' libraries/EEPROM/EEPROM.cpp ;
sed -i '26 a #define SPI_HAS_TRANSACTION 1' cores/asr6601/peripheral/SPI.h ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "adafruit:nrf52:" ]]; then
arduino --pref "boardsmanager.additional.urls=https://adafruit.github.io/arduino-board-index/package_adafruit_index.json" --save-prefs ;
arduino --install-boards adafruit:nrf52:1.3.0 ;
arduino --board $BOARD --save-prefs ;
arduino --pref "custom_debug=pca10056_l0" --save-prefs ;
arduino --pref "custom_softdevice=pca10056_s140v6" --save-prefs ;
if [[ ! -f ~/.local/bin/adafruit-nrfutil ]]; then
ln -s /bin/true ~/.local/bin/adafruit-nrfutil;
fi ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "arduino:mbed_edge:" ]]; then
arduino --pref "boardsmanager.additional.urls=https://downloads.arduino.cc/packages/package_index.json" --save-prefs ;
arduino --install-boards arduino:mbed_edge:4.1.5 ;
arduino --board $BOARD --save-prefs ;
wget https://github.com/arduino-libraries/ArduinoBLE/archive/refs/tags/${ARDUINO_BLE_VERSION}.tar.gz ;
tar xzf ${ARDUINO_BLE_VERSION}.tar.gz ;
rm ${ARDUINO_BLE_VERSION}.tar.gz ;
mv ArduinoBLE-${ARDUINO_BLE_VERSION} $HOME/Arduino/libraries/ ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "arduino:samd:" ]]; then
arduino --pref "boardsmanager.additional.urls=https://downloads.arduino.cc/packages/package_index.json" --save-prefs ;
arduino --install-boards arduino:samd:1.8.13 ;
arduino --board $BOARD --save-prefs ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "arduino:avr:" ]]; then
arduino --board $BOARD --save-prefs ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "arduino:renesas_uno:" ]]; then
arduino --pref "boardsmanager.additional.urls=https://downloads.arduino.cc/packages/package_index.json" --save-prefs ;
arduino --install-boards arduino:renesas_uno:1.2.1 ;
arduino --board $BOARD --save-prefs ;
wget https://github.com/arduino-libraries/ArduinoBLE/archive/refs/tags/${ARDUINO_BLE_VERSION}.tar.gz ;
tar xzf ${ARDUINO_BLE_VERSION}.tar.gz ;
rm ${ARDUINO_BLE_VERSION}.tar.gz ;
mv ArduinoBLE-${ARDUINO_BLE_VERSION} $HOME/Arduino/libraries/ ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "rp2040:rp2040:" ]]; then
arduino --pref "boardsmanager.additional.urls=https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json" --save-prefs ;
arduino --install-boards rp2040:rp2040:4.0.2 ;
arduino --board $BOARD --save-prefs ;
if [[ "$BOARD" =~ "rp2040:rp2040:rpipicow" ]]; then
arduino --pref "custom_freq=rpipicow_120" --save-prefs ;
arduino --pref "custom_ipbtstack=rpipicow_ipv4btcble" --save-prefs ;
fi
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "arduino:mbed_rp2040:" ]]; then
arduino --pref "boardsmanager.additional.urls=https://downloads.arduino.cc/packages/package_index.json" --save-prefs ;
arduino --install-boards arduino:mbed_rp2040:4.1.5 ;
arduino --board $BOARD --save-prefs ;
cd $HOME/.arduino15/packages/arduino/hardware/mbed_rp2040/4.1.5/variants/RASPBERRY_PI_PICO ;
sed -i '62 a // Serial2' ${PINS_ARDUINO} ;
sed -i '63 a #define PIN_SERIAL2_TX (4ul)' ${PINS_ARDUINO} ;
sed -i '64 a #define PIN_SERIAL2_RX (5ul)' ${PINS_ARDUINO} ;
sed -i '65 a //' ${PINS_ARDUINO} ;
sed -i '66 a #define SERIAL2_TX (digitalPinToPinName(PIN_SERIAL2_TX))' ${PINS_ARDUINO} ;
sed -i '67 a #define SERIAL2_RX (digitalPinToPinName(PIN_SERIAL2_RX))' ${PINS_ARDUINO} ;
sed -i '68 a //' ${PINS_ARDUINO} ;
sed -i '69 a // SPI1' ${PINS_ARDUINO} ;
sed -i '70 a #define PIN_SPI1_MISO (12u)' ${PINS_ARDUINO} ;
sed -i '71 a #define PIN_SPI1_MOSI (11u)' ${PINS_ARDUINO} ;
sed -i '72 a #define PIN_SPI1_SCK (10u)' ${PINS_ARDUINO} ;
sed -i '73 a #define PIN_SPI1_SS ( 3u)' ${PINS_ARDUINO} ;
sed -i '74 a //' ${PINS_ARDUINO} ;
sed -i '75 a #define SPI_MISO1 (digitalPinToPinName(PIN_SPI1_MISO))' ${PINS_ARDUINO} ;
sed -i '76 a #define SPI_MOSI1 (digitalPinToPinName(PIN_SPI1_MOSI))' ${PINS_ARDUINO} ;
sed -i '77 a #define SPI_SCK1 (digitalPinToPinName(PIN_SPI1_SCK))' ${PINS_ARDUINO} ;
sed -i '78 a //' ${PINS_ARDUINO} ;
sed -i 's,#define SPI_HOWMANY\t\t(1),#define SPI_HOWMANY\t\t(2),g' ${PINS_ARDUINO} ;
sed -i 's,#define SERIAL_HOWMANY\t\t1,#define SERIAL_HOWMANY\t\t2,g' ${PINS_ARDUINO} ;
cd $GITHUB_WORKSPACE ;
fi
#if [[ "$BOARD" =~ "SiliconLabs:silabs:" ]]; then
# arduino --pref "boardsmanager.additional.urls=https://siliconlabs.github.io/arduino/package_arduinosilabs_index.json" --save-prefs ;
# arduino --install-boards SiliconLabs:silabs:2.1.0 ;
# arduino --board $BOARD --save-prefs ;
# cd $GITHUB_WORKSPACE ;
#fi
if [[ "$BOARD" =~ "SiliconLabs:silabs:" ]]; then
arduino-cli config init ;
arduino-cli config add board_manager.additional_urls https://siliconlabs.github.io/arduino/package_arduinosilabs_index.json ;
arduino-cli core update-index ;
arduino-cli core install SiliconLabs:[email protected] ;
# arduino-cli board attach -b $BOARD ;
wget https://github.com/arduino-libraries/ArduinoBLE/archive/refs/tags/${ARDUINO_BLE_VERSION}.tar.gz ;
tar xzf ${ARDUINO_BLE_VERSION}.tar.gz ;
rm ${ARDUINO_BLE_VERSION}.tar.gz ;
mv ArduinoBLE-${ARDUINO_BLE_VERSION} $HOME/Arduino/libraries/ ;
cd $GITHUB_WORKSPACE ;
fi
if [[ "$BOARD" =~ "WCH:ch32v:" ]]; then
arduino --pref "boardsmanager.additional.urls=https://github.com/openwch/board_manager_files/raw/main/package_ch32v_index.json" --save-prefs ;
arduino --install-boards WCH:ch32v:1.0.4 ;
arduino --board $BOARD --save-prefs ;
mkdir -p $HOME/Arduino/hardware/WCH ;
cd $HOME/Arduino/hardware/WCH ;
wget https://github.com/openwch/arduino_core_ch32/archive/refs/heads/main.zip ;
unzip main.zip ;
rm main.zip ;
mv arduino_core_ch32-main ch32v ;
mv $HOME/.arduino15/packages/WCH/hardware/ch32v/1.0.4 /tmp/ ;
cd $GITHUB_WORKSPACE ;
fi
- name: Run script
run: |
if [[ "$BOARD" =~ "esp8266:esp8266:" ]]; then
arduino --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SoftRF/SoftRF.ino ;
fi ;
if [[ "$BOARD" =~ "esp8266:esp8266:" ]]; then
arduino --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SkyView/SkyView.ino ;
fi ;
if [[ "$BOARD" =~ "esp8266:esp8266:" ]]; then
arduino --verify --board $BOARD $PWD/software/firmware/source/SkyWatch/SkyWatch.ino ;
fi ;
#if [[ "$BOARD" =~ "esp32:esp32:esp32h2" ]]; then
# arduino-cli compile -v --build-properties upload.maximum_size=2500000 -b "$BOARD" $PWD/software/firmware/source/SoftRF ;
#else
if [[ "$BOARD" =~ "esp32:esp32:" ]]; then
arduino --verify --board $BOARD $PWD/software/firmware/source/SoftRF/SoftRF.ino ;
fi ;
#fi ;
if [[ "$BOARD" =~ "esp32:esp32:esp32h2" ]]; then
# SkyWatch is not available for H2
true ;
else
if [[ "$BOARD" =~ "esp32:esp32:" ]]; then
arduino --verify --board $BOARD $PWD/software/firmware/source/SkyWatch/SkyWatch.ino ;
fi ;
fi ;
if [[ "$BOARD" =~ "esp32:esp32:esp32h2" ]]; then
# SkyView is not available for H2
true ;
else
if [[ "$BOARD" =~ "esp32:esp32:" ]]; then
rm -rf $HOME/Arduino/libraries/ArduinoBLE-${ARDUINO_BLE_VERSION} ;
arduino --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SkyView/SkyView.ino ;
fi ;
fi ;
if [[ "$BOARD" =~ "STM32:stm32:" ]]; then
arduino --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SoftRF/SoftRF.ino ;
fi ;
if [[ "$BOARD" =~ "STMicroelectronics:stm32:" ]]; then
arduino --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SoftRF/SoftRF.ino ;
fi ;
if [[ "$BOARD" =~ "energia:cc13xx:" ]]; then
energia --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SoftRF/SoftRF.ino ;
fi ;
if [[ "$BOARD" =~ "energia:cc13xx:" ]]; then
energia --verify --verbose-build --board $BOARD $PWD/software/firmware/source/UATbridge/UATbridge.ino ;
fi ;
if [[ "$BOARD" =~ "raspberry" ]]; then
cd $GITHUB_WORKSPACE/software/firmware/source/SoftRF ;
make pi;
fi ;
if [[ "$BOARD" =~ "raspberry" ]]; then
cd $GITHUB_WORKSPACE/software/firmware/source/SkyView ;
make -f Makefile.RPi ;
fi ;
if [[ "$BOARD" =~ "CubeCell:CubeCell:" ]]; then
arduino --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SoftRF/SoftRF.ino ;
fi ;
if [[ "$BOARD" =~ "adafruit:nrf52:" ]]; then
arduino --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SoftRF/SoftRF.ino ;
fi ;
if [[ "$BOARD" =~ "arduino:mbed_edge:" ]]; then
arduino --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SoftRF/SoftRF.ino ;
fi ;
if [[ "$BOARD" =~ "arduino:samd:" ]]; then
arduino --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SoftRF/SoftRF.ino ;
fi ;
if [[ "$BOARD" =~ "arduino:avr:" ]]; then
arduino --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SoftRF/SoftRF.ino ;
fi ;
if [[ "$BOARD" =~ "arduino:renesas_uno:" ]]; then
arduino --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SoftRF/SoftRF.ino ;
fi ;
if [[ "$BOARD" =~ "rp2040:rp2040:" ]]; then
arduino --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SoftRF/SoftRF.ino ;
fi ;
if [[ "$BOARD" =~ "rp2040:rp2040:" ]]; then
arduino --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SkyView/SkyView.ino ;
fi ;
if [[ "$BOARD" =~ "rp2040:rp2040:" ]]; then
arduino --verify --board $BOARD $PWD/software/firmware/source/SkyWatch/SkyWatch.ino ;
fi ;
if [[ "$BOARD" =~ "arduino:mbed_rp2040:" ]]; then
arduino --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SoftRF/SoftRF.ino ;
fi ;
if [[ "$BOARD" =~ "SiliconLabs:silabs:" ]]; then
arduino-cli compile -v -b "$BOARD" $PWD/software/firmware/source/SoftRF ;
fi ;
if [[ "$BOARD" =~ "WCH:ch32v:" ]]; then
arduino --verify --verbose-build --board $BOARD $PWD/software/firmware/source/SoftRF/SoftRF.ino ;
fi ;