pgmfi.org

Hacking up Honda's ECU
It is currently Sat Jan 16, 2021 2:40 pm

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: ECU Serial Debugger
PostPosted: Sat Jan 02, 2021 11:47 am 
Offline

Joined: Sun Aug 30, 2020 9:18 am
Posts: 1
Has anyone ever tried to make a serial debugger for an OBD1 Ecu? Something that can "step" through the code and dump/trace registers? I've got an idea for one but lack the programming skills to implement it. The program would work as follows.

Emulate an ECU break point by making a CAL to an Serial dump/endless loop routine.
--------------------------------------------------------------------------------
-The loop routine would start by sending the contents of ACC and all registers via serial
-The routine would then use a CAL to endlessly loop while servicing the WDT so it doesn't cause an INT

Meanwhile
-------------
We've replaced the serial interrupt code routine with code that will:
-Interrupt the loop and change the RT address of the endless loop to an address after the loop call to break the cycle.
-Change the Return address of the CAL that started our serial dumper/loop routine.,to the address of the CAL to our routine.

Meanwhile on PC
---------------------
-Log all the registers and data that were sent
-Remove our original CAL to the serial Dumper/Loop routine and restore the original code in this spot (Using ostrich or similar emulator)
-Send via serial the address in the main code that we would like to return to
-If we're stepping through the code, we would move our Dumper/Loop CAL to the next command address (Using ostrich or similar emulator)

If this were automated, we would ultimately end up with a trace file of all the registers and the associated commands. It seems like it would speed up analyzing of new or complicated routines while being able to follow the code a little easier. I have tried the dumper/Loop routine on a P12 ECU and it works as described. Unfortunately I have no programming skills to automate the PC side. So I'm restricted to manually logging, and changing the addresses.

Any one have any thoughts or ideas? Does any one even hack obd1 roms anymore, or am I 10-15 years too late!


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

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  


Powered by phpBB® Forum Software © phpBB Group