FreeRTOS / Lab-Project-FreeRTOS-POSIX

This repository contains FreeRTOS+POSIX source code, which could be consumed as a submodule.
MIT License
95 stars 60 forks source link

Steps for adding new portable header file #25

Closed krshnarajd closed 1 year ago

krshnarajd commented 1 year ago

Hi Team,

I am in the process of evaluating freertos+posix in our chip. I can see that we need to add "FreeRTOS_POSIX_portable.h" corresponding to the new board/chip. Could you please guide me on the procedure to be followed ? Whether a simple pull request with the changes is enough ?

Thanks Krishnaraj

johnrhen commented 1 year ago

Yes, if you've already made a FreeRTOS_POSIX_portable.h for the new board, and you make a PR, we'd be happy to review it. However, you can also just adopt/copy code from the lab project in order to support your use case.

davidefer commented 1 year ago

Hi I have a question related to this topic supposing my application does the following:

include <sys/types.h>

in types.h h I see the following:

/ FreeRTOS types include /

include "FreeRTOS_POSIX_types.h"

The problem here is that the "portable" customization is not seen, because the portable file is not included. The result is that if I have excluded some features in the portable file (because already defined by the compiler), I get errors, for instance, in my portable file:

define posixconfigENABLE_CLOCK_T 0

I don't want to include the FreeRTOS_POSIX.h file evywhere before the sys inlcudes... Am I missing something?

Thanx in advance Davide

johnrhen commented 1 year ago

You must include FreeRTOS_POSIX.h before any other FreeRTOS+Posix includes, or else it may not function properly.

davidefer commented 1 year ago

You must include FreeRTOS_POSIX.h before any other FreeRTOS+Posix includes, or else it may not function properly.

Thank you for the reply. if what you say is right, the sys/types.h file shall be modified by this project's owners with the mentioned include.

johnrhen commented 1 year ago

I'll log a feature request, in that case. You can also open a PR with the required changes, and we'd be happy to review it.