Skip to content

OSAL should have a "OS_GetVersionString()" function #821

@jphickey

Description

@jphickey

Is your feature request related to a problem? Please describe.
Currently the OSAL version is a string that is made available as a macro - OS_VERSION_STRING - which defined in osapi-version.h

The problem with this is that because its a preprocessor macro - the replacement is done at the point the macro is referenced and therefore the value ends up getting built into the binary code for whatever referenced this (in CFE use case this is cfe_es_task.o)

This means if that code is later linked with a different/updated OSAL library (but the CFE code using OSAL is not recompiled) it will still report the original OSAL version string, which is wrong.

Describe the solution you'd like
There should be a function call into OSAL to get the version string, rather than a macro in a header. Therefore if/when re-linking without recompilation, it will report the correct value.

Additional context
In summary - the OSAL version string should be stored within the OSAL library binary file, rather than stored within the CFE library binary file. This is confirmed via the "strings" tool that right now its in the wrong place:

$ strings build/native/default_cpu1/cfe-core/libcfe-core.a | grep osal
cFS Versions: cfe v6.8.0-rc1+dev348, osal v5.1.0-rc1+dev262, psp

This shows that the actual string showing the OSAL version as reported by the cFE event is baked into the CFE library, not the OSAL library where it should be.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions