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:
Mon May 08 11:15:20 2017 +0100
Revision:
6:3c1f873ebe0b
Parent:
0:85f4174a8e29
Child:
17:fbeba6669995
Add K66F to CI build

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