Program MC9S12 with CW 5.9 & True Time

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

Program MC9S12 with CW 5.9 & True Time

4,248 Views
dpatel
Contributor I

Hi -

 

I'm looking to purchase the P&E USB Multilink to program MC9S12 micros. I was told by Freescale tech support that I can use the True Time Simulator prog (hiwave.exe) to program the flash & eeprom that is part of the CW special editions download.

 

I receive two files from my SW team - a flash.s19 and eeprom.s19. I used to use SCBDMPGMRS12 BDM programmer but that has died so need a new option!!

 

I have downloaded the CW SW and started hiwave.exe. It is a little complex so I’m still not sure it will do what I need. I’ve tried setting connection to “Full Chip Simulation” (since not got the P&E multilink yet) and selecting my derivative: MC9S12DP256. Then I want to load my .s19 files so I choose ‘Load’ from ‘HC12 FCS’ menu. I can choose the .s19 file but I need to do two things:

 

  • Load flash.s19 starting at address 8000h
  • Load a separate eeprom.s19 file starting at address 3000h

 

I can’t see how that is possible with this software – can you help please? Or is this taken care of when I choose the micro derivative?

 

Thanks,

Davesh

Labels (1)
0 Kudos
12 Replies

1,020 Views
J2MEJediMaster
Specialist I

What Lundin said if you need to do mass-production programming.

 

If you're trying to run the code in the simulator and prove that the code works, just do two HC12 FCS > Load commands, choosing each file. The S-record files should contain the addresses where the code is supposed to be. Be sure in the Load Executable File dialog that you set the file type to 'Motorola S-record' before selecting the files.

 

---Tom

Message Edited by J2MEJediMaster on 2009-06-01 09:09 AM
0 Kudos

1,020 Views
dpatel
Contributor I
I think I'm going to need some step-by-step instructions if you don't mind. I've got a P&E Multilink and I can't seem to get this to work. Please, please help!
0 Kudos

1,020 Views
dpatel
Contributor I

When I try to load my .s19 files I get an error saying no memory at that address. I think this is because the .s19 is set for banked address (one line from .s19 below). How do I get around this?

 

S2240C0000000300E88413300007000700E8854D300001000800E88588300003000400EC8480

 

 

0 Kudos

1,020 Views
CompilerGuru
NXP Employee
NXP Employee

This SRecord contains:

 

 S2240C0000000300E88413300007000700E8854D300001000800E88588300003000400EC8480
Type:     S2
Length:   0x24
Address:  0x0C0000
Data:     0xC0000   00 03 00 E8 84 13 30 00  - ??????0?
          0xC0008   07 00 07 00 E8 85 4D 30  - ??????M0
          0xC0010   00 01 00 08 00 E8 85 88  - ????????
          0xC0018   30 00 03 00 04 00 EC 84  - 0???????
CheckSum: 0x80

 

The hiwave debugger expects paged addresses, say 0xBBCCCC with CCCC being the local 16 bit address (probably in the 0x8000..0xBFFF PPAGE window) and BB being the page number.

 

You can use the burner.exe file to convert the srecord with (physical?) 0x0C0000 addresses to an srecord with paged addresses. The default project layout contains an *.bbl file which just does the opposite direction, translate from paged to physical addresses.

 

Daniel

 

0 Kudos

1,020 Views
dpatel
Contributor I

Thanks for the advice. Couple of points:

 

- I can't figure out what settings I need to get the burner.exe to create paged s19

- Per the other thread, assuming my s19 is linear address (not global), then I put in the flag SRECISHCS12LINEARADR=1 into project.ini file. It seems to load (bar shows loading & gets to 100%) but then when I check the module it still has old level code!

 

I think I have more fundamental issue because I get the following errors in the command window:

 

