how to just program a S19 file with PE USB multilink ans Codewarrior?

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

how to just program a S19 file with PE USB multilink ans Codewarrior?

1,876 Views
bmusa
Contributor I

We need to just program S19 file to a MC9S12C32, code warrior menus and choices were not obvious to point to the source file and "WRITE". If you could explain the logic of it is done, since code warrior is primarily a programming enviroment to make the S19 file.

Best Regards

 

BMusa

Labels (1)
Tags (1)
0 Kudos
3 Replies

599 Views
Emac
Contributor III

It is possible to just program a chip using a batch file to kick it off.

You need to do 2 things first.

1.  Find the path for the installed hiwave.exe file.

2.  Create an ini file for the download process.  For example the P&E_Multilink_CyclonePro.ini for your case.

 

to create the ini file, just take the normal steps to create project if you have not already done so.

 

3.  Launch CodeWarrior IDE

a. Select Start > Programs > CodeWarrior >CW for HC12 V4.5 . menu appears

b. Select CodeWarrior IDE . IDE starts, and CodeWarrior window appears

 

4 From IDE main menu bar, select File > New . New window

 

5 Create new project

a. Select HC(S)12 New Project Wizard

b. In Project name text box, type name you want to give project .

IDE automatically adds .mcp extension when it creates project

c. In Location text box enter path to store project or click Set...

button to browse to folder.

d. Click OK button . first page of New Project Wizard appears

e. Click Next button . Page 2 of New Project Wizard appears

f. Select MC9S12A256B      (actual processor is MC9S12A256PCPV is package and temperature  type)

g. Click Next button . Page 3 of New Project Wizard appears

h. Make sure C, and Assembly checkboxes are checked

i. Click Next button . Page 4 of New Project Wizard appears; allows you to specify whether or not to use Processor Expert

j. Select Yes.

k. Click Next button . Page 5 of New Project Wizard appears; allows you to specify whether you want project configured to work with PC-lint

l. Select No

m. Click Next button . Page 6 of New Project Wizard appears; allows you to specify level of startup code

n. Select ANSI startup code

o. Click Next button . Page 7 of New Project Wizard appears; allows you to specify floating point format that project should be configured to support

p. Select float is IEEE32, double is IEEE64.

q. Click Next button . Page 8 of New Project Wizard appears; allows you to specify memory model that project should be configured to support

r. Select Banked

s. Click Next button . Page 9 of New Project Wizard appears; allows you to specify connections that project should be configured to support

t. Check Full Chip Simulation and P&E Multilink/Cyclone Pro checkboxes

u. Click Finish button . system creates new project based on information you specified in New Project Wizard; Project window appears, docked at left side of main window

v. Under the select CPUs, select the MCS12A256BCPV 112-pins LQFP.

w. Set Clock Settings>Input Clock Clock frequency to 16 MHz

x. Set Clock Settings>Output Clock (disabled)

 

(Adapt as needed for your project and chip type)

 

next adapt the following batch file for your hiwave.exe path

(save this batch file in the root project directory -ie where the P&E_Multilink_CyclonePro.ini or (in this case the HCS08_Serial_Monitor.ini)

@echo offset COMMAND_PATH="NULL PATH"if EXIST C:\PROGRA~1\FREESC~1\CW08V5~1.0\PROG\hiwave.exe set COMMAND_PATH=C:\PROGRA~1\FREESC~1\CW08V5~1.0\PROG\hiwave.exeREM if EXIST D:\PROGRA~1\FREESC~1\CWFORH~1.5\prog\hiwave.exe set COMMAND_PATH=D:\PROGRA~1\FREESC~1\CWFORH~1.5\prog\hiwave.exeecho %COMMAND_PATH% REM NOTE THAT THERE ARE NO SPACES ALLOWED IN THE SET COMMAND AND ^& = "&" characterREM set PRODUCT="%CD%\P&E_Multilink_CyclonePro.ini"set PRODUCT="%CD%\HCS08_Serial_Monitor.ini"dir /b /n "%CD%\bin\*abs.s19">Choicefind /N "abs.s19" Choice>menu.txttype menu.txterase Choiceset /p userpick=Pick a number to load ^>REM find user choice and put in user.txt (1 line onlyfind "[%userpick%]" <menu.txt>user.txterase menu.txtREM get userchoice from user.txtset /p userchoice=<user.txtecho %userchoice%if "%userchoice%"=="" goto badenderase user.txtREM get rid of [1] (for example)REM gota use %% inside a batch filefor /F "tokens=1,2 delims=]" %%i in ("%userchoice%") do set userfile=%%jecho %userfile%set SOURCE=%CD%\bin\%userfile%echo %SOURCE%echo %PRODUCT%REM !!!!!!!TEST BEFORE EXECUTION!!!!!!if not exist %SOURCE% goto badendif "%userfile%"=="" goto badendif "%COMMAND_PATH%"=="" goto badendif %PRODUCT%=="" goto badendREM****************************************************************************echo.>>burnlog.txtecho %date%>>%CD%\burnlog.txtecho %date%echo %time%>>%CD%\burnlog.txtecho %time%echo Programming Source %Source%>>%CD%\burnlog.txtecho Programming Source %Source%%COMMAND_PATH% %SOURCE% -Prod= %PRODUCT% >>%CD%\burnlog.txtREM****************************************************************************goto goodendbadend:echo Forced to abandon programing effort due to error>>%CD%\burnlog.txtecho Forced to abandon programing effort due to errorpauseexit 1goodend:pauseexit 0

 

This will try to load whatever was compiled in the .\bin\ directory (it is looking for a *.abs.s19 file.

 

 

Just remember 2 things 1.  You must customize this batch file for your particulars and 2.  you must create the .ini file as well.

 

Good luck and I hope this helps.

 

0 Kudos

599 Views
Lundin
Senior Contributor IV

Hiwave.exe is incredible slow, so if this is for commercial production programming, I'd encourage you to get a Cyclone instead. Then you won't even need to have a PC connected when downloading.

0 Kudos

599 Views
v_dave
Contributor IV

You have to purchase the standalone software package from PE Micro.  Look at the Cyclone programming product and the software that you need for that will work with the PE USBMultilink as well.

 

www.pemicro.com

0 Kudos