Pages: [1] 2 3 ... 10
 1 
 on: Yesterday at 11:18:48 PM 
Started by Polo35580 - Last post by Albertoak
Hello


I'd like to share a python script I wrote to convert a damos (A2L) to fit a new dump.
I wrote it in python to allow everybody to improve it. (and check there is no worm in it) Wink


You can imagine that the damos need to be as close as possible of the new dump.
I mean same hardware but different software is ok but it's not applicable with different hardware.

The script use a valid damos/dump couple in entry and a new dump to produce a new damos file.

Supported ecus: ME7.5, MED91, EDC16U34, MED17 and SID208.
The format of the dumps can be Intel Hex, Motorola S19 or Binary.
The size must be 1024kb, 1504kb, 2048kb or 4096kb.

It's possible to add support to new ecus by adding a new ecu definition in the script.
For that the script contains a supportedeculist variable which hold ecu definition dictionaries.
Ex:
# MED17 - 0x80045320
  "ecu"              : "MED17",
  "cpu"              : "TriCore",
  "addresslen"     : 10,
  "addressstart"  : '0x80',
  "addressformat": '0x80%06X\n'
Meanings:
#  "ecu"              : Ecu string found in A2L MOD_PAR entry                                                                        (Ex: ECU "MED17")
#  "cpu"              : Cpu type string found in A2L MOD_PAR entry                                                                 (Ex: CPU_TYPE "TriCore")
#  "addresslen"     : Length of address string in A2L CHARACTERISTIC records                                                (Ex: 0x800574D8 -> 10)
#  "addressstart"  : Sub string to remove to obtain an hex address where data can be found in dump file            (Ex: 0x800574D8 -> '0x80')
#  "addressformat": Format use to rebuild an address line where 6 is the len of hex address without addressstart (Ex: 0x800574D8 -> '0x80%06X\n')

The script will ask for an ecu and cpu type if there is no MOD_PAR entry in the A2L.


Here is how the script process:
- Read the damos file and create an address table
- Read the original dump
- Read the new dump
- Correct the address table by searching best match pattern from original dump in new dump using dycothomic search method from original address
- Linearize the address table
- Create a new damos using the address table

And here the command line to execute it:
Code:
python correct-damos-address.py DamosFile.A2L OriginalDump NewDump

It take less than 10 minutes to correct most damos on my computer.
There may be some mistakes due to linearization but it work pretty well in most case.

Feel free to test it and report if it fit your needs.   Cheesy


Edit:

Update script to version 1.1.
# ChangeLog  : v1.0 - Original release
#                          - Add MED17 Ecus support
#                          - Add Intel Hex dump support

Edit2:

Update script to version 1.2.
# ChangeLog  : v1.2 - Add ME7.5 Ecus support

Edit3:

# ChangeLog  : v1.3 - Add MED9.1 Ecus support
#                          - Add EDC16U34 Ecus support
#                          - Add Motorola S19 dump support
#                          - Add supported ecu list to allow adding ecu type (See "Supported Ecu List")

Edit4:

# ChangeLog  : v1.4 - Rewrite Intel Hex and Motorola S19 support to handle address bases
#                          - Add SID208 Ecus support


Best regards

Polo

Hello mate.

