...
So let’s declare our firmware variable as virtual! First, remove the declaration from the variable list. Now we redeclare our variable as virtual in our application:
Code Block |
---|
#define APPL_CM_FWVERSION_VIRTUAL_ID (1024) ... /* register virtual fw revision variable. Module must be known to the cm */ res = goal_cmRegVarVirtual(APPL_CM_MOD_ID, APPL_CM_FWVERSION_VIRTUAL_ID, GOAL_CM_GENERIC, APPL_CM_STRING_LEN, NULL, NULL); if (GOAL_RES_ERR(res)) { goal_logErr("error registering virtual fw revision variable"); } |
Note |
---|
It is up to the application developer to select an appropriate variable id. Ensure that this id does not collide with variables declared in the variable list macro. Otherwise this leads to undefined behaviour. |
That’s it! The firmware revision is now excluded from saving and loading. You just have to set the value at startup of your application.
...