DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Publishing Flutter Packages to JFrog Artifactory
  • Simplifying Multi-Cloud Observability With Open Source
  • Mastering Multi-Cloud and Edge Data Synchronization: A Retail Use Case With KubeMQ’s Java SDK
  • Zero to AI Hero, Part 2: Understanding Plugins in Semantic Kernel, A Deep Dive With Examples

Trending

  • Simpler Data Transfer Objects With Java Records
  • Enhancing Business Decision-Making Through Advanced Data Visualization Techniques
  • AI Speaks for the World... But Whose Humanity Does It Learn From?
  • Implementing Explainable AI in CRM Using Stream Processing

Using Custom FreeRTOS With S32K SDK and OSIF for ARM

Want to learn more about how you can use the Custom FreeRTOS with the S32K SDK and OSIF for ARM? Click for the tutorial to learn more!

By 
Erich Styger user avatar
Erich Styger
·
Sep. 01, 18 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
8.9K Views

Join the DZone community and get the full member experience.

Join For Free

In the “Tutorial: FreeRTOS 10.0.1 with NXP S32 Design Studio 2018.R1,” I demonstrated how to use a custom FreeRTOS with the S32 Design Studio (ARM). The OSIF (OS Interface) provides an operating system and services abstraction for the application, which is used by other S32K SDK components:

OSIF in S32K for ARM Eclipse Project

OSIF in S32K for ARM Eclipse Project

The challenge I had was to make the OSIF component aware that there is a custom FreeRTOS component in the project (it worked fine with the NXP supplied one). If the presence of FreeRTOS is detected, the OSIF will use the RTOS services. Otherwise, it will create its own services, e.g. using the SysTick timer interrupt.

Here is how you can use the McuOnEclipse FreeRTOS with the S32K SDK using the OSIF:

You will need at least version 01.558 of the McuOnEclipse FreeRTOS component, available from SourceForge.

The OSIF checks for the presence of a component named ‘FreeRTOS.’ In the component settings, rename the component:FreeRTOS component name

FreeRTOS component name

The component will generate a FreeRTOSConfig.h (to configure the RTOS) and the file FreeRTOS_config.h (to configure the component settings, which are not covered by the standard FreeRTOS one).

Then, you will need to enable it to generate FreeRTOS files into subfolders with ‘Manual Clock Values' disabled:FreeRTOS Source Folders

FreeRTOS Source Folders

This generates the RTOS files into subfolders:

FreeRTOS files folder structure

FreeRTOS files folder structure

The reason for this is that, otherwise, there might be conflicts with the NXP version of the FreeRTOS file handling. The ‘normal’ component files are still stored in the normal place:

FreeRTOS component files

FreeRTOS component files

Now, with the extra subfolders, I need to tell the compiler where it can find the header files. This is a setting in the project, so add the following include paths (you can copy-paste them):

../Generated_Code/FreeRTOS/Source/include
../Generated_Code/FreeRTOS/config/gcc
../Generated_Code/FreeRTOS/Source/portable/GCC/ARM_CM4F

FreeRTOS Include Paths

FreeRTOS Include Paths

Before including Events.c in  main.c, make sure you include the necessary FreeRTOS files first:

#include "FreeRTOS.h"
#include "task.h"

FreeRTOS includes

FreeRTOS includes

Finally, you will need to add the following to define to the compiler preprocessor settings:

USING_OS_FREERTOS

USING_OS_FREERTOS

USING_OS_FREERTOS

That’s it. With all this, the OSIF component uses the FreeRTOS services and can be used with other S32K SDK components.

OSIF using FreeRTOS functions

OSIF using FreeRTOS functions

Happy FreeRTOSing!

Links

  • Tutorial: FreeRTOS 10.0.1 with NXP S32 Design Studio 2018.R1
  • Examples on GitHub: https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/S32DS
  • McuOnEclipse components on SourceForge: https://sourceforge.net/projects/mcuoneclipse/files/PEx%20Components/


FreeRTOS Software development kit Arm (geography)

Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Publishing Flutter Packages to JFrog Artifactory
  • Simplifying Multi-Cloud Observability With Open Source
  • Mastering Multi-Cloud and Edge Data Synchronization: A Retail Use Case With KubeMQ’s Java SDK
  • Zero to AI Hero, Part 2: Understanding Plugins in Semantic Kernel, A Deep Dive With Examples

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!