Ok, attached are two patches. One for the nop insructions in osal.h and the other one for hal_serial_lld.c.
Marco
AVR os-less OSAL Topic is solved
Re: AVR os-less OSAL
- Attachments
-
- osal.h.patch.zip
- Add nop after sei
- (362 Bytes) Downloaded 229 times
-
- hal_serial_lld.c.patch.zip
- Improvements in hal_serial_lld.c
- (588 Bytes) Downloaded 236 times
-
- Posts: 359
- Joined: Sat Jan 07, 2012 6:22 pm
- Location: Brazil
- Has thanked: 1 time
- Been thanked: 20 times
- Contact:
Re: AVR os-less OSAL
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?
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?
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: AVR os-less OSAL
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
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
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
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
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: AVR os-less OSAL
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
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
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: AVR os-less OSAL
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
Giovanni
Re: AVR os-less OSAL
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
Marco
Who is online
Users browsing this forum: No registered users and 32 guests