FreeRTOS is a supported platform for Eclipse Cyclone DDS. This document explains how to build and run Eclipse Cyclone DDS on the FreeRTOS POSIX Port. For basic information, see: freertos.md.
As the steps for building and running on the FreeRTOS POSIX Port are largely the same as building and running on an actual embedded target, this document should provide an excellent starting point for users. Apart from that, the simulator can be used to verify commits do not break FreeRTOS compatibility.
lwIP can also be used in combination with both UNIX and Windows targets, but the simulator does not yet have integration. Once integration between both is figured out, this document should be updated accordingly.
Build and install the simulator
The FreeRTOS POSIX Port is not maintained by the FreeRTOS project. Various projects are maintained across the internet. At the time of writing, the version maintained by Shilin seemed the best as the version maintained by megakilo was archived.
A FreeRTOS Linux Port is in the works. Once it becomes stable, please update this document accordingly.
- Clone the repository. The
CMakeLists.txtin this directory assumes the sources are available./FreeRTOS-Simby default, but a different location can be specified using the CMake optionFREERTOS_SOURCE_DIR. ``` git clone https://github.com/shlinym/FreeRTOS-Sim.git
2. Specify an installation prefix and build the simulator like any other
CMake project.
```
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$(pwd)/install ..
cmake --build . --target install
A CMake toolchain file is generated and installed into a
sharedirectory located under CMAKE_INSTALL_PREFIX/FreeRTOS-Sim. The compiler that CMake discovers and uses to build the simulator is exported in the toolchain file and will also be used to build Eclipse Cyclone DDS in the following steps.
Build Eclipse Cyclone DDS for the simulator
- Change to the root of the repository and install the dependencies.
mkdir build cd build cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/toolchain/file -DWITH_FREERTOS=on ../src
Examples (and tests) can be executed like usual. The simulator provides a loader that initializes the hardware (not used on non-embedded targets), starts the scheduler and loads the application.