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 just *had* to do some testing at 2am before bed ;-)

The five types do what they should exactly :-) However if you send a dodgy packet through it refuses to receive good ones afterwards so I've broken something there. Not sure what exactly, but shouldn't be hard to find :-)

2:30 and I'm off to bed!

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 »

Some bastard daylight saved me and I was testing at close to 4am, not close to 3am... jesus, that's just too late unless there was a lot of alcohol involved which there wasn't.

Actually, the other way round... the PC updated itself but I was still living the old style. The clocks elsewhere were showing close to 4 and that's how I felt but the computer told me close to 3...
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 have the bug fixed and now it doesn't stop receiving as far as I can tell.

I also have the error packets working and have put them in various places so I can tell what the hell is going on :-)

Next up is debug packets and then I'm going to clean it up and move onto something else like tax/docs/pins/lounge/shopping/dishes/life/etc

Exciting times :-)

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've been having a hell of a time trying to get strcpy to work today. In the end I gave up and wrote my own simple version in utils.c. It works fine and is tiny...

I have a little bug again, this time a start byte is missing from each debug packet sent out but only when it follows another debug. If it follows an error or something else it is present.

I'm not very happy with how the code is right now. It's big and a bit spaghetti esque in places. I need to distill it down a bit and define some clear rules and/or a flow diagram for it.

I've cleaned some of the lounge and found one tax form but there is more to do yet.

Oh, and the flash space has run out :-/ Why I'm not sure. I get the same bss/vector overlap error I got once before, but it shouldn't be that close yet. There may be something wrong with the linker script or similar I guess.

Today could have been better...

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've fixed the reset functionality, now it hard resets and goes into serial monitor if the switch is flicked. This is pretty cool really, no more cycling the key for us! ;-)

I can't wait till it works and I can do a list of reasons to use FreeEMS instead of MS. It should have some fairly good points on it even if the list of reasons to not use it is longer are first (stuff like doesn't support xyz trigger and abc feature yet).

I'm not happy enough with it to release yet though unfortunately, but I should be able to clean it up pretty soon. I'll probably send aaron and sean another copy each of ugly prelim stuff regardless.

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 tried the flash code and erased a block of data via the serial system. It didn't write the data back down though, and it erased the wrong block, but it should be a LOT easier to work on now with two way comms.

I've raised a bug report on it and I'll send Sean the code with the functionality to call the write routine and a packet to send to cause that.

Tax time, can't spend any more time on FreeEMS tonight :-(

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 »

This morning I went through all the serial code and found around 17 things wrong with it. I figured the best way to improve it coherently was to have a game plan. So now I do. I found some subtle things that I hadn't realised before and also all the things that I already knew smelled bad. I'll probably do some work on that and/or the docs on the way home this evening.

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've started looking into the pin out stuff. It's actually fairly well documented with respect how it comes out of reset, but I didn't see anything talking about DURING reset yet, and I need to look at what the states really are during bootload too.

But the main thing... I've started on that.

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 went through the rest of my serial stuff tonight on the way home and found a few more issues and thought about ways to solve the trickier parts. I have a game plan, but it will take me a full day to do all that work, maybe more. Looks like 0.0.17 won't be out till next weekend at this rate. I *may* get it out sooner, but no promises. I've been reading up on the pins and ports and stuff and thinking about the pin out doc.

I've also started a "FreeEMS Hardware Standards" document to aid the systems all staying fairly compatible. I'll put some work into that along side the pin out doc and we can all discuss it in detail when I release it. I'm sure there will be some things you disagree with, but we need a good stardard to keep the project on track, and I only want to nail down the core stuff, not the accessory stuff.

Right, TAX!

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 »

Tonight I was trying to hunt down the bss/vector issue and found a few things to play with and fix/improve. There are more details in the bug report, but just realised its not r/o readable by the public yet. Aaron is working on that now.

I need to get to sleep

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