Altera_Forum
Honored Contributor
21 years agoQuestion:NIOSII IDE, uCOSII, OSTimeTickHook
Since I want to extend uCOSII with a Timer library (from Labrosse's book "Embedded Systems Building Blocks"), I tick off the "Include code for OSTimeTickHook" in RTOS settings.
So far so good, the OS_TIME_TICK_HOOK_EN is set, and the OSTimeTickHook() in /components/altera_nios2/UCossii/src/os_cpu_c.c is called. However, it seems for me as a bad location to put my code, since os_cpu_c.c seems to be overwritten at design compile time(?). Also because whatever I need to put in the hook func is pretty application specific (a call to TmrSignalTmr() in this case). Is there something I miss, a better way to use OSTimeTickHook and other "hook" functions? Could I include something in my app, for example, that overrides the OSTimeTickHook() in /components/altera_nios2/UCossii/src/os_cpu_c.c ? Thank you.