Fred's firmware development diary

Official FreeEMS vanilla firmware development, the heart and soul of the system!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

I seriously don't know how you Gentoo guys put up with the compilations. I'm building binutils, gcc and newlib from source right now and it takes ages. The older etch version didn't have an option that I wanted to use on the linker. The deb unstable version did have it. So I'm building the deb unstable version on the older eee etch based xandros. It's even working despite a slight hack to the source metadata. The hack is to change the required version of debhelper from 6 to 5 in two places. It's working just fine and that is only required for the gcc part of the build anyway. Newlib actually uses the gcc cross compiler to build, so I know it's working just fine now which is good. Time to put the make file back how it was again.

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!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

The new packages are working just fine :-)

Just a note to anyone trying to build the next release (Sean only?) :

You will either need a version of the linker that accepts --print-gc-sections or you will need to remove three options from the following two lines : 96 102

The options are -ffunction-sections --gc-sections --print-gc-sections

You could also leave the first two in and just remove the third, but it could be messing with your code without telling you if you do that.

This is just another semi automated check on the code base to ensure it is reasonably solid.

If your version doesn't have that ability, and you want it available to you, please get the diff file from debian lenny or sid/unstable and apply it to the sources before building your own.

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!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

Well, I finally got around to loading the code and trying it and there is an issue.

I've nailed it down to the serial ISR running constantly, so I'll have to debug that and make it clear the flags that it isn't or something. The nice part is that the input ISRs work sweet the entire time. The fuel ones would, but the main loop literally never runs to give it a pulse width to use so there is nothing to do :-)

I could still have 0.0.17 out tonight, but I'm not sure just yet.

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!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

I just sent it a real packet with start, header, checksum, stop and it received it and disabled the interrupt. It didn't send it back to me for some reason, but I'll work that out soon enough :-)

FreeEMS is now receiving data too!

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!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

I believe the checksum is somehow going wrong. Perhaps my test packet is wrong itself. I'll have to check that out tomorrow or the next day as I have some more important business to attend to tonight.

That goes for the pinouts that I promised. I hate breaking a promise, but it has to be done in this instance. I need to fill out three IRD forms two of which are tax returns. I also have a stack of other things to do and I can't pull an uber late night tonight because I need to be able to think tomorrow at work.

The serial progress is really positive though, soon enough it will be a tunable system and one of you budding programmers will have written a nice gui for it :-)

Good night, over and out.

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!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

I couldn't help myself and decided to bypass the checksum test... which indeed caused the data to come back to the PC. The only trouble was, it caused a LOT more data to come back, IE, it continuously sent data back to the PC. I fired up the jimstim while it was doing that and although my PC was humming away trying to keep up, the fueling, ignition, and engine position ISRs all ran just fine with constant serial transmission. This is very good as it means we can genuinely max out the comms for datalogging without causing issues for the rest of the code. And all without Xgate ;-)

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!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

I couldn't help myself slightly more. It now echoes well formed packets back to the PC repeatedly, and Sean has a copy to help him out with testing flash stuff etc.

It's not release spec yet, but it will be very soon. Maybe tomorrow night? We'll see. I did promise regular releases, so I'd better try to stick to it.

btw, if you are extra keen and want dev snapshots, just ask and I'll deliver.

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!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

Worked on the serial stuff more today on the train, docs and code. I'll probably have a fiddle with it tonight and try to solve a few mysteries that I didn't have time to figure out last night. Sean tried it and seemed pleased :-)

I'll post some more about that in the other thread now.

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!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

Checksumming now works :-) It rejects bad packets and accepts good ones.

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!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's firmware development diary

Post by Fred »

I was fighting with some code last night and only got 2 hours sleep, but on the train this morning I came up with a solution. It was a strange problem, GCC was optimising my code out and when I checked, there was no assembly present to do what I needed. I've refactored the part in question and it is now better than it was anyway. I'll give it a while this evening, and if it works well, probably have a tidy up and move onto other things... such as pins :-)

This Friday and Saturday night I am going out to dinner and won't get a lot done. However over the weekend I hope to make good progress on a few things with Sean's help. With a bit of luck we should be able to have some basic tuning functions in place and working like a charm pretty soon.

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!
Locked