MC9S12C128 - Invalid .abs.phy S1 records generated when using ROM addresses 0x8000 - 0xBFFF

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MC9S12C128 - Invalid .abs.phy S1 records generated when using ROM addresses 0x8000 - 0xBFFF

Jump to solution
652 Views
sweng90
Contributor I

Using CodeWarrior 4.6.

In the .prm file, if I only specify the ROM_4000 and ROM_C000 segments, as shown below, I get only S2 records in the .abs.phy file (no S1 records), and the file can be loaded onto the chip with no problem:

 

SEGMENTS

 

  ROM_4000 = READ_ONLY 0x4000 TO 0x7FFF;

 

  ROM_C000 = READ_ONLY 0xC000 TO 0xDEFF;

END

 

 

 

 

PLACEMENT

  _PRESTART, STARTUP,

  ROM_VAR, STRINGS,

  VIRTUAL_TABLE_SEGMENT,

  NON_BANKED,

  DEFAULT_ROM, COPY INTO ROM_4000, ROM_C000;

  DEFAULT_RAM INTO RAM;

END

 

 

However, if I use addresses in the range 0x8000 to 0xBFFF, as shown below, I get S1 (and S2) records in the .abs.phy file, and the load fails:

  

 

SEGMENTS 

  ROM_4000 = READ_ONLY 0x4000 TO 0x7FFF;

 

  ROM_8000 = READ_ONLY 0x8000 TO 0xBEFF;

END

 

 

 

PLACEMENT

  _PRESTART, STARTUP,

  ROM_VAR, STRINGS,

  VIRTUAL_TABLE_SEGMENT,

  NON_BANKED,

  DEFAULT_ROM, COPY INTO ROM_4000, ROM_8000;

  DEFAULT_RAM INTO RAM;

END

   

The problem is that memory addresses in the S1 records are in the range 0x0000 - 0x3FFF, an example of which is shown here:

 

S123000084C74A79A1000A1B90CD0000C605873513B745CD00006DE21A596DE21A5B69E277

 

This causes the CYCLONEPRO programmer being used by our manufacturing to fail when it tries to process these S1 records in the .abs.phy file. 

Also note that the .s19 and .abs files output from the linker are valid in this case and can be used to load a firmware image.

 

Questions:

1. Why is it specifying addresses in the range 0x0000 - 0x3FFF in the S1 records?

2. What can I do to get all S2 records in the .abs.phy file (or perhaps correct the S1 records)?

3. Is there a good reference that discusses the memory addresses in the .abs.phy file?  I can't figure out the mapping between the addresses in the .s19 file and those in the .abs.phy file. 

Labels (1)
Tags (1)
0 Kudos
1 Solution
314 Views
CompilerGuru
NXP Employee
NXP Employee

Check the *.bbl file you are using to understand how the *.phy file is created, there is no builtin knowledge in the build tools about this.

Also I would suggest to use paged addresses in the prm file, not local addresses. Say 0x8000 as paged address means PPAGE==0 and offset == 0x8000, this is not valid. So use 0x3F8000 TO 0x3FBEFF instead.

If you want to use local addresses in the prm you have to adapt the bbl file to expect those addresses, but instead I would change the prm to use paged addresses instead.

 

1): Because you are using local addresses, which the bbl file is not expecting.

2): Use paged addresses.

3): Check the bbl file, nothing magic going on anywhere.

 

Daniel

 

PS: Alternatively to use the phy as generated by the bbl, there are also utilities converting the different address formats for s records.

 

 

 

 

 

View solution in original post

0 Kudos
1 Reply
315 Views
CompilerGuru
NXP Employee
NXP Employee

Check the *.bbl file you are using to understand how the *.phy file is created, there is no builtin knowledge in the build tools about this.

Also I would suggest to use paged addresses in the prm file, not local addresses. Say 0x8000 as paged address means PPAGE==0 and offset == 0x8000, this is not valid. So use 0x3F8000 TO 0x3FBEFF instead.

If you want to use local addresses in the prm you have to adapt the bbl file to expect those addresses, but instead I would change the prm to use paged addresses instead.

 

1): Because you are using local addresses, which the bbl file is not expecting.

2): Use paged addresses.

3): Check the bbl file, nothing magic going on anywhere.

 

Daniel

 

PS: Alternatively to use the phy as generated by the bbl, there are also utilities converting the different address formats for s records.

 

 

 

 

 

0 Kudos