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

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Wed Jun 20 12:01:14 2018 +0100
Parent:
68:27b3b929ce56
Child:
70:6915b62d43cc
Commit message:
Enable emac ethernet driver (#121)

-Use EMAC ethernet driver
-Update Jenkinsfile and README
-Limit KINETIS EMAC driver TX/RX buffer count to 4+4 (default 16+8)
-Use mbed-os-5.9.1 release
-Update memory traces


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

Changed in this revision

Jenkinsfile Show annotated file Show diff for this revision Revisions of this file
README.md Show annotated file Show diff for this revision Revisions of this file
configs/6lowpan_Atmel_RF.json Show annotated file Show diff for this revision Revisions of this file
configs/6lowpan_Spirit1_RF.json Show annotated file Show diff for this revision Revisions of this file
configs/Thread_Atmel_RF.json Show annotated file Show diff for this revision Revisions of this file
mbed_app.json Show annotated file Show diff for this revision Revisions of this file
source/borderrouter_helpers.c Show annotated file Show diff for this revision Revisions of this file
--- a/Jenkinsfile	Tue Jun 19 12:45:23 2018 +0100
+++ b/Jenkinsfile	Wed Jun 20 12:01:14 2018 +0100
@@ -14,8 +14,8 @@
 // List of targets to compile
 def targets = [
   "K64F",
-  "K66F"
-  //"NUCLEO_F429ZI"
+  "K66F",
+  "NUCLEO_F429ZI"
   ]
 
 // Map toolchains to CI labels
--- a/README.md	Tue Jun 19 12:45:23 2018 +0100
+++ b/README.md	Wed Jun 20 12:01:14 2018 +0100
@@ -306,6 +306,3 @@
 [INFO][brro]: 6LoWPAN Border Router Bootstrap Complete.
 ```
 
-## Known Issues
- * Application does not link with NUCLEO_F429ZI boards, issue #[113](https://github.com/ARMmbed/nanostack-border-router/issues/113)
-
--- a/configs/6lowpan_Atmel_RF.json	Tue Jun 19 12:45:23 2018 +0100
+++ b/configs/6lowpan_Atmel_RF.json	Wed Jun 20 12:01:14 2018 +0100
@@ -10,7 +10,7 @@
         },
         "backhaul-driver": {
             "help": "options are ETH, SLIP, EMAC",
-            "value": "ETH"
+            "value": "EMAC"
         },
         "mesh-mode": {
             "help": "Mesh networking mode. Options are LOWPAN_ND and THREAD",
@@ -82,10 +82,14 @@
             "SERIAL_TX": "PTE0",
             "SERIAL_RX": "PTE1",
             "SERIAL_CTS": "PTE2",
-            "SERIAL_RTS": "PTE3"
+            "SERIAL_RTS": "PTE3",
+            "kinetis-emac.tx-ring-len":4,
+            "kinetis-emac.rx-ring-len":4
         },
         "K66F": {
-            "LED": "LED_GREEN"
+            "LED": "LED_GREEN",
+            "kinetis-emac.tx-ring-len":4,
+            "kinetis-emac.rx-ring-len":4
         }
     }
 }
--- a/configs/6lowpan_Spirit1_RF.json	Tue Jun 19 12:45:23 2018 +0100
+++ b/configs/6lowpan_Spirit1_RF.json	Wed Jun 20 12:01:14 2018 +0100
@@ -10,7 +10,7 @@
         },
         "backhaul-driver": {
             "help": "options are ETH, SLIP, EMAC",
-            "value": "ETH"
+            "value": "EMAC"
         },
         "mesh-mode": {
             "help": "Mesh networking mode. Options are LOWPAN_ND and THREAD",
@@ -40,9 +40,9 @@
         "beacon-protocol-id": 4,
         "prefix": "fd00:db8::",
         "prefix-from-backhaul": true,
-	"rf-channel": 1,
-	"rf-channel-page": 2,
-	"rf-channel-mask": "(1<<1)",
+        "rf-channel": 1,
+        "rf-channel-page": 2,
+        "rf-channel-mask": "(1<<1)",
         "short-mac-address": "0xface",
         "backhaul-dynamic-bootstrap": true,
         "backhaul-prefix": "fd00:db8:ff1::",
@@ -76,17 +76,21 @@
             "mbed-trace.enable": 1,
             "nanostack.configuration": "lowpan_border_router",
             "platform.stdio-convert-newlines": true,
-            "platform.stdio-baud-rate": 115200
+            "platform.stdio-baud-rate": 115200,
+            "kinetis-emac.tx-ring-len":4,
+            "kinetis-emac.rx-ring-len":4
         },
         "NUCLEO_F429ZI": {
-    	    "LED": "LED1",
-   	    "SERIAL_TX": "SERIAL_TX",
-    	    "SERIAL_RX": "SERIAL_RX",
-    	    "SERIAL_CTS": "PD_11",
-    	    "SERIAL_RTS": "PD_12"
+            "LED": "LED1",
+            "SERIAL_TX": "SERIAL_TX",
+            "SERIAL_RX": "SERIAL_RX",
+            "SERIAL_CTS": "PD_11",
+            "SERIAL_RTS": "PD_12"
         },
         "K66F": {
-            "LED": "LED_GREEN"
+            "LED": "LED_GREEN",
+            "kinetis-emac.tx-ring-len":4,
+            "kinetis-emac.rx-ring-len":4
         }
     },
     "macros": ["SPIRIT1_SPI_MOSI=PB_5"]
--- a/configs/Thread_Atmel_RF.json	Tue Jun 19 12:45:23 2018 +0100
+++ b/configs/Thread_Atmel_RF.json	Wed Jun 20 12:01:14 2018 +0100
@@ -10,7 +10,7 @@
         },
         "backhaul-driver": {
             "help": "options are ETH, SLIP, EMAC",
-            "value": "ETH"
+            "value": "EMAC"
         },
         "mesh-mode": {
             "help": "Mesh networking mode. Options are LOWPAN_ND and THREAD",
@@ -67,10 +67,14 @@
             "SERIAL_TX": "PTE0",
             "SERIAL_RX": "PTE1",
             "SERIAL_CTS": "PTE2",
-            "SERIAL_RTS": "PTE3"
+            "SERIAL_RTS": "PTE3",
+            "kinetis-emac.tx-ring-len":4,
+            "kinetis-emac.rx-ring-len":4
         },
         "K66F": {
-            "LED": "LED_GREEN"
+            "LED": "LED_GREEN",
+            "kinetis-emac.tx-ring-len":4,
+            "kinetis-emac.rx-ring-len":4
         }
     }
 }
--- a/mbed_app.json	Tue Jun 19 12:45:23 2018 +0100
+++ b/mbed_app.json	Wed Jun 20 12:01:14 2018 +0100
@@ -10,7 +10,7 @@
         },
         "backhaul-driver": {
             "help": "options are ETH, SLIP, EMAC",
-            "value": "ETH"
+            "value": "EMAC"
         },
         "mesh-mode": {
             "help": "Mesh networking mode. Options are LOWPAN_ND and THREAD",
@@ -78,10 +78,14 @@
             "SERIAL_TX": "PTE0",
             "SERIAL_RX": "PTE1",
             "SERIAL_CTS": "PTE2",
-            "SERIAL_RTS": "PTE3"
+            "SERIAL_RTS": "PTE3",
+            "kinetis-emac.tx-ring-len":4,
+            "kinetis-emac.rx-ring-len":4
         },
         "K66F": {
-            "LED": "LED_GREEN"
+            "LED": "LED_GREEN",
+            "kinetis-emac.tx-ring-len":4,
+            "kinetis-emac.rx-ring-len":4
         }
     }
 }
--- a/source/borderrouter_helpers.c	Tue Jun 19 12:45:23 2018 +0100
+++ b/source/borderrouter_helpers.c	Wed Jun 20 12:01:14 2018 +0100
@@ -54,14 +54,11 @@
     const mem_stat_t *heap_info = ns_dyn_mem_get_mem_stat();
     if (heap_info) {
         tr_info(
-            "Heap size: %" PRIu16 ", "
-            "Reserved: %" PRIu16 ", "
-            "Reserved max: %" PRIu16 ", "
-            "Alloc fail: %" PRIu32 ""
-            ,heap_info->heap_sector_size
-            ,heap_info->heap_sector_allocated_bytes
-            ,heap_info->heap_sector_allocated_bytes_max
-            ,heap_info->heap_alloc_fail_cnt);
+            "Heap size: %lu, Reserved: %lu, Reserved max: %lu, Alloc fail: %lu"
+            ,(unsigned long)heap_info->heap_sector_size
+            ,(unsigned long)heap_info->heap_sector_allocated_bytes
+            ,(unsigned long)heap_info->heap_sector_allocated_bytes_max
+            ,(unsigned long)heap_info->heap_alloc_fail_cnt);
     }
 }