Coarse-grained configuration of an eCos system means making configuration changes using the ecosconfig tool. These changes include:
switching to different target hardware
switching to a different template
adding or removing a package
changing the version of a package
Whenever ecosconfig generates or updates an eCos configuration, it generates a configuration save file.
Suppose that the configuration was first created using the following command line:
$ ecosconfig new stdeval1 |
To change the target hardware to the Cogent CMA28x PowerPC board, the following command would be needed:
$ ecosconfig target cma28x |
To switch to the PowerPC simulator instead:
$ ecosconfig target psim |
As the hardware changes, hardware-related packages such as the HAL packages and device drivers will be added to and removed from the configuration as appropriate.
To remove any package from the current configuration, use the remove command:
$ ecosconfig remove uitron |
You can disable multiple packages using multiple arguments, for example:
$ ecosconfig remove uitron libm |
If this turns out to have been a mistake then you can re-enable one or more packages with the add command:
$ ecosconfig add libm |
Changing the desired version for a package is also straightforward:
$ ecosconfig version v2_1 kernel |
It is necessary to regenerate the build tree and header files following any changes to the configuration before rebuilding eCos:
$ ecosconfig tree |