Pages: 1 [2]
Author Topic: MED9Toolchain - Automatic Code-Patching for MED9.1  (Read 7016 times)
BlackT
Hero Member
*****

Karma: +79/-40
Offline Offline

Posts: 1425



« Reply #15 on: September 18, 2023, 06:03:46 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 Offline

Posts: 6035


« Reply #16 on: September 18, 2023, 08:15:11 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 Offline

Posts: 1425



« Reply #17 on: September 18, 2023, 09:54:19 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 Offline

Posts: 6035


« Reply #18 on: September 18, 2023, 11:10:58 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 Offline

Posts: 65


« 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 Offline

Posts: 6035


« 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 Offline

Posts: 65


« 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 Offline

Posts: 6035


« 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  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.017 seconds with 17 queries. (Pretty URLs adds 0.001s, 0q)