User Manual For Cyclone LC Programmers
108
When the user calls the CSAP executable that will reference this CFG file they will need to specify
the values of these parameters on the command line. See the example below, where the first of
these parameters is used to specify a programming algorithm (.SRP), the second an .S19 file, and
the third a programming command (VM).
CSAPACMPZ
/PARAM1=C:\PEMICRO\Freescale_MK40X256_PFlash_DFlash.ARP
“/PARAM2=C:\PEMICRO\EXAMPLE FILES\TEST.S19"
/PARAM3=VM
Note:
Notice that /PARAM2 is enclosed in double quotation marks. This is because the parameter has a
space in its value (Example Files). The surrounding double quotation marks are required in this
situation, in order to indicate to Windows that it is a single parameter.
The complete example command line would be as below (note that this is one
continuous
line; no
line breaks):
C:\PROJECT\CSAPACMPZ C:\PROJECT\GENERIC.CFG /
PARAM1=C:\PEMICRO\Freescale_MK40X256_PFlash_DFlash.ARP “/
PARAM2=C:\PEMICRO\EXAMPLE FILES\TEST.S19” /PARAM3=VM
9.2.5
Sample Batch File
Here is an example of how to call a command-line programmer and test its error code return in a
simple batch file. Sample batch files are given for both Windows 95/98/XP and Windows 2000/NT/
XP/Vista/7/8/10.
9.2.5.1
Windows NT/2000/Vista/7/8/10:
C:\PEMicro\CYCLONE\IMAGECREATION\IMAGECREATIONSUPPORTFILES\CSA
PACMPZ.EXE C:\PROJECT\ENGINE.CFG
PORT=USB1
if errorlevel 1 goto bad
goto good
:bad
ECHO BAD BAD BAD BAD BAD BAD BAD BAD
:good
ECHO done
Note:
Path names of files that are relative to the CSAP executable can also be used.
9.3
CSAP Error Returns
An Error code is returned by the Image Compiler so that a script file or an application launching the
Image Compiler can check for it. The error codes used are:
0 - Program completed with no errors.
1 - Canceled by user.
2 - Error reading S record file.
3 - Verify error.
4 - Verify canceled by user.
5 - S record file is not selected.