Dev Blog
Forum
Wiki
About
NefMoto
>
Technical
>
Reverse Engineering
>
MED9Toolchain - Automatic Code-Patching for MED9.1
Pages:
1
[
2
]
« previous
next »
Author
Topic: MED9Toolchain - Automatic Code-Patching for MED9.1 (Read 7008 times)
BlackT
Hero Member
Karma: +79/-40
Offline
Posts: 1425
Re: MED9Toolchain - Automatic Code-Patching for MED9.1
« Reply #15 on: September 18, 2023, 06:03:46 AM »
Quote from: prj on September 18, 2023, 12:44:27 AM
By modifying the ECU to allow it to boot when the full checksum is not correct and some other conditions in the CBOOT.
And also writing a custom flash tool.
I assume still not available( to expensive) for hobby use?
Logged
prj
Hero Member
Karma: +1072/-480
Offline
Posts: 6035
Re: MED9Toolchain - Automatic Code-Patching for MED9.1
« Reply #16 on: September 18, 2023, 08:15:11 AM »
Quote from: BlackT on September 18, 2023, 06:03:46 AM
I assume still not available( to expensive) for hobby use?
It is not available at all on the market. No tool offers it.
You can't buy this. Make it yourself or continue dreaming.
Logged
PM's will not be answered, so don't even try.
Log your car properly
-
WinOLS database
-
Tools/patches
BlackT
Hero Member
Karma: +79/-40
Offline
Posts: 1425
Re: MED9Toolchain - Automatic Code-Patching for MED9.1
« Reply #17 on: September 18, 2023, 09:54:19 AM »
Quote from: prj on September 18, 2023, 08:15:11 AM
It is not available at all on the market. No tool offers it.
You can't buy this. Make it yourself or continue dreaming.
You are talking about flash tool or mod that needs to be done on ECU? Or both?
Logged
prj
Hero Member
Karma: +1072/-480
Offline
Posts: 6035
Re: MED9Toolchain - Automatic Code-Patching for MED9.1
« Reply #18 on: September 18, 2023, 11:10:58 AM »
Quote from: BlackT on September 18, 2023, 09:54:19 AM
You are talking about flash tool or mod that needs to be done on ECU? Or both?
Both need to be done. The ECU bootloader does not support flashing cal only out of the box.
And because of that no commercial flash tool exists that will flash cal only.
Logged
PM's will not be answered, so don't even try.
Log your car properly
-
WinOLS database
-
Tools/patches
elias
Full Member
Karma: +20/-3
Offline
Posts: 65
Re: MED9Toolchain - Automatic Code-Patching for MED9.1
« Reply #19 on: September 19, 2023, 01:08:28 PM »
Hello together.
I have following idea in mind, as reverse-engeneering the Bootloader will be too much effort(for now):
1. MED9.1 is basically a MPC562 with attached M58BW016DB NOR Flash
2. Goal is to make that flash writable.
3. There is a Application Note which mentions some library code, which allows Flash R/W with a MPC555 with M58BF008. See attached PDF
4. Both Flash and Microcontroller mentioned in the App-Note are nearly same, so i would expect that this library will work.
5. I have already a Custom-KWP-Service and a C-Compiler ready to use.
I would implement a custom KWP-Service, which would expect a memory address and size. Then it would read the ram from this location and write it to flash using the library code above.
Filling the ram is already possible with the "writeMemoryByAddress" KWP-Service.
Unfortunately i cannot find the "STMICROELECTRONICS SOFTWARE DRIVERS" which are mentioned in the appnote yet. However it should be possible to obtain them from somewhere.
I know there are some limitations like interrupts/watchdog etc, but i can disable them before writing the flash. Also my code can run from RAM to avoid any collisions.
@prj: What do you think about following "implementation" idea?
Logged
prj
Hero Member
Karma: +1072/-480
Offline
Posts: 6035
Re: MED9Toolchain - Automatic Code-Patching for MED9.1
« Reply #20 on: September 19, 2023, 02:42:18 PM »
You can not execute from the flash while writing to it... I am sure I told you that already.
Logged
PM's will not be answered, so don't even try.
Log your car properly
-
WinOLS database
-
Tools/patches
elias
Full Member
Karma: +20/-3
Offline
Posts: 65
Re: MED9Toolchain - Automatic Code-Patching for MED9.1
« Reply #21 on: September 19, 2023, 02:56:22 PM »
Yes you did, however i dont need to execute from flash anymore.
As i mentioned before, i have developed custom KWP services. I can R/W RAM and i can also execute from RAM. So idea would be:
1. Compile my "Flash-Writer-Code" into a binary blob.
2. Write that blob into ram using writeMemoryByAddress
3. Use my custom KWP-Service to execute that code in RAM
4. Code will then perform some changes on the flash and then reboot the system.
I know that the code needs to follow certain rules to be executed correctly in RAM(jump addresses etc).
Logged
prj
Hero Member
Karma: +1072/-480
Offline
Posts: 6035
Re: MED9Toolchain - Automatic Code-Patching for MED9.1
« Reply #22 on: September 19, 2023, 03:47:58 PM »
There is already a bootloader doing this exact thing.
You are reinventing the wheel.
Also, after you do this, the ECU won't boot up because the checksums won't match.
To fix the sums you need to erase a lot more, defeating the purpose.
Hence you need to reverse the thing anyway.
Logged
PM's will not be answered, so don't even try.
Log your car properly
-
WinOLS database
-
Tools/patches
Pages:
1
[
2
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> Introductions
=> General Discussion
-----------------------------
Noob Zone
-----------------------------
=> Noob Questions
=> Noob Guides and FAQs
-----------------------------
Technical
-----------------------------
=> NefMoto Software
=> Tuning
===> Documents & Helpers & How To's
===> Community Projects
=> Diagnostics
=> Flashing and Chipping
=> Cluster and Immobilizer
===> ECU EEPROM images
===> Original Cluster dumps
===> Original Cluster dump requests
=> Data Logging
=> Reverse Engineering
=> Communication Protocols
-----------------------------
ECU Files
-----------------------------
=> ECU Definition Files
===> ECU Definition File Requests
=> Original ECU Files
===> Original ECU File Requests
=> Checksum Update Requests
-----------------------------
Vehicles
-----------------------------
=> Vehicle Tech
=> Project Cars
-----------------------------
Regional
-----------------------------
=> Canadian Regional Discussion
=> US Regional Discussion
-----------------------------
Classifieds
-----------------------------
=> For Sale
=> Wanted
=> Services
-----------------------------
Miscellaneous
-----------------------------
=> Off Topic
=> Forum Tech Support
=> Bizarro Messages Posted by Bots and Spammers
Navigation
Home
Help
Login
Register
Personal Tools
November 22, 2024, 03:24:23 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search
Advanced Search
Loading...