Page 1 of 2

ECUFlash Kernel

PostPosted: Sun May 14, 2006 8:19 am
by Helen
I'm sure that this is explained somehwere on here, but I can't find it !.....

How does the Kernel that ECUFlash sends to the ECU operate ?

a) Where does it reside in the ECU ? (RAM / FLASH etc)

b) If it's in FLASH, does it stay in there ? Or does whatever was there before get put back ?

I'm just trying to get my head around it all. I can't yet see what we need the Kernel for - although I'm sure we need it for something, otherwise what's the point in it !

Thanks

H.

PostPosted: Sun May 14, 2006 10:08 am
by JRSCCivic98
Kernel gets uploaded to RAM, Kernel then gets instructions from ecuFlash program to start reading the FLASH ROM and dump it's data to the program which saves it to a file.

PostPosted: Sun May 14, 2006 11:31 am
by Helen
If the Kernel gets loaded to RAM, then how does it get called ? Unless the code in the standard ECU calls it, what executes it ?

PostPosted: Sun May 14, 2006 7:44 pm
by JRSCCivic98
^^^^
JRSCCivic98 wrote:Kernel gets uploaded to RAM, Kernel then gets instructions from ecuFlash program to start reading the FLASH ROM and dump it's data to the program which saves it to a file.


The Kernel gets loaded into RAM by ecuFlash program first then the rest happens. This is my understanding anyway...

PostPosted: Sun May 14, 2006 9:07 pm
by cboles
Depending on the ECU there is a bootloader in the main flash area or a special protected area which loads the kernel into RAM and executes it.

In the 2001-2005 Subaru WRX, the bootloader is located in a small flash block which is reserved for an inactive Timing Processing Unit (TPU).

In the Subaru DBW cars, the bootloader is just part of the main code area in flash.

In Mitsubishi cars, the bootloader is in a special flash area and is copied into RAM via a hardware mode setting, and then executed.

Does that help?

PostPosted: Sun May 14, 2006 11:37 pm
by Helen
Thanks Colby - I think I'm getting the idea of it now...

So.... (if we talk about the 2001-2005 WRX ECU as an example)

The TPU isn't being used as a TPU - instead it holds the Bootloader, which Denso put there.

This Bootloader allows us to 'Upload' some code which the Bootloader stores in an area of RAM (anyone know where ?).

We then send a message to the Bootloader to execute our uploaded code, which it does.

Have I got this correct so far ?

If I have, then a few more questions.

1) If we're not 'Flashing' anything, why do we need to make the connection which provides Vpp to the ECU ?

2) What procedure tells the ECU to run the Bootloader instead of the Main Code ?

3) If I understand all this correctly, once you power the ECU down - all trace of the Kernel is gone, and the ECU is just as it was before ?

Thanks everyone.

H.

PostPosted: Wed May 17, 2006 12:29 pm
by Helen
Any chance someone could either confirm my last comment above, or put me straight if i'm wrong plese ?

I don't want to go messing until i have how it works straight in my head !

Thanks

H.

PostPosted: Wed May 17, 2006 2:57 pm
by cdvma
I will take a crack at this.

Helen wrote:1) If we're not 'Flashing' anything, why do we need to make the connection which provides Vpp to the ECU ?

2) What procedure tells the ECU to run the Bootloader instead of the Main Code ?

3) If I understand all this correctly, once you power the ECU down - all trace of the Kernel is gone, and the ECU is just as it was before ?

Thanks everyone.

H.


1) You are flashing data into ROM. The tables for fueling, ect.
2) The bootloader will run automatically. When processors start up they automatically start executing code at a predetermined location (reset vector). Imagine the bootloader as your desktop PC's BIOS. It starts everything up then passes control to the main program. The main program is also stored in a known location.
3) If the kernel is loaded into RAM and executed from there, since it is volatile memory it will dissapear when power is removed.

PostPosted: Thu May 18, 2006 9:49 am
by ev8siv3
Is the TPU modifiable to execute other code during a flash or during boot? How do I dump the TPU in the latest version of ECU Flash? I'd like to do some comparisons.

Should I just query the TPU range in ecuexplorer?

PostPosted: Thu May 18, 2006 10:09 am
by Helen
cdvma wrote:I will take a crack at this.

Helen wrote:1) If we're not 'Flashing' anything, why do we need to make the connection which provides Vpp to the ECU ?

2) What procedure tells the ECU to run the Bootloader instead of the Main Code ?

3) If I understand all this correctly, once you power the ECU down - all trace of the Kernel is gone, and the ECU is just as it was before ?

Thanks everyone.

H.


1) You are flashing data into ROM. The tables for fueling, ect.
2) The bootloader will run automatically. When processors start up they automatically start executing code at a predetermined location (reset vector). Imagine the bootloader as your desktop PC's BIOS. It starts everything up then passes control to the main program. The main program is also stored in a known location.
3) If the kernel is loaded into RAM and executed from there, since it is volatile memory it will dissapear when power is removed.


Thanks cdvma - but I think you misunderstood what I was asking...

1) I'm not yet 'flashing' i'm just downloading the ROM image from the ECU

2) What I meant was - What causes the Kernel to be executed by the Bootloader, is the Bootloader not going to just start the original ECU software ? And how do give the ECU the kernel in the first place. Do we just send 'Write to Memory' commands i.e. 0xB0 ?

3) I just wanted that confirming - thanks

H.

PostPosted: Fri May 19, 2006 5:26 am
by Synx
Another follow-on question as well. If we put the kernel in RAM is it really gone on powerdown. As the rest of the RAM will retain power to not lose learned trims, correct? Ie. will the kernel remain until full ECU reset (BAT power removal)?

PostPosted: Tue May 23, 2006 9:30 am
by Helen
Can anyone answer these remaining questions ?

PostPosted: Tue May 23, 2006 1:03 pm
by dexmix
Helen wrote:Can anyone answer these remaining questions ?


you can load your kernal to ram, and do a soft reset to execute your code. I've used this method for quick testing of interrupt vectors for an hc11.

the soft reset this leaves the kernal in ram, while indicating to the ECU to start executing your reset code.

i believe the vector table is loaded from ROM, into ram. you write your kernal to ram, set the reset vector to point to your kernal, than do a soft reset. But as soon as you do a hard reset, the vector table is reloaded from rom. At least this is how most development boards work. I'm new to car ECUs.

PostPosted: Tue May 23, 2006 6:11 pm
by JRSCCivic98
Helen wrote:Can anyone answer these remaining questions ?


^^^ Under Cover Agent for EcuTek... :P

PostPosted: Wed May 24, 2006 1:19 am
by Helen
JRSCCivic98 wrote:
Helen wrote:Can anyone answer these remaining questions ?


^^^ Under Cover Agent for EcuTek... :P


If I am, then I wish they'd hurry up and pay me !