Multitasking on MSP430 with FreeRTOS
As my first FreeRTOS project I set up this simple demo on a TI MSP430FR4133 LaunchPad. I chose this microcontroller mainly because I already own the development board for it and there was no official FreeRTOS support for this exact microcontroller (but general support for MSP430X CPUs).
As discussed previously, I like to use open toolchains and build systems, rather than “all-in-one” IDEs for embedded programming. I used the GCC toolchain provided by TI and wrote a CMake script which automatically downloads the upstream FreeRTOS kernel during the build. Not only does this reduce the size of the code base, it also creates a clean separation between kernel and application code.
After experimenting with the kernel configuration, I quickly realized that my microcontroller does not have enough FRAM for complex projects. However, with some kernel features disabled I was able to get a simple blinking demo running: Two task running concurrently, each blinking an LED in a busy loop.