Block Module Name      Address Range   Status   0  EEPROM               0 -FFFFFFFF   Programmed - Unselected<Timeout>   1  FLASH_4000        4000 -  8061   Programmed - Unselected<Timeout>   2  FLASH_C000        C000 -  FFFF   Programmed - Unselected<Timeout>   3  ALL_PPAGES      308000 -3FBFFF   Programmed - Unselected<Timeout>   4  FLAT8000_P30      8000 -  BFFF   Programmed - UnselectedChange of frequency Detected. IO_DELAY_CNT changed to $0007FP: The UNPROTECT command is not available for the EEPROM flash module => Skipped.FP: The UNPROTECT command is not available for the FLASH_4000 flash module => Skipped.FP: The UNPROTECT command is not available for the FLASH_C000 flash module => Skipped.FP: The UNPROTECT command is not available for the ALL_PPAGES flash module => Skipped.FP: The UNPROTECT command is not available for the FLAT8000_P30 flash module => Skipped.Vppon command file is disabled.FP: EEPROM flash module is bad or protected.FP: FLASH_4000 flash module is bad or protected.FP: FLASH_C000 flash module is bad or protected.FP: ALL_PPAGES flash module is bad or protected.

 

 

I really don't know what I'm doing wrong! I used the unsecure file found in the examples folder - assume it should work. Do I need a reset sequence?

 

 

0 Kudos

1,019 Views
CompilerGuru
NXP Employee
NXP Employee

Can you program a sample or a unmodified project newly created by the wizard?

 

I still have my doubts when it comes to this SRECISHCS12LINEARADR flag, but I'm not 100% certain that it does not work for you. Make sure to enable verify when downloading.

 

The burner works with a *.bbl file, in this file blocks of an input file can be mapped into an output file,

as input file usually ELF files with paged addresses are used, but any SRECORD (with physical addresses) works just as well. The bbl file in the wizard generated projects does the oposite, it tranlates from paged addresses (out of an ELF file) to physical addresses in an output srecord. So you have to switch the src/dest addresses and specify the srecord as input file.

The look for burner or batch burner in the manuals in the help/pdf folder.

There are also other tools (P&E?) which convert srecords in between the address formats, but I did not use them, so I cannot really comment.

 

Daniel

0 Kudos

1,020 Views
stanish
NXP Employee
NXP Employee

hi dpatel,

 

seems your S19 files use linear addresses.

this thread might help you to answer your question by switching the debugger to accept linear S-records.

 

Stanish

 

 

Message Edited by stanish on 2009-06-01 03:32 PM
0 Kudos

1,020 Views
CompilerGuru
NXP Employee
NXP Employee

That thread is for S12X global addresses, SRECISS12XGLOBALADR does not aply to the S12.

 

Daniel

 

0 Kudos

1,020 Views
dpatel
Contributor I

Thank you for the help. Unfortunately something is still not quite right. Now it tells me it is writing the data and completes successfully. But when I check, nothing is written and old data is still in tact.

 

I've tried using HC12MultilinkCyclonePro->Load, File->Load Application and also HC12MultilinkCyclonePro->Flash but none of them seem to write data.

 

I've unsecured the device too.

 

I must be doing something obviously wrong. Any suggestions?

 

Sorry for being a nuisance!

0 Kudos

1,020 Views
dpatel
Contributor I

I get these errors if they can help ascertain the problem:

 

FP: The UNPROTECT command is not available for the EEPROM flash module => Skipped.

FP: The UNPROTECT command is not available for the FLASH_4000 flash module => Skipped.

FP: The UNPROTECT command is not available for the FLASH_C000 flash module => Skipped.

FP: The UNPROTECT command is not available for the ALL_PPAGES flash module => Skipped.

FP: The UNPROTECT command is not available for the FLAT8000_P30 flash module => Skipped.
Vppon command file is disabled.

FP: EEPROM flash module is bad or protected.

FP: FLASH_4000 flash module is bad or protected.

FP: FLASH_C000 flash module is bad or protected.

FP: ALL_PPAGES flash module is bad or protected.

0 Kudos

1,020 Views
Lundin
Senior Contributor IV
Unless you have an incredible tiny production volume, you shouldn't use the debugger for production downloads. Not only is it incredible slow, there is also a potential for mess-up.

Instead I would strongly suggest a P&E Cyclone pro. It is completely compatible with the multilink and can be used for R&D as well as production programming. With the Cyclone you can also easily make one program module containing both flash and eeprom data, then store it in the Cyclone. Once you have that done, the program is stored in the Cyclone and you don't need to have a PC connected anymore. Programming time is roughly 10 seconds for unsecure + eeprom + flash + secure.
0 Kudos

1,020 Views
dpatel
Contributor I

hi - it is not for production downloads; it is to allow me to update our test modules with latest SW.

 

So, can you help with my questions please?

0 Kudos