bad load address in s-record

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

bad load address in s-record

797 Views
ma85_bahar
Contributor II

Hi every one. I want to download s19 file on s12xs128 using Bootloader_S12. I do the all settings and configurations as mentioned on AN4258.
the output file (out.S19) is attached. the download error occurs when it comes to this record:
S2247FFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC000C000C000C000C000C000C000C0006D.
the 7FFF00 address is invalid . and "S-Record Out Of Range" error message appears. 

how can i fix it.

0 Kudos
3 Replies

653 Views
ma85_bahar
Contributor II

thank you for reply.
the CW generates two files for me: Project.abs.glo and Project.abs.s19.
the s-records of .bas.s19 file corresponds with .abs.glo file as you pointed.
for example:
this record in .abs.s19: S123FF10C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000CD
corresponds with .abs.glo record: S2247FFF10C000C000C000C000C000C000C000C000C000C000C000C000C000C000C000C0004D
now i have converted the project.abs.s19 file to OUT.s19 file using SRecCvt as mentioned in AN4258. then i download the OUT.s19 file to uc.
the attached file is generated by SRecCvt software and it is not generated directly by CW.
but the problem is something else:
in Bootloader_S12X\source\main.c we have this block code:

if (!((ProgSRec.LoadAddr >= 0x7E0000UL) && (ProgSRec.LoadAddr <= 0x7FEFDFUL)))

   return(SRecRangeError);

   break;

so, the record with address of 7FFF00 will be rejected. how can i make the compiler not to generate out of ranged address.

0 Kudos

653 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Mohammad Ali Bahar

We can also Convert  between Logical Addresses and Global Addresses with HCS12XAdrMap.exe. you can directly open this application by going to :

       C:\Program Files\Freescale\Codewarrior for HC12 V5.1\Prog

and clicking on HCS12XAdrMap.exe


Have a great day,
Jun Zhang

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

653 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Mohammad Ali Bahar 

I checked your .s19 file. The burning address(7FC000...) included in this file is global address but not logical address.

 

Generally after a successful link, CW will generate two burning file. .s19(use logical address) and .glo(use global address) file. your .s19 file should be actually .glo file.

.s19 file uses logical address(Banked addresses). It is the 16bit address from 0-0xffff. The flash page info is from 0x8000 to 0xbfff.

The .glo uses 23bit global map.  global address 0x7FFF00 is corresponding with the logical address 0xFF00.

In the case you only have global address .glo file, you can convert it to logical address (Banked addresses) with  SRECCVTSW. you can find the SRECCVTSW in the application note for bootloader for S12Z AN12086SW.zip


Have a great day,
Jun Zhang

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos