Dedicated follower of fashion

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

Dedicated follower of fashion

Post by Fred »

For those that don't know, that is a song by a great 60's band called The Kinks :

www.youtube.com/details?v=xXpkt6revK0 (haven't checked the vid for quality)

Clearly I'm NOT a dedicated follower of fashion. It seems fairly fashionable to spend your time on the train into London tapping away at your keyboard looking important etc. I did this for 3 days, but then the disk failed... I spent one train trip doing SFA, however that was painful for a compulsive thinker such as myself.

So, instead of writing FreeEMS C code on the laptop, I've started developing code on paper. Editing is more of a challenge, but if you think about it enough and do some preliminary sketches you can pretty much get it rightish first time.

Thus, I have a PLAN!!

I've written the send and receive code for the escape system and packet storage etc. I've devised a method of testing it and just need to key it all in and compile :-)

Of course, I need a functional system to do this with so there won't be a release for a little while because of that.

The next release should have packetised data with start stop and escape chars functioning. It may even have headers and checksums etc. It's time to up the anti on the serial stuff because we need it functioning well very soon for flash burning and table tuning etc :-)

More news as it comes to hand, back to work...

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
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Dedicated follower of fashion

Post by jharvey »

Might not hurt to release early and often. If you have a copy on SF wouldn't that mean you are less susceptible to lightning strikes? I'm assuming the SF copy isn't at your local residence right.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Dedicated follower of fashion

Post by Fred »

I have been doing exactly that. Releasing each block of completed work as I completed it. I just haven't completed much for this round and was expecting someone else would have something ready to release in the mean time. I'll get a new one out ASAP for sure though, I promise.

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: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Dedicated follower of fashion

Post by Fred »

I was just looking through the SPI and CAN docs and have made some observations :

SPI > CAN > SCI for speed
CAN > SPI/SCI for usability/features
SPI/SCI > CAN for simplicity

What I have planned for comms is a one type of message that can be sent over whatever comms style.

I intend the interface to these styles to be through a block of memory holding the packet ready to send. The packet in memory will be unescaped such that if a format doesn't have protection etc then it will not have the overhead of the escapes. This is the only practical way for sending anyway as it would majorly complicate things to try to pre escape stuff in memory.

On receive the serial style will get the start byte, flag an incoming stream and store data after unescaping it until the stop byte comes through. This means the check sum will end up in memory ready to be checked against with the value calculated during receive. For sending out data it makes sense to do the checksum on the fly too.

After considering it I think we should always checksum all packets. This keeps the software complexity down and doesn't actually affect the speed/load at all while guaranteeing data fidelity. It is now apparent to me that Stu was 100% right when he said "checksum on unescaped data" and "length of unescaped payload" - after doing some implementation design it is now obvious why. Finally, I think we should have a single checksum for the whole packet header included. This gives us less complexity than 2 checksums, and good certainty that the data and header are in good shape without any extra speed cost over only doing the payload.

If I had my data and pc setup I'd have written it by now, but alas I don't so it's time to start building a new linux setup for myself now. Can't say I'm looking forward to it much, but you've gotta do what you've gotta do.

At least it'll be all virgin this time. The last one had 2 years of me fiddling with it :-)

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!
shameem
LQFP112 - Up with the play
Posts: 135
Joined: Thu May 01, 2008 6:30 pm
Location: Ann Arbor, MI
Contact:

Re: Dedicated follower of fashion

Post by shameem »

Fred wrote:At least it'll be all virgin this time. The last one had 2 years of me fiddling with it :-)
LOL :lol2: I must say i never heard about losing virginity by "fiddling".... :P
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Dedicated follower of fashion

Post by Fred »

This post from Ubuntu...

Looks like it's gunna need significant fiddling before I'm happy with it. Too much like M$ for my liking :-(

STILL has an "old" kernel too. 2.6.24 is good enough for me, but I'd prefer the latest.

It does weird shit with init and fstab though (to make everything automatic, FUCK automatic). Plus I have to get rid of the display manager and switch it into xubuntu by ditching gnome and putting in xfce4 etc etc etc etc

One of the first packages I put in was the hc12 compiler :-) Priorities...

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
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Dedicated follower of fashion

Post by jharvey »

Hmmm, any chance you can setup a live CD of your install so that others can duplicate your setup? If there is any question about what version of GCC ect you have, it could be ironed out with a live CD.

Just a thought, not sure how hard the live CD thing is.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Dedicated follower of fashion

Post by Fred »

I'm not sure that there is any point.

Code: Select all

fred@rwdlsd:~$ apt-cache show gcc-m68hc1x 
Package: gcc-m68hc1x
Priority: extra
Section: universe/devel
Installed-Size: 20112
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
Original-Maintainer: Aurelien Jarno <aurel32@debian.org>
Architecture: i386
Version: 1:3.3.6+3.1+dfsg-1
Provides: c-compiler-m68hc11, c-compiler-m68hc12
Depends: libc6 (>= 2.5-0ubuntu1), binutils-m68hc1x (>= 1:2.15+2.92-1)
Suggests: task-c-devel, newlib-m68hc1x
Filename: pool/universe/g/gcc-m68hc1x/gcc-m68hc1x_3.3.6+3.1+dfsg-1_i386.deb
Size: 4382780
MD5sum: df1e61d3b43adac2abf62219db637514
SHA1: 1c6b8cbe3a39f2c086499663a26bfbd71d705eea
SHA256: 7fcc74070a70a45e67afcd6a659df8bad661023fb789927b89e6128423f29d3c
Description: GNU C compiler for the Motorola 68HC11/12 processors
 This is the GNU C compiler, a fairly portable optimizing compiler which
 supports multiple languages. This package includes support for C for
 cross-compiling to a Motorola 68HC11/12 microcontroller-based target.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
I think it is a stand alone GCC as my main one is 4.2 or so, and only about 3 of the platforms GCC supports aren't included with the main GCC releases.

Code: Select all

fred@rwdlsd:~$ gcc --version
gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
The newest version is quite old now, as in a year or so, so you can't really get the wrong one without trying hard ;-)

Code: Select all

fred@rwdlsd:~/freeems.backup/src$ m68hc11-gcc --version
m68hc11-gcc (GCC) 3.3.6-m68hc1x-20060122
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Other than that you need make, rm, cp, zip and hcs12mem and one file for hcs12mem which is included with each release so far.

No stress :-)

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!
WTDeuce
QFP80 - Contributor
Posts: 40
Joined: Thu Sep 04, 2008 1:54 pm

Re: Dedicated follower of fashion

Post by WTDeuce »

LiveCDs suck :p

http://www.windley.com/archives/2007/08 ... hine.shtml

PS ive never had to do a physical to virtual, as I just create each VM from scratch.... But that looks like it should work.
User avatar
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: Dedicated follower of fashion

Post by sry_not4sale »

Fred wrote:I have been doing exactly that. Releasing each block of completed work as I completed it. I just haven't completed much for this round and was expecting someone else would have something ready to release in the mean time. I'll get a new one out ASAP for sure though, I promise.

Fred.
why not set up a public source code repository (like on github), and have a tested(release) branch, and a development branch that impatient people can have a look at.

Like jharvey said, opensource is all about releasing early and often - plus I am sure it would help with project interest immensly. It doesn't matter if the commits are pretty, they can be cleaned up before being merged/cherrypicked into the release branch.

My 2c. I would gladly help maintain a code repository if you wanted - its about all I have time for at the moment.
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
Post Reply