FreeRTOS on AVR with external RAM

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

Continue reading