From e17fa026f6550eb510dd53070217171cf9383fcd Mon Sep 17 00:00:00 2001 From: Jarno Lamsa Date: Fri, 22 Feb 2019 10:45:55 +0200 Subject: [PATCH] Add Wi-SUN configurations for CI --- Jenkinsfile | 25 ++++++++++++++++++------- configs/mesh_wisun_S2LP.json | 4 +++- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a2071da..474fbf8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,9 +34,9 @@ def raas = [ // List of targets with supported RF shields to compile def targets = [ - "K64F": ["ATMEL", "MCR20A"], + "K64F": ["ATMEL", "MCR20A", "S2LP"], "NUCLEO_F401RE": ["ATMEL", "MCR20A"], - "NUCLEO_F429ZI": ["ATMEL", "MCR20A"], + "NUCLEO_F429ZI": ["ATMEL", "MCR20A", "S2LP"], //"NCS36510": ["internal"], "UBLOX_EVK_ODIN_W2": ["ATMEL"], "KW24D": ["internal"], @@ -54,13 +54,15 @@ def toolchains = [ def radioshields = [ "ATMEL", "MCR20A", - "internal" + "internal", + "S2LP" ] // Mesh interfaces: 6LoWPAN and Thread def meshinterfaces = [ "6lp", - "thd" + "thd", + "ws" ] def stepsForParallel = [:] @@ -77,9 +79,12 @@ for (int i = 0; i < targets.size(); i++) { def radioshield = radioshields.get(k) def meshInterface = meshinterfaces.get(l) - def stepName = "${target} ${toolchain} ${radioshield} ${meshInterface}" - if(allowed_shields.contains(radioshield)) { - stepsForParallel[stepName] = buildStep(target, compilerLabel, toolchain, radioshield, meshInterface) + // Build Wi-SUN only with S2LP and use S2LP only with Wi-SUN + if (("${meshInterface}" == "ws" && "${radioshield}" == "S2LP") || ("${meshInterface}" != "ws" && "${radioshield}" != "S2LP")) { + def stepName = "${target} ${toolchain} ${radioshield} ${meshInterface}" + if(allowed_shields.contains(radioshield)) { + stepsForParallel[stepName] = buildStep(target, compilerLabel, toolchain, radioshield, meshInterface) + } } } } @@ -135,6 +140,12 @@ def buildStep(target, compilerLabel, toolchain, radioShield, meshInterface) { execute("sed -i 's/\"mbed-mesh-api.6lowpan-nd-panid-filter\": \"0xffff\"/\"mbed-mesh-api.6lowpan-nd-panid-filter\": \"0xABBA\"/' ${config_file}") } + if ("${meshInterface}" == "ws") { + config_file = "./configs/mesh_wisun${config_suffix}.json" + // Possibly in future use systest Wi-SUN Border Router for testing (Network name = "ARM-WS-TESTING") + 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}") + } + // For KW24D, we need to optimize for low memory if ("${target}" == "KW24D") { // Use optimal mbed TLS config file, need double escaping of '\' characters, first ones to escape Grooy, second ones to escape shell diff --git a/configs/mesh_wisun_S2LP.json b/configs/mesh_wisun_S2LP.json index 6f099d4..07f1f6c 100644 --- a/configs/mesh_wisun_S2LP.json +++ b/configs/mesh_wisun_S2LP.json @@ -9,10 +9,12 @@ "target_overrides": { "*": { "nsapi.default-mesh-type": "WISUN", - "mbed-mesh-api.wisun-network-name": "\"WS-TEST\"", + "mbed-mesh-api.wisun-network-name": "\"Wi-SUN Network\"", + "nanostack.configuration": "ws_router", "mbed-trace.enable": false, "platform.stdio-convert-newlines": true, "platform.stdio-baud-rate": 115200, + "platform.stdio-buffered-serial": true, "s2lp.provide-default": true, "target.device_has_add": ["802_15_4_PHY"] },