-
Notifications
You must be signed in to change notification settings - Fork 57
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
psp Integration candidate: 2021-04-06 #289
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
@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
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.
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
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
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_Port
routines are invoked on Linux.Converts
cfe_psp_ram.c
andcfe_psp_port.c
into 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_stub
module to beeeprom_notimpl
for 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_GetTime
andCFE_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_GetTime
andCFE_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