How to program microcontrollers using USB BDM from a S19 file for HC(s)08/CFV1 and also HC(s)12

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

How to program microcontrollers using USB BDM from a S19 file for HC(s)08/CFV1 and also HC(s)12

4,646 Views
erooll
Contributor II
Hi.
Somebody knows how to program HC(S)08, CFV1 and HC(S)12 microcontrollers, from s19 file generated from Codewarrior?

When I use HC08, I could take s19 file and use a MON08 program from P&E, and I program sucessfully this kind of microcontrollers, but with HC(s)08, i don't  know who do it.

Thanks

Labels (1)
0 Kudos
9 Replies

1,234 Views
erooll
Contributor II
Thanks to all... your sugestions was helpfull, now I could to program all my devices (HCS08, HCS12 and Coldfire V1) using hiwave from s19 file.

Thanks again.
0 Kudos

1,234 Views
erooll
Contributor II
I need distribute only the S19 file , in order  to not  distribute Original  Code Source based in C language.
Other people could program microcontrollers without have risk of manipulate original source.

But I want to know how I can do it, using CW
0 Kudos

1,234 Views
JimDon
Senior Contributor III
I don't know of any products marketed that way do to differences in compilers and chip variations.
I would never buy a product like that, because if something went wrong, I could not debug it.
Have you considered an object library? At least then the linker could locate the code in a manner  that made sense in the context of the rest of the program.
0 Kudos

1,234 Views
UK_CF_FAE
NXP Employee
NXP Employee
Here is how I would solve that problem.
 
You want to program a S19 file for S08/CFV1/S12(X) into a board, using CodeWarrior, but you don't want to have the source code or debug file available to the user. This is quite common.
 
Let us assume that we have a S19 file for a MC9S08QE128.
 
Start CodeWarrior, and create a new project for QE128 using the new project wizard. don't bother with the Device Initialisation or Processor Expert, just a simple C project will do.
 
Once the project is created, run the debugger F5. Project will build, and get flashed onto the QE128 board attached to CW via the USBMULTILINKBDME.
 
At the MultiLinkCyclonePro menu item, select Start Expert Mode Programmer, and select the option Specify Object File. Browse to the desired S19 file.
 
Don't forget to eraase the flash before programming with the EM and PM options.
 
Device is programmed with custom S19 file, inside CodeWarrior.
 
Mark
0 Kudos

1,234 Views
JimDon
Senior Contributor III
Mark,

Why would you have them go to all that trouble of creating a project?

There is no need to do that.

Also, for CF V2 and up you would use the cfflasher.exe program, as the IDE "Flasher Programmer" menu item is very hard to get working.

For HCS12 V4.7, just start Hiwave, selection a connection, select the device, then go to the File/Conguration menu item and go to the "Load" tab and check the boxes you want (like erase, program etc).

Now use File/Save Configuration As and save this ini file. If you do this you will not have to ever do these step again as you can just say "Open configuration" and select this ini file you made.

To burn this file from the command line:

Code:
"(path to cw\prog\hiwave.exe" "C:\myfile.s19" -Prod="C:\myconfigfile.ini"

 Since you set the target in the in file, you do not need to specify it.




0 Kudos

1,234 Views
peg
Senior Contributor IV
Hi erooll,

Fire up hiwave from the progs directory of your CW installation.
Under component menu use "Set Connection" to select your interface and device type.
Under the menu that is named after your interface use "Device" to select your derivative.
Then from the same menu use "Load" you can change the file filter to s19 and find your file.
Then it programmes it in for you.
Once you have done the selection stuff once it will stick so you only have to select the file under "Load" and you are away.

0 Kudos

1,234 Views
Witztronics
Contributor IV
I agree with Peg.  I think that's the best way, but you can do it all with a single command line.

similar to this:

C:\Program Files\Freescale\CodeWarrior for HC08 V5.1\prog\hiwave.exe" C:\myfile.s19 -
Target=HCS08OpenSourceBDM


Create a desktop link.  Edit the start up command line to point to your version of CW, your s19 file, set your target and you are good to go with just a "double click".



0 Kudos

1,234 Views
Witztronics
Contributor IV
You would have to buy a stand-alone programmer from someone like P&E.

It's probably not exactly what you want, but you can launch the debugger and have it load a S19 file without using codewarrior.

Check out AN1002 from our website:
http://witztronics.com/product_info.php?cPath=2_18&products_id=31
0 Kudos

1,234 Views
mke_et
Contributor IV
I take it you don't have the source, just the S19 file...

If that's the case, and you were desperate, you could always write a program to read the S19 file and convert it to define bytes and then feed the source into CW as an include. Then assemble and program.

But you'd have to be pretty desperate.

Then again... I've done similar things, and worse, in the past.

Like I said, 'pretty desperate'.

Mike
0 Kudos