[riot-devel] 6lowpan Host with SLAAC, minimum ram footprint

Martine Lenders mail at martine-lenders.eu
Thu Nov 30 16:33:44 CET 2017


Hi Josua,

have you had a look at the `gnrc_minimal` example? It gives a nice overview
about which compile-time parameters you can change to achieve exactly that.
In summary this is:

* Reduce the size of the packet buffer (GNRC_PKTBUF_SIZE). If you are not
too verbose with the packets you are sending 512 can be enough (if you have
problems you can still choose higher numbers; default configuration is
6KiB).
* Reduce the size of the (unicast and multicast) IPv6 addresses you can
assign to an interface (GNRC_NETIF_IPV6_ADDRS_NUMOF
and DGNRC_NETIF_IPV6_GROUPS_NUMOF)
* Reduce the size of the neighbor cache (GNRC_IPV6_NIB_NUMOF; that is wrong
in gnrc_minimal, will fix that ASAP)

If you want to get even more out of it, run the stack in your scenario for
a while and check the stack usage of each module, using the `ps` shell
command. The usage should be much lesser than what is actually allocated.
You can reduce the stack sizes by modifying the configuration define in the
respective module's header (or override it with CFLAGS).

Hope this was helpful,
Martine

2017-11-30 16:17 GMT+01:00 Arndt, Josua <jarndt at ias.rwth-aachen.de>:

> Hello all,
>
>
>
> I have ported Riot OS to the atmega256rfr2 and the gnrc_network example
> works as expected.
>
>
>
> My setup is following:
>
> RPI Border Router with an openlabs at86rf233 transceiver and radvd.
>
> Jiminy Host with gnrc_network.
>
>
>
> Ping6 with link local from Host to BR and from BR to host works.
>
> Also ping with global Ip works.
>
> Sending UDP Packets works.
>
>
>
> Now I want to reduce the RAM  footprint to a minimum would need some
> advice how to proceed.
>
>
>
> And another question would be: is it possible to run all necessary
> modules/layers needed for slaac with only 16Kbytes sram?
>
> And how would you proceed/optimize the gnrc_network example to achieve
> this.
>
>
>
> This question arises as I have ported riot os to an at *x* mega256 and
> would like to run it as host, but the sram is only 16kbytes and so
>
> The gnrc_network example is way too large. Removing shell commands helps
> but is not enough.
>
>
>
> Following the memory usage of the full gnrc_network example.
>
> ----------------
>
> Device: atmega256rfr2
>
>
>
> Program:  114428 bytes (43.7% Full)
>
> (.text + .data + .bootloader)
>
>
>
> Data:      29195 bytes (89.1% Full)
>
> (.data + .bss + .noinit)
>
> ----------------
>
>
>
> Thank you in advance for any advice our suggestion.
>
> Josua Arndt
>
>
>
>
>
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20171130/bf81850f/attachment.html>


More information about the devel mailing list