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