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).
I have ported Riot OS to the atmega256rfr2 and the gnrc_network example
works as expected.
Now I want to reduce the RAM �footprint to a minimum would need some
advice how to proceed.
I have a branch in [1] that tries to disable as much as possible in
order to make tests/minimal smaller. Most of it won't be of much use as
you're using gnrc, but maybe you find some inspiration.
Some ideas:
- reduce the number of allowed threads and priority levels to exactly
what you need
- disable all stdio (see also [2])
- compile with LTO=1
If you're not using RPL, then you should disable it in the Makefile.
`gnrc_networking` is shipping with RPL enabled. It's sufficient to
remove the `USEMODULE += gnrc_rpl` line in the Makefile.
You can also get some inspiration from the Makefile of the `gnrc_minimal`
example. Especially from the `CFLAGS` line there.