Repaired HOST OSAL #227

Closed
muellerr wants to merge 8 commits from KSat:mueller/repairedHostOsal into master
Owner

These changes are necessary so the Host OSAL compiles (because it uses the new MQM IF).
If the MQM IF changes are merged, this merge request needs to be updated.

Furthermore, on some OSes like Windows, C99 IO is not provided as well (simiarly to newlib), so I have issues compiling it on Windows sometimes.
I suggest to make the define C99 IO define more generic and configurable via file. The CCSDSTime.cpp file now includes the FSFWConfig.h file.

Example Config file:

#ifndef CONFIG_FSFWCONFIG_H_
#define CONFIG_FSFWCONFIG_H_

#include "version.h"

//! Used to determine whether C++ ostreams are used
//! Those can lead to code bloat.
#define FSFW_CPP_OSTREAM_ENABLED 	1

//! Reduced printout to further decrese code size
//! Be careful, this also turns off most diagnostic prinouts!
#define FSFW_REDUCED_PRINTOUT		0

//! If -DDEBUG is supplied in the build defines, there will be
//! additional output which requires the translation files translateObjects
//! and translateEvents (and their compiles source files)
#ifdef DEBUG
#define FSFW_DEBUG_OUTPUT 			1
//! Specify whether info events are printed too.
#define FSFW_DEBUG_INFO				1
#include <translateObjects.h>
#include <translateEvents.h>
#else
#define FSFW_DEBUG_OUTPUT			0
#endif

//! When using the newlib nano library, C99 support for stdio facilities
//! will not be provided. This define should be set to 1 if this is the case.
#define FSFW_NO_C99_IO 	1


#endif /* CONFIG_FSFWCONFIG_H_ */

This file could be used to gather FSFW configuration constants, it just needs to be added to the include path.
This file could be used in the future to achieve conditional code execution.

One way to supply this file (with default settings) would be to put it into a folder which is not compiled/included by fsfw.mk.
The developer can then include the provided file or copy it into config if they want to tweak parameters for FSFW compilation / configuration.
In any case, they have to include it themselves.

These changes are necessary so the Host OSAL compiles (because it uses the new MQM IF). If the MQM IF changes are merged, this merge request needs to be updated. Furthermore, on some OSes like Windows, C99 IO is not provided as well (simiarly to newlib), so I have issues compiling it on Windows sometimes. I suggest to make the define C99 IO define more generic and configurable via file. The CCSDSTime.cpp file now includes the FSFWConfig.h file. Example Config file: ```cpp #ifndef CONFIG_FSFWCONFIG_H_ #define CONFIG_FSFWCONFIG_H_ #include "version.h" //! Used to determine whether C++ ostreams are used //! Those can lead to code bloat. #define FSFW_CPP_OSTREAM_ENABLED 1 //! Reduced printout to further decrese code size //! Be careful, this also turns off most diagnostic prinouts! #define FSFW_REDUCED_PRINTOUT 0 //! If -DDEBUG is supplied in the build defines, there will be //! additional output which requires the translation files translateObjects //! and translateEvents (and their compiles source files) #ifdef DEBUG #define FSFW_DEBUG_OUTPUT 1 //! Specify whether info events are printed too. #define FSFW_DEBUG_INFO 1 #include <translateObjects.h> #include <translateEvents.h> #else #define FSFW_DEBUG_OUTPUT 0 #endif //! When using the newlib nano library, C99 support for stdio facilities //! will not be provided. This define should be set to 1 if this is the case. #define FSFW_NO_C99_IO 1 #endif /* CONFIG_FSFWCONFIG_H_ */ ``` This file could be used to gather FSFW configuration constants, it just needs to be added to the include path. This file could be used in the future to achieve conditional code execution. One way to supply this file (with default settings) would be to put it into a folder which is not compiled/included by fsfw.mk. The developer can then include the provided file or copy it into config if they want to tweak parameters for FSFW compilation / configuration. In any case, they have to include it themselves.
gaisser was assigned by muellerr 2020-10-01 11:11:50 +02:00
gaisser closed this pull request 2020-10-20 15:39:53 +02:00

Pull request closed

Sign in to join this conversation.
No description provided.