Page 2 of 3

Re: AVR os-less OSAL

Posted: Fri Oct 21, 2016 8:34 am
by Marco
Ok, attached are two patches. One for the nop insructions in osal.h and the other one for hal_serial_lld.c.

Marco

Re: AVR os-less OSAL  Topic is solved

Posted: Fri Oct 21, 2016 12:57 pm
by utzig
Applied, thanks!

Re: AVR os-less OSAL

Posted: Mon Nov 28, 2016 5:18 pm
by Marco
Hi,

I'd like to use a virtual timer in the AVR os-less OSAL. Is it possible to make the vtSetI and vtResetI functions public?

Marco

Re: AVR os-less OSAL

Posted: Tue Nov 29, 2016 12:12 pm
by utzig
Hi,

The rationale for it being the way it is, is something that only Giovanni will know. But IMO we could make vtIsArmedI, vtSetI and vtResetI public. I would suggest changing the names to something like osalVtIsArmedI, osalVtSetI, osalVtResetI.

Also it bothers me a lot that os-less/ARMCMx/osal.c and os-less/AVR/osal.c have the same contents. Maybe moving one of them to "common" and updating the makefiles?

Giovanni, what do you think?

Re: AVR os-less OSAL

Posted: Tue Nov 29, 2016 7:33 pm
by Giovanni
Hi,

Those function do not belong to the "osal" namespace because the underlying OS could (and usually does) have its own timeout mechanism, see RT and NIL for example. RT has virtual timers, NIL does it differently.

Giovanni

Re: AVR os-less OSAL

Posted: Wed Nov 30, 2016 3:14 pm
by Marco
Hi Giovanni,

I understand, but since there is no underlying OS there is no timeout mechanism available. Since the os-less OSAL already has a timers implementation i thought it can be made public so the application can use it as well.

Marco

Re: AVR os-less OSAL

Posted: Wed Nov 30, 2016 4:43 pm
by Giovanni
You can make it public, I didn't want to establish it as a standard OSAL API.

Perhaps I should make those VTs a GPL library and make those available even without the OS, it is an useful and well tested mechanism.

Giovanni

Re: AVR os-less OSAL

Posted: Wed Nov 30, 2016 5:20 pm
by Marco
Yes that would be a good solution i think. On the other hand, i guess that means the user needs it's own timer implementation if he doesn't want GPL?

Marco

Re: AVR os-less OSAL

Posted: Wed Nov 30, 2016 5:29 pm
by Giovanni
It could be Apache 2.0, no problems, but in that case I couldn't add a "tickless" mode like in RT. Note that the timers in OSAL are a stripped down version of those in RT.

Giovanni

Re: AVR os-less OSAL

Posted: Thu Dec 01, 2016 12:24 pm
by Marco
I'm not sure if the following makes sense, but how about having two different implementations? A ticked version as Apache 2.0 and a tickless version as GPL? You can always use the ticked version but if you need a better (lower power) version then you need the tickless one.

Marco