Skip to content

Commit 169ebac

Browse files
author
Jarno Lämsä
authored
Add Wi-SUN configurations for CI (#244)
1 parent e4fad24 commit 169ebac

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

Jenkinsfile

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ def raas = [
3434

3535
// List of targets with supported RF shields to compile
3636
def targets = [
37-
"K64F": ["ATMEL", "MCR20A"],
37+
"K64F": ["ATMEL", "MCR20A", "S2LP"],
3838
"NUCLEO_F401RE": ["ATMEL", "MCR20A"],
39-
"NUCLEO_F429ZI": ["ATMEL", "MCR20A"],
39+
"NUCLEO_F429ZI": ["ATMEL", "MCR20A", "S2LP"],
4040
//"NCS36510": ["internal"],
4141
"UBLOX_EVK_ODIN_W2": ["ATMEL"],
4242
"KW24D": ["internal"],
@@ -54,13 +54,15 @@ def toolchains = [
5454
def radioshields = [
5555
"ATMEL",
5656
"MCR20A",
57-
"internal"
57+
"internal",
58+
"S2LP"
5859
]
5960

6061
// Mesh interfaces: 6LoWPAN and Thread
6162
def meshinterfaces = [
6263
"6lp",
63-
"thd"
64+
"thd",
65+
"ws"
6466
]
6567

6668
def stepsForParallel = [:]
@@ -77,9 +79,12 @@ for (int i = 0; i < targets.size(); i++) {
7779
def radioshield = radioshields.get(k)
7880
def meshInterface = meshinterfaces.get(l)
7981

80-
def stepName = "${target} ${toolchain} ${radioshield} ${meshInterface}"
81-
if(allowed_shields.contains(radioshield)) {
82-
stepsForParallel[stepName] = buildStep(target, compilerLabel, toolchain, radioshield, meshInterface)
82+
// Build Wi-SUN only with S2LP and use S2LP only with Wi-SUN
83+
if (("${meshInterface}" == "ws" && "${radioshield}" == "S2LP") || ("${meshInterface}" != "ws" && "${radioshield}" != "S2LP")) {
84+
def stepName = "${target} ${toolchain} ${radioshield} ${meshInterface}"
85+
if(allowed_shields.contains(radioshield)) {
86+
stepsForParallel[stepName] = buildStep(target, compilerLabel, toolchain, radioshield, meshInterface)
87+
}
8388
}
8489
}
8590
}
@@ -135,6 +140,12 @@ def buildStep(target, compilerLabel, toolchain, radioShield, meshInterface) {
135140
execute("sed -i 's/\"mbed-mesh-api.6lowpan-nd-panid-filter\": \"0xffff\"/\"mbed-mesh-api.6lowpan-nd-panid-filter\": \"0xABBA\"/' ${config_file}")
136141
}
137142

143+
if ("${meshInterface}" == "ws") {
144+
config_file = "./configs/mesh_wisun${config_suffix}.json"
145+
// Possibly in future use systest Wi-SUN Border Router for testing (Network name = "ARM-WS-TESTING")
146+
execute("sed -i 's/\"mbed-mesh-api.wisun-network-name\": \"\\\"Wi-SUN Network\\\"\"/\"mbed-mesh-api.wisun-network-name\": \"\\\"ARM-WS-LAB-NWK\\\"\"/' ${config_file}")
147+
}
148+
138149
// For KW24D, we need to optimize for low memory
139150
if ("${target}" == "KW24D") {
140151
// Use optimal mbed TLS config file, need double escaping of '\' characters, first ones to escape Grooy, second ones to escape shell

configs/mesh_wisun_S2LP.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
"target_overrides": {
1010
"*": {
1111
"nsapi.default-mesh-type": "WISUN",
12-
"mbed-mesh-api.wisun-network-name": "\"WS-TEST\"",
12+
"mbed-mesh-api.wisun-network-name": "\"Wi-SUN Network\"",
13+
"nanostack.configuration": "ws_router",
1314
"mbed-trace.enable": false,
1415
"platform.stdio-convert-newlines": true,
1516
"platform.stdio-baud-rate": 115200,
17+
"platform.stdio-buffered-serial": true,
1618
"s2lp.provide-default": true,
1719
"target.device_has_add": ["802_15_4_PHY"]
1820
},

0 commit comments

Comments
 (0)