Even though FreeRTOS is primarily an embedded OS, we can still test FreeRTOS on Linux without any special software or emulators. The majority of code should be portable across platforms and not depend on MCU-specific functions. That means we can run/test/develop the code on any computer, as well as on a CI/CD server.
This article goes from running FreeRTOS-provided code, then running a simple Comms example, then running your own code.
Table of Contents
Download the UWOrbital-firmware-21
folder to a location. Download the FreeRTOS source code to the same location. For example, if you placed it in the Desktop folder, the folder structure should look something like this.
/Desktop/UWOrbital-firmware-21
/Desktop/FreeRTOS
Be careful when cloning FreeRTOS, as you may not have cloned with submodules enabled. Check inside FreeRTOS/FreeRTOS/Source/ directories to make sure you have .c files there.
Make sure you also have gcc
and make
installed.
Now, you're ready to run the provided demos and Comms code.
FreeRTOS comes with demos for desktop.
cd FreeRTOS/FreeRTOS/Demo/Posix_GCC/
make
You should see a lot of text as make
compiles the demo application. If there are any errors, it is highly because you don't have gcc
or make
installed. Feel free to post in the #CDH channel, and someone will probably find the problem.
To run