SAMR21 Thread / Mesh Implementation Questions


(Colin Foe-Parker) #1

Hi Everyone,

I am relatively new to the mbed ecosystem. I am trying to evaluate the state of the software for a future wireless 802.15.4 design. I would would like to build a thread demonstration using the SAMR21 XPlained Development Board. I have seen similar examples on Atmel's video demonstrations.

I have successfully configured yotta to build the default blinky app for the SAMR21 XPlained Development Board. It blinks and spits text out the USB serial port. Woot! Win!

I believe my next jumping off point is the mbed-client-example-6lowpan.

I have changed the configuration to "appl_bootstrap_mode_thread: true" and "device_type: MESH_DEVICE_TYPE_THREADY_SLEEPY_END_DEVICE"

I have worked through the compile time issues and all the modules are currently building. The issue I have is at link time.


~/sandbox/mbed-client-example-6lowpan/yotta_targets/atmel-samr21g18a-gcc/CMake/../ld/samr21g18a.ld:115 cannot move location counter backwards (from 000000002000bd84 to 0000000020006000)

I believe this error is a result of trying to squeeze too much into the 32KB of RAM on the MCU. Which brings up the relevant questions:

1.) This video demonstrates Thread running on the evaluation hardware. Is that example available in public anywhere?

2.) If I need to shrink the RAM and Flash footprint of the demonstration, what modules can be removed? I have provided the output of yt ls below.

mbed-client-example-6lowpan 0.0.2
┣━ mbed-client 1.4.9
┃ ┣━ mbed-client-c 2.2.11 yotta_modules/mbed-client-c
┃ ┃ ┗━ nanostack-libservice 3.1.1 yotta_modules/nanostack-libservice
┃ ┣━ mbed-client-mbed-os 1.1.6 yotta_modules/mbed-client-mbed-os
┃ ┃ ┣━ mbed-drivers 1.3.0 yotta_modules/mbed-drivers
┃ ┃ ┃ ┣━ mbed-hal 1.2.2 yotta_modules/mbed-hal
┃ ┃ ┃ ┃ ┗━ mbed-hal-atmel 1.0.0 yotta_modules/mbed-hal-atmel
┃ ┃ ┃ ┃ ┣━ mbed-hal-atmel-common 1.0.0 yotta_modules/mbed-hal-atmel-common
┃ ┃ ┃ ┃ ┗━ mbed-hal-atmel-samcortexm0p 1.0.0 yotta_modules/mbed-hal-atmel-samcortexm0p
┃ ┃ ┃ ┃ ┗━ mbed-hal-atmel-samr21g18a 1.0.1 yotta_modules/mbed-hal-atmel-samr21g18a
┃ ┃ ┃ ┣━ cmsis-core 1.1.2 yotta_modules/cmsis-core
┃ ┃ ┃ ┃ ┗━ cmsis-core-atmel 1.0.0 yotta_modules/cmsis-core-atmel
┃ ┃ ┃ ┃ ┗━ cmsis-core-atmel-samcortexm0p 1.0.0 yotta_modules/cmsis-core-atmel-samcortexm0p
┃ ┃ ┃ ┃ ┗━ cmsis-core-atmel-samcortexm0p-samr21 1.0.0 yotta_modules/cmsis-core-atmel-samcortexm0p-samr21
┃ ┃ ┃ ┣━ ualloc 1.1.0 yotta_modules/ualloc
┃ ┃ ┃ ┃ ┗━ dlmalloc 1.0.0 yotta_modules/dlmalloc
┃ ┃ ┃ ┣━ minar 1.1.0 yotta_modules/minar
┃ ┃ ┃ ┃ ┗━ minar-platform 1.0.0 yotta_modules/minar-platform
┃ ┃ ┃ ┃ ┗━ minar-platform-mbed 1.1.4 yotta_modules/minar-platform-mbed
┃ ┃ ┃ ┣━ core-util 1.6.0 yotta_modules/core-util
┃ ┃ ┃ ┣━ compiler-polyfill 1.2.1 yotta_modules/compiler-polyfill
┃ ┃ ┃ ┗━ greentea-client 0.1.8 yotta_modules/greentea-client
┃ ┃ ┗━ sockets 1.1.3 yotta_modules/sockets
┃ ┃ ┗━ sal 1.1.5 yotta_modules/sal
┃ ┗━ mbed-client-mbedtls 1.0.15 yotta_modules/mbed-client-mbedtls
┃ ┗━ mbedtls 2.2.1 yotta_modules/mbedtls
┣━ atmel-rf-driver 2.0.2
┃ ┗━ sal-stack-nanostack 4.0.2 yotta_modules/sal-stack-nanostack
┃ ┣━ sal-stack-nanostack-eventloop 1.0.7 yotta_modules/sal-stack-nanostack-eventloop
┃ ┃ ┗━ mbed-6lowpan-eventloop-adaptor 1.1.1 yotta_modules/mbed-6lowpan-eventloop-adaptor
┃ ┣━ nanostack-randlib 1.0.0 yotta_modules/nanostack-randlib
┃ ┗━ coap-service 2.1.0 yotta_modules/coap-service
┗━ mbed-mesh-api 2.2.0
┗━ sal-iface-6lowpan 2.0.1 yotta_modules/sal-iface-6lowpan

3.) Is this the correct location to be asking this question?

Any help would be greatly appreciated! Thanks,

-Colin


(Seppo Takalo) #2

Hi Colin,

Yes, you have picked the right sample application to evaluate.

The Atmel demonstration used our modified Thread stack without any security features and without the mbed-client functionality. I don't believe that their demonstration code is public.

The full Thread stack with mandatory security functions and mbed-client with DTLS security just does not fit into this device. Currently we develop and publish our example applications using the FRDM-K64F development board. We are not yet in a phase where we optimize for the minimal flash size so I cannot help you there, sorry.

Br.
Seppo


(Colin Foe-Parker) #3

Seppo,

Thank you for helping answer some of my questions. You confirmed my concerns about the flash and ram size.

-Colin


(Tibor Beke) #4

Not related to the SAMR21, but to the mesh networking.

Is there any way I can test the multihop capabilities? I have a few nodes and a border router, but currently all the nodes connect to the border router. Any ideas/suggestion to enforce a node to connect to another (routing) node?
I only need this for testing/development.

The sources are not open source so I have no idea how to go around with this.
https://github.com/ARMmbed/sal-stack-nanostack/tree/master/source