I have modified the script to be able to make corrections in Ford's ME 9.0 ECU. in case you want to update the first post. I upload said script. greetings!!!

 # ME7.5 - 0x8574D8
  "ecu"          : "ME7.5",
  "cpu"          : "S80166",
  "addresslen"   : 8,
  "addressstart" : '0x8',
  "addressformat": '0x8%05X\n'
}, {
  # ME9.1 - 0x1C9A02
  "ecu"          : "MED91",
  "cpu"          : "GoldenOak",
  "addresslen"   : 8,
  "addressstart" : '0x',
  "addressformat": '0x%06X\n'
}, {
  # ME9.0 - 0x1C9A02
  "ecu"          : "ME90C",
  "cpu"          : "GoldenOak",
  "addresslen"   : 8,
  "addressstart" : '0x',
  "addressformat": '0x%06X\n'
}, {
  # MED17 - 0x80045320
  "ecu"          : "MED17",
  "cpu"          : "TriCore",
  "addresslen"   : 10,
  "addressstart" : '0x80',
  "addressformat": '0x80%06X\n'
}, {
  # EDC16U34 SIO - 0x1C2030
  "ecu"          : "SIO",
  "cpu"          : "SilverOak",
  "addresslen"   : 8,
  "addressstart" : '0x1',
  "addressformat": '0x1%05X\n'
}, {
  # SID208 - 0xA0200AD4
  "ecu"          : "SID208",
  "cpu"          : "TriCore",
  "addresslen"   : 10,
  "addressstart" : '0xA0',
  "addressformat": '0xA0%06X\n'

 2 
 on: Yesterday at 02:58:49 PM 
Started by fredrik_a - Last post by prometey1982
use a top hat from a pump that doesnt have the regulator and use a referenced fuel pressure regulator on the Rail so it'll scale 1:1 with boost if you're going for a higher power non decos car
In such case he needs to set fuel pressure correction map FRLFSDP to 1. But he doesn't have address of this map)
Although address of this map in 40LPHJ software is 0x23842

 3 
 on: Yesterday at 02:40:56 PM 
Started by fredrik_a - Last post by prometey1982
Thank you!

Sorry for the late follow-up, I´ve not had much spare time lately but I tried this one out in the car and it did not work well.
So I decided to go to the dealer and get the ECU updated.
Software went from 30653124B 40LKMA.A2L to 30729127A 40LPHJ.A2L, Most annoying part is that I cannot see KVB in this version either  Grin
I have attached binary read from the ECU after the update

Your KVB addr is 0x1F7FE, KRKTE - 0x23858 and TVUB - 0x15FEA

 4 
 on: Yesterday at 02:39:04 PM 
Started by fredrik_a - Last post by prometey1982
you never seen this! hahha i been going through this bin on my spare time since. i have the map sensors ready, and a spare manifold to put a bung in.
one day i'll fuck with it

If anybody wants to look into this file here is it https://cloud.mail.ru/public/sgtq/Gwi3tYSog
MAP grad is at 0x17CB0
MAP offs is at 0x17CB2
multipliers as for DSLGRAD and DSLOFS.

 5 
 on: Yesterday at 01:20:58 PM 
Started by M.Mischler - Last post by prj
Convert the map and your base boost to a pressure ratio and populate accordingly.
Changing the axis is not needed.

They just did a 3d map instead of a pressure ratio map for base boost, because it is possible to be more accurate, but unless you have access to a dyno cell with adjustable ambient pressure it's not very relevant for you Smiley

 6 
 on: Yesterday at 11:31:44 AM 
Started by M.Mischler - Last post by M.Mischler
Thank you PRJ. I really appreciate your advice. Smiley

...you need to make a patch to set base boost to pu_w instead of what is calculated in IIRC LDRPLS...

Yes, I have read your posts.
RS4 K-box...so I hacked the binary to have plgrus_w = pu_w like it is done on the S4...
...551K... you need to make an asm patch.
But I don't have the knowledge to change assembler code.


2nd option and don't touch KFVPDKSD/E.
OK, I'll try solution number 2.

How should I calculate the Z-values for KFVPLGU of rows 600-970:

Should I use the delta of the values of the pssol_w axis? Like the following example:


Or should I adjust the Z-values in a way that I get the same shape as stock but increased for my new waste gate cracking pressure? Like the following example:

 7 
 on: May 15, 2024, 07:42:20 PM 
Started by fredrik_a - Last post by s90power
Newer Software for your car. 2004 update, i have kvb on it

Thank you!

Sorry for the late follow-up, I´ve not had much spare time lately but I tried this one out in the car and it did not work well.
So I decided to go to the dealer and get the ECU updated.
Software went from 30653124B 40LKMA.A2L to 30729127A 40LPHJ.A2L, Most annoying part is that I cannot see KVB in this version either  Grin
I have attached binary read from the ECU after the update

 8 
 on: May 15, 2024, 04:12:39 PM 
Started by fredrik_a - Last post by s60rawr
Big thanks! I missed this message early.

you never seen this! hahha i been going through this bin on my spare time since. i have the map sensors ready, and a spare manifold to put a bung in.
one day i'll fuck with it

 9 
 on: May 15, 2024, 04:10:29 PM 
Started by fredrik_a - Last post by s60rawr
Are you sure your car has DECOS at all? In 40GPHJ there are no DECOS maps.

yea 40 series and lower and not decos, they're fixed 50series is decos  we have LPT DECOS 04.5+ and all T5 and R, in the EU its only the T5 and R hence the post 04.5+ 40 series bins.

use a top hat from a pump that doesnt have the regulator and use a referenced fuel pressure regulator on the Rail so it'll scale 1:1 with boost if you're going for a higher power non decos car

 10 
 on: May 15, 2024, 03:49:39 PM 
Started by M.Mischler - Last post by prj
If you want to do it the cracking pressure ratio way in KFVPDKSD/E, then you have to change CWPLGU.
Because 551K software does not have this codeword configurable, you need to make a patch to set base boost to pu_w instead of what is calculated in IIRC LDRPLS.

If you can't do that then you need to do it completely differently by changing LDRPLS, so like your 2nd option and don't touch KFVPDKSD/E.

Pages: [1] 2 3 ... 10
Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.02 seconds with 13 queries. (Pretty URLs adds 0s, 0q)