RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Sat Feb 21, 2026 5:16 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Ecu flashing kernel info wanted
PostPosted: Thu Jul 16, 2009 7:29 pm 
Offline
RomRaider Developer

Joined: Wed Jul 12, 2006 1:25 am
Posts: 1025
So I've been on a quest to learn that is learnable since joining this forum. One thing I can't get a firm grasp on are the kernels developed to make the various automotive ecus responsive to flashing. I'm ignorant and don't know what I don't know!

- where do I get the needed knowledge to write my own? I've spent plenty of time on the renesas website reading all sorts of documents none of which delve much into the kernel arts. (kernel knowledge lol)

- I've tried following the oldest threads on the openecu forums to no avail. Colby obviously came into this Suby world with plenty of experience and thus jumps to conclusions and solutions that baffle me!

- Hell I'm not even sure what protocal he's using in conjunction with the odb2 port when flashing our ecus (jsr235 or something like this name)?

Can anyone give me a timeline of events and correspondig resources highlighting how Colby went from the first community openecu call for help to writing his first kernel and flashing a rom? Much appreciated as this has been on my mind for some time ;)

_________________
AIM: TguiWRX


Top
 Profile  
 
 Post subject: Re: Ecu flashing kernel info wanted
PostPosted: Thu Jul 16, 2009 7:40 pm 
Offline
RomRaider Donator
User avatar

Joined: Thu Mar 30, 2006 2:38 am
Posts: 5336
It would be interesting to see what you can find out. Colby outlines the steps he went through here, although not in any detail:
http://forums.nasioc.com/forums/showpos ... stcount=73


Top
 Profile  
 
 Post subject: Re: Ecu flashing kernel info wanted
PostPosted: Thu Jul 16, 2009 8:44 pm 
Offline
RomRaider Developer

Joined: Wed Jul 12, 2006 1:25 am
Posts: 1025
^^ Thanks for the link. You're right, it is lacking depth.

I really wish I could get Colbys ear on this. I'm MUCH MUCH more interested in the journey rather than writing yet another Subaru tuning program.

From merchgods link:
Quote:
a) 2001-2005 WRX - 68HC916Y5 based
* get the chip docs!
* get a BDM from P&E Microsystems
* solder a BDM header the ECU using the handy solder pads Denso left for this purpose
* read out the rom (including the TPU area) with a couple clicks of the BDM software
* get IDA Pro
* write your own HC16 module for IDA Pro because you don't want to spend the money to buy IDA Pro advanced
* publish the source of your HC16 module for free for others to use
* start disassembling - find all the references to code that accesses the serial port
* notice that there is TPU code that uses the serial port ???
* figure out that the TPU area is a bootloader!
* learn what the bootloader wants, including checksums, etc.
* learn how the bootloader keeps the WDT happy
* get a HC16 assembler (COSMIC)
* write a simple kernel program to read out the CPU
* write a better kernel program to reflash the CPU
* discover that your 02 WRX works, but your 04 WRX won't enter the bootloader
* read out 04 WRX with BDM and go through the serial code
* find seed/key algorithm before jumping to bootloader!
* add see/key to PC reflash program

b) 2004+ Subaru DBW - SH7055 and SH7058 based
* get the chip docs!
* try using the same initialization sequence as the WRX
* it works!!!
* build SH cross-compiler
* start writing test kernels - some trial and error here
* the ECU is being reset by a watchdog!
* start tracing pins on the board with a scope - PB15 is twiddling!
* add WDT code to kernel - it works!
* write flashing code - test - test - test
* reprogram using boot mode (solder into ECU) when you screw up
* write another kernel for SH7058 that uses built in reflash functions

c) EVO 7/8 - SH7052 based
* get the chip docs!
* borrow a MUTIII - very handy
* snoop a TSB reflash using the MUTIII (only get one chance!)
* identify init sequence and kernel upload - no seed/key - this is easy!
* Mitsubishi uses boot mode for bootloader, which makes development and flash failures easily recoverable...
* write a simple kernel to dump all of ram so I can see what the Mitsubishi bootloader looks like
* buy IDA Pro Advanced - don't want to write any more modules!
* disassemble bootloader completely to understand how it all works, including initialization codes
* modify Subaru SH7055 kernel to work with SH7052 - easy!
* done!

d) EVO 9 - SH7055 derivative
* get the chip docs!
* borrow a MUTIII
* snoop a reflash using the MUTIII
* same init sequence!
* try loading my SH7055 kernel, and the ECU takes it, but doesn't seem to run the code
* I am stuck in the bootloader for some reason!
* from the snooping, I can see how to read / erase / write with the bootloader, but I want to use my own kernel - but how - I need to be able to read out the bootloader to find out how to load a kernel...
* create a EVO 9 ROM with a trojan kernel in it.
* flash this into the ECU, but is doesn't respond
* start tracing board and discover that there is a WDT that needs to run off of PD8 - but only when not in the init mode
* add WDT code to trojan kernel
* flash it and it runs!
* read out EVO 9 bootloader still left in RAM
* see command to load a kernel!
* see that bootloader uses built in flashing function like SH7058
* make new SH7055 kernel to support new flashing method like SH7058
* it works!

Colby

_________________
AIM: TguiWRX


Last edited by Tgui on Thu Jul 16, 2009 8:51 pm, edited 4 times in total.

Top
 Profile  
 
 Post subject: Re: Ecu flashing kernel info wanted
PostPosted: Thu Jul 16, 2009 8:46 pm 
Offline
RomRaider Developer

Joined: Wed Jul 12, 2006 1:25 am
Posts: 1025
Saved for future info. Sigh.. stupid browser.

_________________
AIM: TguiWRX


Last edited by Tgui on Thu Jul 16, 2009 8:48 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Ecu flashing kernel info wanted
PostPosted: Thu Jul 16, 2009 8:47 pm 
Offline
RomRaider Developer

Joined: Wed Jul 12, 2006 1:25 am
Posts: 1025
Saved for future info.


Top
 Profile  
 
 Post subject: Re: Ecu flashing kernel info wanted
PostPosted: Fri May 07, 2010 5:18 pm 
Offline
Newbie

Joined: Fri May 07, 2010 3:47 pm
Posts: 1
Hi
I'm looking to use ECUFLASH/Romraider to tune Suzukis and Mazdas, can anyone confirm that ECUFLASH uses the Denso protocol published here (bottom of page):

http://translate.google.com/translate?h ... %26hl%3Den

If that is the case then I should be able to use the OpenECU kernel if I modify the ECU ID number in bytes 2 and 3.

Thanks
James


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl