FreeRTOS on AVR with external RAM

AVR microcontrollers aren’t the best choice to run FreeRTOS scheduler due to low on-chip RAM. Atmega128 has only 4K of RAM, so this limits the FreeRTOS functionality to very basic. Anyway, this problem can be solved by adding extra RAM which may be connected to an external memory interface. We have already built an external memory block of 8K previously so now we can test it with FreeRTOS applications. Lets continue with our previous code which runs several simple tasks (button state reading, LCD output and LED flash), and  we can add more to it. We are going to set up an external RAM for storing heaps. This will allow to store large data buffers without worrying too much about heap and stack overlaps.

Continue reading