Skip to content

Commit 68d78fc

Browse files
committed
Full packager script
1 parent c4cffa7 commit 68d78fc

File tree

5 files changed

+44
-10
lines changed

5 files changed

+44
-10
lines changed

makers.variables

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export FLAVOUR="makers"
2+
export VARIANTS=("NANO_RP2040_CONNECT ARDUINO_NANO33BLE")
3+
export FQBNS=("nanorp2040connect nano33ble")
4+
export LIBRARIES=("PDM SPI Wire MRI USBHID USBMSD ThreadDebug Scheduler")
5+
export BOOTLOADERS=("nano33ble")

nicla.variables

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export FLAVOUR="nicla"
2+
export VARIANTS=("UNISENSE BORMIO")
3+
export FQBNS=("unisense bormio")
4+
export LIBRARIES=("SPI WiFi openamp_arduino Portenta_System ThreadDebug Himax_HM01B0 PDM USBAudio KernelDebug Portenta_Audio RPC USBHID Wire Portenta_Camera rpclib USBHOST mbed-memory-status Portenta_SDCARD Scheduler USBMSD")
5+
export BOOTLOADERS=("BORMIO")

package.sh

100644100755
+14-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/bin/bash
22

33
# The scope of this file is splitting the build into self consistent packages for distribution
4+
echo "========== Configuration ==============="
45

5-
# First target: makers
6-
FLAVOUR="makers"
7-
VARIANTS=("NANO_RP2040_CONNECT ARDUINO_NANO33BLE")
8-
FQBNS=("nanorp2040connect nano33ble")
9-
LIBRARIES=("PDM SPI Wire MRI USBHID USBMSD ThreadDebug Scheduler")
10-
BOOTLOADERS=("nano33ble")
11-
VERSION="1.5.0"
6+
source $1
7+
8+
echo $VERSION
9+
echo $FLAVOUR
10+
echo $VARIANTS
11+
echo $FQBNS
1212

1313
# Remove mbed folder content
1414
rm -rf cores/arduino/mbed/*
@@ -40,8 +40,12 @@ done
4040
mv _boards.txt boards.txt
4141

4242
#Recompile mbed core, applying patches on origin/latest
43-
./mbed-os-to-arduino -b origin/latest -a NANO_RP2040_CONNECT:NANO_RP2040_CONNECT
44-
./mbed-os-to-arduino ARDUINO_NANO33BLE:ARDUINO_NANO33BLE
43+
set +e
44+
./mbed-os-to-arduino -b origin/latest -a NOPE:NOPE
45+
set -e
46+
for variant in $VARIANTS; do
47+
./mbed-os-to-arduino $variant:$variant
48+
done
4549

4650
# Remove bootloaders not in $BOOTLOADERS list
4751
mkdir _bootloaders
@@ -59,5 +63,5 @@ sed -i 's/9.9.9/$VERSION/g' platform.txt
5963

6064
#Package! (remove .git, patches folders)
6165
cd ..
62-
tar --exclude='*.git*' --exclude='*patches*' -cjhvf ArduinoCore-mbed-$FLAVOUR-$VERSION.tar.bz2 ArduinoCore-mbed
66+
tar --exclude='*.git*' --exclude='*patches*' -cjhf ArduinoCore-mbed-$FLAVOUR-$VERSION.tar.bz2 ArduinoCore-mbed
6367
cd -

package_full.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#Get version from git(hub) tag
2+
export VERSION="1.5.0"
3+
4+
FLAVOURS=`ls *.variables`
5+
6+
for flavour in $FLAVOURS; do
7+
8+
# Hack, clean everything from known positions and restart
9+
rm -rf /tmp/mbed-os-program
10+
git reset --hard
11+
git clean -dxf
12+
13+
./package.sh $flavour
14+
15+
done

pro.variables

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export FLAVOUR="pro"
2+
export VARIANTS=("PORTENTA_H7_M7 PORTENTA_H7_M4")
3+
export FQBNS=("envie_m7 envie_m4")
4+
export LIBRARIES=("doom MRI Portenta_SDRAM SPI WiFi ea_malloc openamp_arduino Portenta_System ThreadDebug Himax_HM01B0 PDM Portenta_Video USBAudio KernelDebug Portenta_Audio RPC USBHID Wire LittleVGL Portenta_Camera rpclib USBHOST mbed-memory-status Portenta_SDCARD Scheduler USBMSD")
5+
export BOOTLOADERS=("PORTENTA_H7")

0 commit comments

Comments
 (0)