one build to rule them all: building freertos & linux using the … · 2019-11-15 · •rtos +...
TRANSCRIPT
![Page 1: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/1.jpg)
One Build To Rule Them All:
Building FreeRTOS & Linux Using
The Yocto Project
M.S. Alejandro Enedino Hernandez Samaniego
Xilinx Inc.
Github @ aehs29
![Page 2: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/2.jpg)
OutlineIntroduction
• Heterogeneous Systems
• RTOS + Linux
• Workflows
![Page 3: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/3.jpg)
OutlineOpenEmbedded Development
• FreeRTOS on Yocto
• Newlib + Libgloss
– tclibc-newlib
• meta-freertos
– class, recipes
– BSP vs App
– QEMU
– Automated Tests
![Page 4: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/4.jpg)
OutlineOne Build To Rule Them All
• Multiconfig Builds
• Multiconfig Dependencies
• One Build To Rule Them All
![Page 5: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/5.jpg)
Heterogeneous
Devices
![Page 6: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/6.jpg)
Processing System:
• Application Processing
Unit
• Real-Time Processing
Unit
Xilinx Versal Architecture
![Page 7: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/7.jpg)
It Depends
Embedded Applications:
• Linux + RTOS
• RTOS
• Linux + Baremetal
• Baremetal
They all use different workflows!
![Page 8: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/8.jpg)
FreeRTOS + The
Yocto Project
![Page 9: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/9.jpg)
FreeRTOS + The Yocto Project
ARM on QEMU already on OE-Core BSP versatile92s (qemuarmv5)
ARM Embedded Toolchain[1]:
• GNU C Compiler
• Binutils
• GDB
• Newlib
– Newlib is a C library intended for use on embedded systems.
It is a conglomeration of several library parts, all under free
software licenses that make them easily usable on
embedded products. [2][1] https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm
[2] https://sourceware.org/newlib/
![Page 10: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/10.jpg)
FreeRTOS + The Yocto Project
Previous work:
• Newlib + Libgloss Recipes on OE-Core
• tclibc-newlib (TCLIBC)
Create Layer:
• Meta-FreeRTOS
– Create DISTRO
– Application is the OS
– BSP vs Application
– Use a class to simply workflows and create abstractions
– Run automated tests on RTOS applications using the
OpenEmbedded testing infrastructure.
![Page 11: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/11.jpg)
FreeRTOS + The Yocto ProjectDISTRO
![Page 12: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/12.jpg)
FreeRTOS + The Yocto ProjectCLASS: freertos-app
![Page 13: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/13.jpg)
FreeRTOS + The Yocto ProjectDISTRO
![Page 14: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/14.jpg)
FreeRTOS + The Yocto ProjectCLASS
![Page 15: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/15.jpg)
FreeRTOS + The Yocto ProjectDemo Recipe: freertos-demo
ARM926 Port: [1] https://github.com/jkovacic/FreeRTOS-GCC-ARM926ejs
Extra functionality: Task can be woken up by notification using xTaskNotify API
![Page 16: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/16.jpg)
FreeRTOS + The Yocto ProjectDemo Recipe: freertos-demo-local
![Page 17: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/17.jpg)
FreeRTOS + The Yocto ProjectMeta layer file hierarchy:
![Page 18: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/18.jpg)
FreeRTOS + The Yocto ProjectDemo& Test
To reproduce the video demo, perform the instructions from the README on the layer
repository:
https://github.com/aehs29/meta-freertos
![Page 19: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/19.jpg)
One Build To Rule
Them All
![Page 20: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/20.jpg)
Multiconfig Builds
You can use a single bitbake command to build multiple images or packages for different
targets where each image or package requires a different configuration (multiple
configuration builds). [1] https://www.yoctoproject.org/docs/latest/mega-manual/mega-
manual.html
![Page 21: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/21.jpg)
Multiconfig Depedencies
![Page 22: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/22.jpg)
Future Work
• Multiconfig Optimizations
– Shared State Cache *
– Parsing
• Support more Architectures/Ports on Meta-FreeRTOS
• Fine Tuning Meta-FreeRTOS
• Upstream tests and CI
![Page 23: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/23.jpg)
Takeaways
• The Yocto Project / Bitbake provides scalability
• FreeRTOS was just used as a test case
• Support more OSs/Applications on Yocto?
• Unify workflows across teams
• Control over toolchain and get reproducibility
![Page 24: One Build To Rule Them All: Building FreeRTOS & Linux Using The … · 2019-11-15 · •RTOS + Linux •Workflows. Outline OpenEmbedded Development •FreeRTOS on Yocto •Newlib](https://reader031.vdocuments.net/reader031/viewer/2022040601/5e91c792f8f88751683dcaf1/html5/thumbnails/24.jpg)
Alejandro Hernandez
https://layers.openembedded.org/layerindex/branch/master/layer/meta-freertos/
Thanks!
Q & A