Arrange Startup Calls According to OS Initialization Phases
Initialization sequences are the ordered startup function calls that bring ECU drivers and BSW modules into a defined state across the pre-OS and post-OS phases. The ordering of the initialization items directly influences startup behavior.
These sequences can be modified by using the Initialization Editor.
Configure Pre-OS Sequence
This phase includes the common configuration (parameters) of the ECU State Manager. The configuration is stored in module EcuM/EcuMConfiguration/EcuMCommonConfiguration.
Within the pre-OS phase, there are three initialization sequences which are processed in different ECU startup phases:
-
Driver Init List 0: Initialization items that will be handled after a reset almost directly after EcuM_Init has been called.
-
Driver Init List 1: Initialization items that will be handled after a reset from within EcuM_Init function after the module has entered the state ECUM_STATE_STARTUP_ONE.
-
Driver Restart List: Initialization items that will be handled after a restart from SLEEP mode occurred.
Configure Post-OS Sequence
This phase includes the configuration of post-Os driver module initialization sequences. The configuration is stored in module EcuM/EcuMConfiguration/EcuMFixedConfiguration.
Within the post-OS phase, there are two initialization sequences:
-
Driver Init List 2: A container for init block II.
-
Driver Init List 3: A container for init block III.
Add or Create Initialization Items
There are two types of initialization items which can be added and created to initialization sequences:
-
EcuMDriverInitItem: a module initialization function.
-
Code Item: Some user-defined code to be executed during initialization.
Create an EcuMDriverInitItem
-
In the tree view, navigate to the EcuMDriverInitItems container where the item should be added.
-
Either:
-
Right-click on the container to open the context menu and choose [ Create ExuMDriverInitItem ], or…
-
Left-click on the container, then in the right-hand details pane press the [ Create ExuMDriverInitItem ] button.
-
-
In the Create EcuMDriverInitItems window, select one or more InitFunctions to be created.
-
Press [ Finish ], the new EcuMDriverInitItem(s) will be created and added to the list.
Create a Code Item
-
In the tree view, navigate to the EcuMDriverInitItems container where the item should be added.
-
Either:
-
Right-click on the container to open the context menu and choose [ Create Code Item ], or…
-
Left-click on the container, then in the right-hand details pane press the [ Create Code Item ] button.
-
-
A new code item will be created and added to the list.
-
In the details view, populate the code item parameters.
Deleting Initialization Items
In the tree view, navigate to the item to be removed. Right-click on the item to open the context menu and choose [ Delete ] to delete the item, or press the Delete key.
Alternatively: In the tree view, navigate to the EcuMDriverInitItems container which contains the item to be removed. In the details view, select the item to be deleted and choose [ Delete ] to delete the item, or press the [ Delete ] button.