Skip to content

ahcbb6/meta-freertos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

meta-freertos

FreeRTOS distro layer compatible with OpenEmbedded

Currently supported BSPs:

For building instructions for the Raspberry Pi Pico, refer to the meta-raspberrypi-baremetal layer documentation.

Build Status

master Build Status
kirkstone Build Status
dunfell Build Status

Dependencies

This layer depends on:

 URI: git://git.yoctoproject.org/poky
 branch: master

License

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.

FreeRTOS build setup

1.- Clone the required repositories

$ git clone https://git.yoctoproject.org/git/poky
$ cd poky
$ git clone https://github.com/ahcbb6/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 "DISTRO = \"freertos\"" >> ./conf/local.conf
# If building for QEMU use:
$ echo "MACHINE = \"qemuarmv5\"" >> ./conf/local.conf
# If, instead, building for STM32 use:
$ echo "MACHINE = \"stm32f446\"" >> ./conf/local.conf

Build a FreeRTOS demo as a standalone application:

4.- Build a sample FreeRTOS standalone application:

# For QEMU:
$ bitbake freertos-demo
# For STM32:
$ bitbake freertos-demo-stm32

5.- Run the application on QEMU (or flash the .hex file on the deploy directory for STM32):

$ 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...

Build Linux along with FreeRTOS (Linux on qemux86-64 and FreeRTOS on qemuarmv5):

(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

About

FreeRTOS distro layer compatible with OpenEmbedded

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published