Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for FreeRTOS #298

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

Yveaux
Copy link
Contributor

@Yveaux Yveaux commented Jan 8, 2025

Compiles for FreeRTOS when FREERTOS is defined.

Note that _WIN32 and FREERTOS can coexist!

Compiles for FreeRTOS when __FREERTOS__ is defined.

Note that _WIN32 and __FREERTOS__ can coexist!
@SergiusTheBest
Copy link
Owner

Thanks for the PR! What kind of FREERTOS are you using? I'm worried about __FREERTOS__ macro as it seems not a standard macro defined by FreeRTOS itself.

@Yveaux
Copy link
Contributor Author

Yveaux commented Jan 9, 2025

Thanks for the PR! What kind of FREERTOS are you using? I'm worried about __FREERTOS__ macro as it seems not a standard macro defined by FreeRTOS itself.

I searched for a standardized way to detect FreeRTOS usage during compilation but there doesn't seem to be one. https://www.freertos.org/FreeRTOS_Support_Forum_Archive/February_2012/freertos_Lib_with_conditional_compiling..._5057945.html suggests to use INC_FREERTOS_H but that's not supported on all compilers and seems tricky.

Therefore I picked __FREERTOS__ but any other will be just as good; I'm open to suggestions.

As I'm working on embedded code that cross compiles to FreeRTOS under windows a combination of _WIN32 and __FREERTOS__ is also supported.

@SergiusTheBest SergiusTheBest added this to the 1.1.11 milestone Jan 15, 2025
@SergiusTheBest SergiusTheBest merged commit 94899e0 into SergiusTheBest:master Jan 15, 2025
18 of 19 checks passed
@SergiusTheBest
Copy link
Owner

I've added a FreeRTOS sample to be automatically built. I didn't find anything better then keep __FREERTOS__ (just added a comment about it).

@Yveaux
Copy link
Contributor Author

Yveaux commented Jan 17, 2025

Thanks for the rerwork & merge! 👍

@Yveaux Yveaux deleted the FreeRTOS_support branch January 17, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants