User Manual For CYCLONE
FX
Programmers
80
9
SAP IMAGE COMPILER (SCRIPTED PROGRAMMING & IMAGE
CREATION)
PEmicro’s Cyclone SAP Image Compiler, or CSAP, is an essential component in the Stand-Alone
Programming (SAP) image creation process. It is designed to work in tandem with the Cyclone
Image Creation Utility, by running in the background, but it can also be called directly by the user.
The CSAP image compiler typically takes the .CFG file that was generated by the Image Creation
Utility and uses it to locate and combine all of the components that will be included in the specific
SAP image that is being created. However the user can also use a command line to submit a CFG
file and various Command-Line Parameters directly to the image compiler. This allows users to
write scripts that can automate the image creation/re-creation process.
In order for the user to do this, they will need to know what Command-Line Parameters are
available and how they are used, and what items can/must be included in a CFG file, including
Programming Commands and Configuration Commands. There is also a specific Command-Line
Parameter that allows the user to easily substitute values inside a specific CFG file. This can
enable a single CFG file to be used to create different SAP images.
9.1
Launching From the Command Line
The image compiler can be launched from the command line to create a SAP image. Below is an
example of a command-line that the user might put together, along with descriptions of its various
components.
9.1.1
Command-Line Example
Below is an example of using the command line to launch CSAP for ARM Cortex devices. The
command line specifies where to locate the .CFG file and other necessary information.
>csapacmpz.exe "C:\MyWorkspace\MyProject\KL25Z128_script.cfg" /image-
file "C:\MyWorkspace\MyProject\KL25Z128_image.sap"
Most command-line parameters can be used with any device, but some are specific to certain
architectures or device types.
9.1.1.1
CSAP Executable
The user must first specify the particular CSAP executable that is compatible with their device. See
the area of the example in green, which is specifically for ARM devices:
>
csapacmpz.exe
"C:\MyWorkspace\MyProject\KL25Z128_script.cfg" /image-
file "C:\MyWorkspace\MyProject\KL25Z128_image.sap"
Below is a list of which executable corresponds to which architecture/device type.
Target Architecture /
Executable Name
ARM-based devices (all manufacturers) :
CSAPACMPZ.exe
MAC71XX, MAC72XX:
CSAPARMZ.exe
HC(S)12(X):
CSAPBDM12Z.exe
ColdFire V1:
CSAPBDMCFV1Z.exe
ColdFire V2, V3, V4:
CSAPBDMCFZ.exe
MPC5xx/8xx:
CSAPBDMPPCZ.exe
DSC:
CSAPDSCZ.exe
HCS08
: CSAPHCS08Z.exe