Page 1 of 1

How not to design an ECU

Posted: Wed Oct 30, 2013 5:41 am
by thebigmacd
https://www.dropbox.com/s/wnzqidngrtj8y ... DACTED.pdf

The Bookout vs Toyota unintended acceleration case, transcript of testimony from Michael Barr. This is a very important read in my opinion. It shows how inept even a company like Toyota is at producing quality firmware for an ECU.

If the link goes down I have a copy of the PDF.

He found:
Spaghetti code
4000+ C files
11,000+ global variables
No mirroring of critical variables
No EEC ram even though they claimed to have it
No error detection whatsoever in operating system
Cruise control, brake override, and DTC diagnostics in same task
Buffer Overflows
Stack overflows
Invalid pointer dereferencing
Nested schedule unlocking
Unsafe Casting
Race conditions

And more...

"And they're all linked together with these global variables. Some of which are 25, 30 characters long and some don't have vowels and some -- two of them are identical, except one has a P and one has a D, or a P and 2 a B."

Re: How not to design an ECU

Posted: Wed Oct 30, 2013 10:21 am
by Fred
Oh man! I thought this thread was going to be much shorter! Something like "Don't do what FreeEMS has done!" ;-)

Just finished page 36, no meat yet. Saved the file and will read it on the weekend when I know I will have a lot of time and little else to do but read.

Thanks for this. I'll comment on the specifics later, but I'm sure I've violated quite a few items from your list so far. It's more that I've not unviolated them yet in other cases :-)

Fred.

Re: How not to design an ECU

Posted: Wed Oct 30, 2013 12:07 pm
by thebigmacd
Fred wrote:Thanks for this. I'll comment on the specifics later, but I'm sure I've violated quite a few items from your list so far. It's more that I've not unviolated them yet in other cases :-)
It can be be forgiven, since you aren't claiming to meet any standards but your own. :P Toyota, on the other hand...

Re: How not to design an ECU

Posted: Wed Oct 30, 2013 12:39 pm
by Fred
That's untrue. I don't claim to meet my own standards! :-p

Re: How not to design an ECU

Posted: Thu Oct 31, 2013 10:24 pm
by sim
Link is down already, that was fast.

I'm guessing this was a leaked document?

Re: How not to design an ECU

Posted: Thu Oct 31, 2013 11:32 pm
by Dan
yep, link is broken.

can we get this rehosted/relinked please?

Re: How not to design an ECU

Posted: Fri Nov 01, 2013 9:49 am
by ivan141
Google the document name, I found it mirrored somewhere yesterday.
If all else fails, I have a copy on my hard drive.

Re: How not to design an ECU

Posted: Fri Nov 01, 2013 11:47 am
by thebigmacd
Nope, not a leaked document, it's public record. Although I'd like to see a non-redacted version :)
Bookout_v_Toyota_Barr_REDACTED.pdf
(834.06 KiB) Downloaded 1815 times