Skip to content

Commit bbb684f

Browse files
author
Hasnain Virk
committed
Jenkin's file fix/mbed-os.lib update
Ublox C030 and IAR toolchain is taken out temporarily. Will be added later on. mbed-os.lib is updated. Help from the mbed_app.json is removed as we will be parsing that string in Jenkins file to replace the platform runtime. Just for the ease of operation, we have removed the help. Documentation will be added instead.
1 parent aecdf7a commit bbb684f

File tree

4 files changed

+28
-29
lines changed

4 files changed

+28
-29
lines changed

Jenkinsfile

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,43 +20,41 @@ def raas = [
2020
]
2121

2222
// List of targets with supported modem families
23-
def targets = [
24-
"UBLOX": ["UBLOX_C027", "UBLOX_C027"],
25-
"MTS_DRAGONFLY": ["MTS_DRAGONFLY"]
23+
def target_families = [
24+
"UBLOX": ["UBLOX_C027"],
25+
"MTS_DRAGONFLY": ["MTS_DRAGONFLY_F411RE"]
2626
]
2727

2828
// Supported Modems
29-
def modems = [
30-
"UBLOX_C027",
29+
def targets = [
3130
"UBLOX_C027",
32-
"MTS_DRAGONFLY"
31+
"UBLOX_C030",
32+
"MTS_DRAGONFLY_F411RE"
3333
]
3434

3535
// Map toolchains to compilers
3636
def toolchains = [
3737
ARM: "armcc",
38-
GCC_ARM: "arm-none-eabi-gcc",
39-
IAR: "iar_arm"
38+
GCC_ARM: "arm-none-eabi-gcc"//,
39+
//IAR: "iar_arm"
4040
]
4141

4242
def stepsForParallel = [:]
4343

4444
// Jenkins pipeline does not support map.each, we need to use oldschool for loop
45-
for (int i = 0; i < targets.size(); i++) {
45+
for (int i = 0; i < target_families.size(); i++) {
4646
for(int j = 0; j < toolchains.size(); j++) {
47-
def target = targets.keySet().asList().get(i)
48-
def allowed_modem_type = targets.get(target)
47+
for(int k = 0; k < targets.size(); k++) {
48+
def target_family = target_families.keySet().asList().get(i)
49+
def allowed_target_type = target_families.get(target_family)
50+
def target = targets.get(k)
4951
def toolchain = toolchains.keySet().asList().get(j)
5052
def compilerLabel = toolchains.get(toolchain)
5153

52-
// Skip unwanted combination
53-
if (target == "NUCLEO_F401RE" && toolchain == "IAR") {
54-
continue
54+
def stepName = "${target_family} ${toolchain}"
55+
if(allowed_target_type.contains(target)) {
56+
stepsForParallel[stepName] = buildStep(target_family, target, compilerLabel, toolchain)
5557
}
56-
57-
def stepName = "${target} ${toolchain}"
58-
if(allowed_modem_type.contains(modems)) {
59-
stepsForParallel[stepName] = buildStep(target, compilerLabel, toolchain)
6058
}
6159
}
6260
}
@@ -81,23 +79,26 @@ timestamps {
8179
parallel parallelRunSmoke
8280
}
8381

84-
def buildStep(target, compilerLabel, toolchain) {
82+
def buildStep(target_family, target, compilerLabel, toolchain) {
8583
return {
86-
stage ("${target}_${compilerLabel}") {
84+
stage ("${target_family}_${target}_${compilerLabel}") {
8785
node ("${compilerLabel}") {
8886
deleteDir()
8987
dir("mbed-os-example-cellular-minimal") {
9088
checkout scm
9189
def config_file = "mbed_app.json"
9290

91+
// Change target type
92+
execute("sed -i 's/\"platform\": .*/\"platform\": \"${target_family}\"/' ${config_file}")
93+
9394
// Activate traces
9495
execute("sed -i 's/\"mbed-trace.enable\": false/\"mbed-trace.enable\": true/' ${config_file}")
9596

9697
// Set mbed-os to revision received as parameter
9798
execute ("mbed deploy --protocol ssh")
98-
dir ("mbed-os") {
99-
execute ("git checkout ${env.MBED_OS_REVISION}")
100-
}
99+
//dir ("mbed-os") {
100+
// execute ("git checkout ${env.MBED_OS_REVISION}")
101+
//}
101102

102103
execute ("mbed compile --build out/${target}_${toolchain}/ -m ${target} -t ${toolchain} -c --app-config ${config_file}")
103104
}

main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
#define MTS_DRAGONFLY 1
88

99
#if MBED_CONF_APP_PLATFORM == UBLOX
10-
#include "UbloxCellularInterface.h"
11-
#include "ublox_low_level_api.h"
10+
#include "ublox_modem_driver/UbloxCellularInterface.h"
1211
UbloxCellularInterface *iface;
1312
#elif MBED_CONF_APP_PLATFORM == MTS_DRAGONFLY
14-
#include "DragonFlyCellularInterface.h"
13+
#include "dragonfly_modem_driver/DragonFlyCellularInterface.h"
1514
DragonFlyCellularInterface *iface;
1615
#endif
1716
#include "UDPSocket.h"

mbed-os.lib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://github.com/hasnainvirk/mbed-os/#f242cbf185efd5cc61ac831ff38ab43affe06df7
1+
https://github.com/hasnainvirk/mbed-os/#66fef4dce3728cb53dcc77bd1178abcceee4d1f7

mbed_app.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"config": {
3-
"platform": { "help": "Options: UBLOX, MTS_DRAGONFLY",
4-
"value": "UBLOX"}
3+
"platform": "UBLOX"
54
},
65
"macros": ["OS_MAINSTKSIZE=512"],
76
"target_overrides": {

0 commit comments

Comments
 (0)