Merged
Conversation
Convert the current "cfe_psp_ram.c" and "cfe_psp_port.c" routines into modular components, and remove from "shared" dir. The existing implementations become the corresponding "direct" module, and are enabled based on the psp module selection. Also added is a "notimpl" variant, where all the functions return CFE_PSP_ERR_NOT_IMPLEMENTED. This is used on Linux or any other system where direct access is not possible. Note this also renames the existing "eeprom_stub" module to be "eeprom_notimpl" for consistency and to avoid any confusion with the unit test stubs.
Add a new PSP module that instantiates an OSAL abstract timebase for use with cFE services. This single module is then used across all 3 implementations (mcp750, pc-linux, pc-rtems) and does not need to be duplicated.
Clarifies the use case for CFE_PSP_GetTime and CFE_PSP_GetTimeBase. Moves the implementation of these to separate PSP modules, so MCP750 on VxWorks can use the optimized vxTimeBaseGet() routine while Linux and RTEMS can use the generic posix CLOCK_MONOTONIC.
Fix #171, use OSAL timebase for CFE timers
Contributor
Author
|
@jphickey there's something strange happenning with the cmake generated platform_module_list.c: /* This file is generated via CMake - do not edit in place */
#include "cfe_psp_module.h"
extern CFE_PSP_ModuleApi_t CFE_PSP_soft_timebase_API;
;extern CFE_PSP_ModuleApi_t CFE_PSP_eeprom_mmap_file_API;
CFE_StaticModuleLoadEntry_t CFE_PSP_BASE_MODULE_LIST[] =
{
{ .Name = "soft_timebase", .Api = &CFE_PSP_soft_timebase_API },
;{ .Name = "eeprom_mmap_file", .Api = &CFE_PSP_eeprom_mmap_file_API },
{ NULL }
};
/* END OF FILE */See the extra semicolon after both soft_timebase entries |
Re-add timebase name definition `CFE_PSP_SOFT_TIMEBASE_NAME` to `cfe_psp.h`
Fix #10, modularize the ram, port, and eeprom access
5b57249 to
3664f88
Compare
Contributor
Author
|
Semicolon thingy fixed when I merged #282, I think there's similar logic in one of the CMakeLists files in cFE that may need to be updated to the string concatenate logic. |
Clarifies the use case for CFE_PSP_GetTime and CFE_PSP_GetTimeBase. Moves the implementation of these to separate PSP modules, so MCP750 on VxWorks can use the optimized vxTimeBaseGet() routine while Linux and RTEMS can use the generic posix CLOCK_MONOTONIC.
Contributor
|
Yes, the semicolon issue was a missing escape char ( I think CFE is OK at this point. |
Fix #266, psp module to implement timebase
d8b5907 to
5b57249
Compare
Fix #266, psp module to implement timebase
astrogeco
added a commit
to nasa/cFS
that referenced
this pull request
Apr 8, 2021
Combines: nasa/cFE#1284 nasa/osal#951 nasa/PSP#289 Including: nasa/cFE#1251 - ES Info API Functional test nasa/osal#931 - Scrub include guards nasa/osal#937 - Switch to use CLOCK_REALTIME nasa/osal#938 - specify shell name in ShellOutputToFile nasa/PSP#286 - use OSAL timebase for CFE timers nasa/PSP#282 - modularize the ram, port, and eenasa/psp#om access nasa/PSP#285 - add psp module to implement timebase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the contribution
PR #286
Fix #171, use OSAL timebase for CFE timers
Cleans up stale code from the previous methods of generating 1Hz. Adds a new PSP module that instantiates an OSAL abstract timebase for use with cFE services. This single module is used across all psp implementations (mcp750, pc-linux, pc-rtems). Results in 1Hz timing tick on MCP750 will be more accurate. No changes to Linux or RTEMS
PR #282
Fix #10, modularize the ram, port, and eeprom access
Fixes segfaults when
CFE_PSP_Portroutines are invoked on Linux.Converts
cfe_psp_ram.candcfe_psp_port.cinto modular components and removes from the "shared" directory. The existing implementations become the corresponding "direct" module, and are enabled based on the psp module selection. Adds a "notimpl" variant where all the functions returnCFE_PSP_ERR_NOT_IMPLEMENTED. This is used on Linuxor any other system where direct access is not possible. Renames the existing
eeprom_stubmodule to beeeprom_notimplfor consistency and to avoidconfusion with the unit test stubs.
PR #285
Fix #266, psp module to implement timebase
No impact to behavior. Implements two PSP modules to provide
CFE_PSP_GetTimeandCFE_PSP_GetTimeBase, one for POSIX-compliant RTOS usingclock_gettime()and the other specifically for PowerPC processors on VxWorks that have thevxTimeBaseGet()routine. Clarifies and documents the difference and use cases forCFE_PSP_GetTimeandCFE_PSP_GetTimeBase.Adds a coverage test for the VxWorks PSP timebase module and provides an example of how this can be implemented for other modules.
Additional context
Part of nasa/cFS#238
Tests
psp Checks https://github.com/nasa/PSP/pull/289/checks
cFS Bundle https://github.com/nasa/cFS/pull/238/checks
Third party code
None
Authors