Closed pridolfi closed 9 years ago
Also we need to remove the quotation marks :( This is the generated output if we don't: extern void OSEKCALLBACK"alCallback"(void);
Suggested fix: "OSEKCALLBACK" . substr($config->getValue("/OSEK/" . $alarm . "/ALARMCALLBACK", "ALARMCALLBACKNAME"),1,-1)
Also we need to fix Os_Internal_Cfg.c.php: https://github.com/ciaa/Firmware/blob/master/modules/rtos/gen/src/Os_Internal_Cfg.c.php#L379
Is this issue fixed? can we close it?
pablo is this issue done? please close it :+1: thanks
Yep! Closed.
In order to use an alarm with callback, currently we need to define the OIL configuration like this: ALARM myAlarmCallback { COUNTER = SoftwareCounter; ACTION = ALARMCALLBACK { CALLBACK = alCallback; } } But the OIL standard (http://portal.osek-vdx.org/files/pdf/specs/oil25.pdf), section 3.2.6.4, specifies the correct syntax: ALARM RunCallbackC { COUNTER = SysCounter; ACTION = ALARMCALLBACK { ALARMCALLBACKNAME = "CallbackC"; }; AUTOSTART = FALSE; }; So we need to fix Os_Cfg.h.php (https://github.com/ciaa/Firmware/blob/master/modules/rtos/gen/inc/Os_Cfg.h.php#L294) from this: print "extern void OSEKCALLBACK" . $config->getValue("/OSEK/" . $alarm . "/ALARMCALLBACK", "CALLBACK") . "(void);\n"; to this: print "extern void OSEKCALLBACK" . $config->getValue("/OSEK/" . $alarm . "/ALARMCALLBACK", "ALARMCALLBACKNAME") . "(void);\n";