Nanostack Border Router is a generic mbed border router implementation that provides the 6LoWPAN ND or Thread border router initialization logic.

Committer:
mbed_official
Date:
Wed Jun 07 09:00:30 2017 +0100
Revision:
17:fbeba6669995
Parent:
6:3c1f873ebe0b
Child:
31:11a6bfef0d31
Add Nucleo F429 to CI builds

.
Commit copied from https://github.com/ARMmbed/nanostack-border-router

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 0:85f4174a8e29 1 // List of targets to compile
mbed_official 0:85f4174a8e29 2 def targets = [
mbed_official 6:3c1f873ebe0b 3 "K64F",
mbed_official 17:fbeba6669995 4 "K66F",
mbed_official 17:fbeba6669995 5 "NUCLEO_F429ZI"
mbed_official 0:85f4174a8e29 6 ]
mbed_official 0:85f4174a8e29 7
mbed_official 0:85f4174a8e29 8 // Map toolchains to compilers
mbed_official 0:85f4174a8e29 9 def toolchains = [
mbed_official 0:85f4174a8e29 10 ARM: "armcc",
mbed_official 0:85f4174a8e29 11 GCC_ARM: "arm-none-eabi-gcc",
mbed_official 0:85f4174a8e29 12 IAR: "iar_arm"
mbed_official 0:85f4174a8e29 13 ]
mbed_official 0:85f4174a8e29 14
mbed_official 0:85f4174a8e29 15 // Configurations
mbed_official 0:85f4174a8e29 16 def configurations = [
mbed_official 0:85f4174a8e29 17 LOWPAN: "6lowpan_Atmel_RF.json",
mbed_official 0:85f4174a8e29 18 THREAD: "Thread_Atmel_RF.json",
mbed_official 0:85f4174a8e29 19 THREAD_SLIP: "Thread_SLIP_Atmel_RF.json"
mbed_official 0:85f4174a8e29 20 ]
mbed_official 0:85f4174a8e29 21
mbed_official 0:85f4174a8e29 22 def stepsForParallel = [:]
mbed_official 0:85f4174a8e29 23
mbed_official 0:85f4174a8e29 24 // Jenkins pipeline does not support map.each, we need to use oldschool for loop
mbed_official 0:85f4174a8e29 25 for (int i = 0; i < targets.size(); i++) {
mbed_official 0:85f4174a8e29 26 for(int j = 0; j < toolchains.size(); j++) {
mbed_official 0:85f4174a8e29 27 for(int k = 0; k < configurations.size(); k++) {
mbed_official 0:85f4174a8e29 28 def target = targets.get(i)
mbed_official 0:85f4174a8e29 29 def toolchain = toolchains.keySet().asList().get(j)
mbed_official 0:85f4174a8e29 30 def compilerLabel = toolchains.get(toolchain)
mbed_official 0:85f4174a8e29 31 def configurationLabel = configurations.keySet().asList().get(k)
mbed_official 0:85f4174a8e29 32 def configurationFile = configurations.get(configurationLabel)
mbed_official 0:85f4174a8e29 33 def stepName = "${target} ${configurationLabel} ${toolchain}"
mbed_official 17:fbeba6669995 34 // SLIP configuration exist only for K64F based Raspberry HAT
mbed_official 17:fbeba6669995 35 if (configurationLabel == "THREAD_SLIP" && target != "K64F") {
mbed_official 17:fbeba6669995 36 continue;
mbed_official 17:fbeba6669995 37 }
mbed_official 0:85f4174a8e29 38 stepsForParallel[stepName] = buildStep(target, compilerLabel, configurationFile, configurationLabel, toolchain)
mbed_official 0:85f4174a8e29 39 }
mbed_official 0:85f4174a8e29 40 }
mbed_official 0:85f4174a8e29 41 }
mbed_official 0:85f4174a8e29 42
mbed_official 0:85f4174a8e29 43 timestamps {
mbed_official 0:85f4174a8e29 44 parallel stepsForParallel
mbed_official 0:85f4174a8e29 45 }
mbed_official 0:85f4174a8e29 46
mbed_official 0:85f4174a8e29 47 def buildStep(target, compilerLabel, configurationFile, configurationLabel, toolchain) {
mbed_official 0:85f4174a8e29 48 return {
mbed_official 0:85f4174a8e29 49 stage ("${target}_${compilerLabel}_${configurationLabel}") {
mbed_official 0:85f4174a8e29 50 node ("${compilerLabel}") {
mbed_official 0:85f4174a8e29 51 deleteDir()
mbed_official 0:85f4174a8e29 52 dir("nanostack-border-router") {
mbed_official 0:85f4174a8e29 53 checkout scm
mbed_official 0:85f4174a8e29 54 execute("mbed deploy --protocol ssh")
mbed_official 0:85f4174a8e29 55 execute("mbed compile --build out/${configurationLabel}/${target}/${compilerLabel}/ -m ${target} -t ${toolchain} --app-config ./configs/${configurationFile}")
mbed_official 0:85f4174a8e29 56 }
mbed_official 0:85f4174a8e29 57 archive '**/nanostack-border-router.bin'
mbed_official 0:85f4174a8e29 58 }
mbed_official 0:85f4174a8e29 59 }
mbed_official 0:85f4174a8e29 60 }
mbed_official 0:85f4174a8e29 61 }