3.5. Modularity and Configuration

3.5.1. Configuration files

EGOS is modular to fit many IoT projects. An EGOS project can integrate some modules, use a specific chip or allows to do different things and another project some others. This modularity is retrieved in the files suffixed by __cfg.h.

In an EGOS project, the config files are in the SRC/inc folders. A BSPC developers can only modify the configurations which concerne the BSPC area (in other words the configuration files located in the USER area: hal, mcu, drv, hub).

The other files shall not be modified, there are here to inform the developer what is available on the project. If the configuration is changed,the project's run will failed because the static libraries of the project will not fit with the current configuration.

3.5.2. Troubleshooting

For example:

  • The Kernel is built with:
#define dOSS_DBG__CFG__USE_SWO
//#define dOSS_DBG__CFG__USE_UART
  • This define includes the SWO specific implementation.

  • It links the API tree functions to SWO functions

  • The BSP developer wants to choose UART instead:

//#define dOSS_DBG__CFG__USE_SWO
  • In the BSPC library, this define includes the UART interface.

  • The hal configures the UART port

Then the Application developer wants to print a message with:

egos_oss_dbg_Print( .i_pacnFmt      = &STR_OS("Hello World !"));

It is going to write on the UART port as it was SWO port and will be unreadable.

The two libraries are not compiled with the same configuration, that is why the configurations of an higher area must not be modified.