RIOT on Arduino UNO

Hi ,

I am a complete newbie to RIOT OS . I have Arduino Uno board (based on ATmega328) and I would like to install RIOT on it . It appears there is no support for Arduino UNO presently.

On reading through certain older posts, (http://lists.riot-os.org/pipermail/devel/2013-May/000028.html) , I learned that ATmega328 has RAM of 2K - which would be insufficient for RIOT plus any application to run.

I would like to understand the following:

  1. I believe there are ways to expand RAM in Arduino UNO, using SRAM ICs and SPI bus upto 32K . So would it be feasible or make sense to port RIOT on such an expanded RAM arrangement ? If yes, I would like to try doing this exercise , though to be honest I don’t have prior experience in such an activity
  2. Is RAM the only constraint for porting RIOT on to Arduino UNO ? are there any other constraints to be thought through before taking on porting?

Regards

Sudarshan

Eric Fleury, Professor

DANTE INRIA TEAM ENS LYON Tel: +33 672 162974

Hi ,

I am a complete newbie to RIOT OS . I have Arduino Uno board (based on ATmega328) and I would like to install RIOT on it . It appears there is no support for Arduino UNO presently.

On reading through certain older posts, (http://lists.riot-os.org/pipermail/devel/2013-May/000028.html) , I learned that ATmega328 has RAM of 2K - which would be insufficient for RIOT plus any application to run.

I would like to understand the following:

  1. I believe there are ways to expand RAM in Arduino UNO, using SRAM ICs and SPI bus upto 32K . So would it be feasible or make sense to port RIOT on such an expanded RAM arrangement ?

I am afraid that such memory is only for data and will not be accessible via the program counter.

Hi,

Hi,

> I would like to understand the following: > 1) I believe there are ways to expand RAM in Arduino UNO, using SRAM ICs > and SPI bus upto 32K . So would it be feasible or make sense to port RIOT > on such an expanded RAM arrangement ? > > I am afraid that such memory is only for data and will not be accessible > via the program counter.

True, but since RIOT's program is written to the Flash ROM, there would be no need for the IP to access those addresses. So the real question is: how big is the Flash ROM, and how much memory does the .text part of RIOT consume on 8-bit platforms. For our hello-world application this is 8524 bytes on the Arduino Mega 2560, for the somewhat more sophisticated default application it's ~15 KiB (without any network support). @Sudarshan is that remotely in the flash sizes of the Arduino Uno?

http://arduino.cc/en/Main/arduinoBoardUno says: "32 KB (ATmega328) of which 0.5 KB used by bootloader"

About the original question: I don't think adding RAM via SPI makes any sense in order to work around the memory limitations imposed by RIOT's code. The way it works is that you need to actively store/load data to/from the external RAM. So you would have to rewrite code that needs more memory to work on smaller chunks and take care of loading/storing them in between steps. Such a change would most likely not be incorporated into RIOT. Now, one could think about swapping entire threads, but this would make thread switches very very slow (no acceptable realtime behavior anymore). Also, this would probably require changes in several other places like the messaging code. These changes would most likely not be incorporated into RIOT either.

But the most important question is: What do you want to do with it? If you just want to drive I/O and don't need a shell, I guess this could work. What will definitely not work with this little memory is RIOT's network stack.

Cheers, Ludwig