Hello
I think that memory map look like this:
ROM @ 0x000000 size 0x200000
Loading address 0x000000 size 0x200000
And i cut data from original file from 0x1C0000 to 0x1FFFFF,
then i load this data as additional binary file at 0x5C0000 size 0x40000
Now we have the correct addressing from beginning file, with correct subroutines address.
And correct addressing in data block.
Actually, that does match up.
I poked around with this a bit more. Take a look at this extract from a random 2.0 TFSI MED9.1 .a2l file. There’s a section near the beginning that actually lists the memory segment layouts. It describes both ROM and RAM. I'm not sure what the section at 0x900000 is
, but the rest seems to align. You'll notice the bit in
blue has a mapping from 0x1C -> 0x5C.
.a2l file attached
/begin MOD_PAR "D915A_41W200"
VERSION "MED91"
ADDR_EPK 0x1C21F0
EPK "55/1/MED91/5/4420.01//D915A_41W200/D915A_41W200/150904/"
CUSTOMER_NO "5"
USER "GS-ES/EAD1-Richard"
PHONE_NO ""
CPU_TYPE "GoldenOak"
ECU "MED91"
/begin MEMORY_SEGMENT Pst20000 "" CODE EPROM EXTERN 0x20000 0x1A0000 -1 -1 -1 -1 -1
/begin IF_DATA ETK ADDRESS_MAPPING /*orig_adr:*/0x20000 /*mapping_adr:*/0x20000 /*length:*/0x1A0000 /end IF_DATA
/begin IF_DATA ASAP1B_CCP ADDRESS_MAPPING /*orig_adr:*/0x20000 /*mapping_adr:*/0x20000 /*length:*/0x1A0000 /end IF_DATA
/begin IF_DATA ASAP1B_KWP2000 ADDRESS_MAPPING /
*orig_adr:*/0x20000 /*mapping_adr:*/0x20000 /*length:*/0x1A0000 /end IF_DATA
/end MEMORY_SEGMENT
/begin MEMORY_SEGMENT Pst1F0000 "" CODE EPROM EXTERN 0x1F0000 0x10000 -1 -1 -1 -1 -1
/begin IF_DATA ETK ADDRESS_MAPPING /*orig_adr:*/0x1F0000 /*mapping_adr:*/0x1F0000 /*length:*/0x10000 /end IF_DATA
/begin IF_DATA ASAP1B_CCP ADDRESS_MAPPING /*orig_adr:*/0x1F0000 /*mapping_adr:*/0x1F0000 /*length:*/0x10000 /end IF_DATA
/begin IF_DATA ASAP1B_KWP2000 ADDRESS_MAPPING /
*orig_adr:*/0x1F0000 /*mapping_adr:*/0x1F0000 /*length:*/0x10000 /end IF_DATA
/end MEMORY_SEGMENT
/begin MEMORY_SEGMENT Pst0 "" CODE EPROM EXTERN 0x0 0x20000 -1 -1 -1 -1 -1
/begin IF_DATA ETK ADDRESS_MAPPING /*orig_adr:*/0x0 /*mapping_adr:*/0x0 /*length:*/0x20000 /end IF_DATA
/begin IF_DATA ASAP1B_CCP ADDRESS_MAPPING /*orig_adr:*/0x0 /*mapping_adr:*/0x0 /*length:*/0x20000 /end IF_DATA
/begin IF_DATA ASAP1B_KWP2000 ADDRESS_MAPPING /
*orig_adr:*/0x0 /*mapping_adr:*/0x0 /*length:*/0x20000 /end IF_DATA
/end MEMORY_SEGMENT
/begin MEMORY_SEGMENT Dst1C2000 "" DATA EPROM EXTERN 0x1C2000 0x2E000 -1 -1 -1 -1 -1
/begin IF_DATA ETK ADDRESS_MAPPING /*orig_adr:*/0x1C2000 /*mapping_adr:*/0x902000 /*length:*/0x2E000 /end IF_DATA
/begin IF_DATA ASAP1B_CCP ADDRESS_MAPPING /*orig_adr:*/0x1C2000 /*mapping_adr:*/0x5C2000 /*length:*/0x2E000 /end IF_DATA
/begin IF_DATA ASAP1B_KWP2000 ADDRESS_MAPPING /
*orig_adr:*/0x1C2000 /*mapping_adr:*/0x5C2000 /*length:*/0x2E000 /end IF_DATA
/end MEMORY_SEGMENT
/begin MEMORY_SEGMENT ExtRam900000 "" VARIABLES RAM EXTERN 0x900000 0x2000 -1 -1 -1 -1 -1
/* AsapMLXFm - CCP_V2_1 */
/begin IF_DATA ETK ADDRESS_MAPPING /
*orig_adr:*/0x900000 /*mapping_adr:*/0x900000 /*length:*/0x2000 /end IF_DATA
/* AsapMLXFm - KWP2000 */
/end MEMORY_SEGMENT
/begin MEMORY_SEGMENT Ram7F8000 ""
VARIABLES RAM INTERN 0x7F8000 0x8000 -1 -1 -1 -1 -1
/end MEMORY_SEGMENT
/begin MEMORY_SEGMENT Ram800000 ""
VARIABLES RAM INTERN 0x800000 0x8000 -1 -1 -1 -1 -1
/end MEMORY_SEGMENT