-
Notifications
You must be signed in to change notification settings - Fork 219
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
How hardware components are integrated with cFS applications? #766
Comments
I typically only add elements to the PSP if they are required by the core, and BSP only if it's required for startup. This keeps the PSP and BSP as simple as possible (less technical debt, might not need to clone and own, etc). For custom hardware specific logic that is only used by an app (or apps) I put it in a library to provide a layer of abstraction from the app. Just load your libraries first. Note that also provides an easy layer to simulate things if you have such a use case (if you are running on a PC w/o the real hardware the library can simulate the hardware behavior. So a lib with: then the app just adds the dependency and you should be good to go. See sample_app/lib for makefile examples. |
I couldn't have asked for a better lead in... There are two cFS Basecamp projects that provide working examples for what was just described. Raspberry Pi LED Control is an example of a hardware interface library serving as a device driver for an app that controls an LED. Payload Manager is an example of simulating a hardware device when the hardware is not available, or a hardware simulator is not available for testing error paths. |
Do you mean sample_lib or sample_app? |
@Gonta01 - Yes, for CMake example of an app calling a lib and how to add them to cFS. Although it sounds like @open-stemware has examples more specific to your use case. |
In case you don't want to work through the Basecamp projects here are links to the lib/app repos used in each project: Raspberry Pi LED Control Payload Manager |
@open-stemware thank you a lot for you answers and provided links. |
There are CFS-101 TRAINING GUIDE where in details is described how to create own application. The examples are based on temperature monitoring.
The issue is how temperature is transmitted from hardware layer up to applications for real board? What should be added and at what layer? Should PSP, BSP layers be somehow modified?
The issue is not only related to temperature but any interaction with any hardware isn't clear (at least for me).
Are there any examples, guide or documents that could clarify this issue?
The text was updated successfully, but these errors were encountered: