Fred's firmware development diary comments thread
- sry_not4sale
- LQFP144 - On Top Of The Game
- Posts: 568
- Joined: Mon Mar 31, 2008 12:47 am
- Location: New Zealand, land of the long white burnout
- Contact:
Re: Fred's firmware development diary comments thread
Any chance of getting another "state of the onion" announcement Fred?
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
165hp @ 6psi standard - fastest production car in japan Oct 82
Re: Fred's firmware development diary comments thread
"Development continues under current fief."sry_not4sale wrote:Any chance of getting another "state of the onion" announcement Fred?
Re: Fred's firmware development diary comments thread
Yeah, it's overdue, along with diyefi.org site update, documentation updates, and various other things. I'm planning to write up the USA trip story at some point very soon (hoping that donations will feed me a little longer) and with that, I'll go and hammer all the forums that I'm a member of with updates, including that state of the onion thread.sry_not4sale wrote:Any chance of getting another "state of the onion" announcement Fred?
JHarvey, work is continuing almost every day, it's just not necessarily obvious. SeanK has been doing heaps of compiler dev work, and I've been chatting to him regularly about that, and supporting him with changes on my side where required. Plus other little bits of work.
Marcos, I'd roll with them with less hesitation if they were free of the _t. We'll see, I'll have a think about it and make a decision some time. In the mean time, as noted, search and replace will solve this issue very quickly if ever required anyway.
Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Re: Fred's firmware development diary comments thread
more of my 2c:
the _t is there to avoid collision since they usually reside in a .h. The .h is only file scope, but usually gets inserted across many translation units .. thus they end up more 'global' than intended most of the time.
From some real code:
you're more likely to get a collision from
than:
It's highly likely that someone is going to name one of their vars 'timer' and then they waste 3 days tracking down why their stuff breaks. Like I said before, it's usually the new guy that gets bit by this, so I do it for him . Whatever you decide, staying consistent throughout the codebase is more important than haggling over type names.
In case you haven't noticed (I think you already have), typedef's don't get you any real static safety:
You could probably figure out what can happen there. Someone goes off and calls it w/the args reversed. The compiler would never detect it, and your code would actually appear to work correctly (in this simplified example). But, to be pedantic, it is being called incorrectly.
Instead, I lean on typedefs for abstracting out an interface most of the time. Which is why the various int[xx]_t's serve as a nice platform independent abstraction for me even if I never have the goal of platform independence. Its pure habit at this point based on previous headaches.
As you already know, if someone codes to the interface you can always change the implementation in the future with minimal fuss.
the _t is there to avoid collision since they usually reside in a .h. The .h is only file scope, but usually gets inserted across many translation units .. thus they end up more 'global' than intended most of the time.
From some real code:
you're more likely to get a collision from
Code: Select all
typedef unsigned long timer;
Code: Select all
typedef unsigned long timer_t;
In case you haven't noticed (I think you already have), typedef's don't get you any real static safety:
Code: Select all
timer_t
timerAddTo( timer_t t,
unsigned long val )
{
return t + val;
}
Instead, I lean on typedefs for abstracting out an interface most of the time. Which is why the various int[xx]_t's serve as a nice platform independent abstraction for me even if I never have the goal of platform independence. Its pure habit at this point based on previous headaches.
As you already know, if someone codes to the interface you can always change the implementation in the future with minimal fuss.
Re: Fred's firmware development diary comments thread
Sure, but the chances of someone naming their variable uint8 are slim to none, and slim just copped one from some n*****s 45! :-)
Thanks for the static type checking lesson, though. Good to know.
Thanks for the static type checking lesson, though. Good to know.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
- sry_not4sale
- LQFP144 - On Top Of The Game
- Posts: 568
- Joined: Mon Mar 31, 2008 12:47 am
- Location: New Zealand, land of the long white burnout
- Contact:
Re: Fred's firmware development diary comments thread
Excuse the ignorance, but what difference does XGATE make to the release?I just built FreeEMS with XGATE code in it! I estimate that we will have an XGATE release inside the next month. That would be cool All credit to SeanK who has been working his arse off on this. See the Advanced section for more detail. Good work young padawan.
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
165hp @ 6psi standard - fastest production car in japan Oct 82
Re: Fred's firmware development diary comments thread
It's a milestone, that's all. And, I found out after I posted, that I was lying anyway. It was linked with the XGATE tools, but didn't include the xgate code. I should have RTFM (Sean's email) more thoroughly... I'll try to make sure that happens today, though. I' love to see that LED flashing by XGATE power. XGATE will be key to doing as much as we have dreamed of, well.
Fred.
Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
- sry_not4sale
- LQFP144 - On Top Of The Game
- Posts: 568
- Joined: Mon Mar 31, 2008 12:47 am
- Location: New Zealand, land of the long white burnout
- Contact:
Re: Fred's firmware development diary comments thread
This whiny bitch likes to stay informed!!! (thanks for the public update)
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
165hp @ 6psi standard - fastest production car in japan Oct 82
Re: Fred's firmware development diary comments thread
Seriously, I try to put everything vaguely important up, but you seem to want to know if I've sneezed on the board ;-) I'll try to keep enough stuff happening to justify posting and keep you happy ;-)
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
- sry_not4sale
- LQFP144 - On Top Of The Game
- Posts: 568
- Joined: Mon Mar 31, 2008 12:47 am
- Location: New Zealand, land of the long white burnout
- Contact:
Re: Fred's firmware development diary comments thread
Even if you don't get much done, I think it's good for the community to see some sort of movement - even if it's "read some docs"Fred wrote:Seriously, I try to put everything vaguely important up, but you seem to want to know if I've sneezed on the board I'll try to keep enough stuff happening to justify posting and keep you happy
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
165hp @ 6psi standard - fastest production car in japan Oct 82