This repository was archived by the owner on Apr 24, 2019. It is now read-only.
This repository was archived by the owner on Apr 24, 2019. It is now read-only.
mbed-os-example-client does not work on STM Nucleo F401RE #37
Closed
Description
I am trying to get the mbed-os-example-client to run on an STM Nucleo F401RE with the 6LoWPAN shield and the configuration.
In order to do so, I modified
diff --git a/mbed_app.json b/mbed_app.json
index 48fbd8d..f4f737b 100644
--- a/mbed_app.json
+++ b/mbed_app.json
@@ -2,7 +2,7 @@
"config": {
"network-interface":{
"help": "options are ETHERNET,WIFI,MESH_LOWPAN_ND,MESH_THREAD",
- "value": "ETHERNET"
+ "value": "MESH_LOWPAN_ND"
},
"wifi-ssid": {
"help": "WiFi SSID",
@@ -15,9 +15,10 @@
},
"target_overrides": {
"*": {
- "target.features_add": ["IPV6", "CLIENT", "IPV4"],
+ "target.features_add": ["IPV6", "CLIENT"],
"mbed-client.reconnection-count": 3,
- "mbed-client.reconnection-interval": 5
+ "mbed-client.reconnection-interval": 5,
+ "nanostack.configuration": "lowpan_router"
}
}
-}
+}
and
diff --git a/tools/toolchains/gcc.py b/tools/toolchains/gcc.py
index 027a956..27dc11f 100644
--- a/tools/toolchains/gcc.py
+++ b/tools/toolchains/gcc.py
@@ -86,7 +86,7 @@ class GCC(mbedToolchain):
self.flags["common"].append("-g")
self.flags["common"].append("-O0")
else:
- self.flags["common"].append("-O2")
+ self.flags["common"].append("-Os")
main_cc = join(tool_path, "arm-none-eabi-gcc")
main_cppc = join(tool_path, "arm-none-eabi-g++")
so that it actually fits into ROM.
On the K64:
mbed compile -c -t GCC_ARM -m K64F -j 4
Starting mbed Client example...
Using Mesh
Connecting to Mesh..
Connected to Network successfully
IP address ....
SOCKET_MODE : UDP
Connecting to coap://[...
Registered object successfully!
On the F401RE:
mbed compile -c -t GCC_ARM -m NUCLEO_F401RE
Starting mbed Client example...
Using Mesh
Connecting to Mesh..
Connection to Network Failed -3009! Exiting application....