FreeRTOS distro layer compatible with OpenEmbedded
master | |
---|---|
dunfell |
This layer depends on:
URI: git://git.yoctoproject.org/poky
branch: master
This layer has an MIT license (see LICENSE) and it fetches code from FreeRTOS that has its own License (MIT as of the day of writing this README), along with code taken from jkovacic which also has its own license.
1.- Clone the required repositories (Use -b dunfell if you want a stable release)
$ git clone https://git.yoctoproject.org/git/poky
$ cd poky
$ git clone https://github.com/aehs29/meta-freertos.git
2.- Add meta-freertos to your bblayers.conf
$ source oe-init-build-env
$ bitbake-layers add-layer ../meta-freertos
3.- Add the required variables to your local.conf
$ echo "MACHINE = \"qemuarmv5\"" >> ./conf/local.conf
$ echo "DISTRO = \"freertos\"" >> ./conf/local.conf
4.- Build a sample FreeRTOS standalone application:
$ bitbake freertos-demo
5.- Run the application on QEMU:
$ runqemu nographic
After running runqemu you should be able to see the output of the application on QEMU and interact with it.
Sample output:
###### - FreeRTOS sample application -######
A text may be entered using a keyboard.
It will be displayed when 'Enter' is pressed.
Periodic task 10 secs
Waiting For Notification - Blocked...
Task1
Task1
You entered: "HelloFreeRTOS"
Unblocked
Notification Received
Waiting For Notification - Blocked...
(First 3 steps still apply)
4.- Enable multiconfig builds on your local.conf
$ echo "BBMULTICONFIG = \"dummy-x86-64\"" >> ./conf/local.conf
5.- Create a multiconfig dependency so freertos gets built automatically when building Linux
$ echo "do_image[mcdepends] = \"multiconfig:dummy-x86-64::freertos-demo-local:do_image\"" >> ./conf/local.conf
6.- Build Linux image and get a FreeRTOS demo for free!
$ bitbake mc:dummy-x86-64:core-image-minimal
7.- Run the FreeRTOS application on QEMU:
$ runqemu nographic
8.- Run the Linux image on QEMU (Assuming you used the default settings):
$ runqemu nographic tmp-qemux86-64-glibc/deploy/images/qemux86-64/core-image-minimal-qemux86-64.qemuboot.conf