Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

Please accept the use of cookies on our site

At PEmicro we use web browser cookies in order to provide you with an enhanced experience and in order to be able to do things like shopping cart processing and identify you when you login to our website.

Click here to accept

search inside this forum
search inside all forums
SAP - Image Creation Utility
Michelle W. Jul 22, 2014 at 08:46 AM (08:46 hours)
Staff: Takao Y.

  • How can I create an SAP image from a command line?  This would be very helpful for automating builds and configuration management.



  • Greetings,

    There is a way to create SAP files from command line. Within your Cyclone directory, you will find many executables with the prefix "CSAP". Like CSAPBDM12Z.exe.

    However, we do not give any documentation on how to use it from the installation of the cyclone software. So I have sent the documentation to you by email.

    If anybody else want this documentation, please let me know!

    Takao Yamada

    • Documentation would be wonderful.

    • Could you send me the documentation too?
      We are using csaparmcortexz.exe and would like to see our options if we call it.
      We would like to see if there is a "quiet" option because it seems not working on our build server where it requires input and hangs there forever..

    • Hi, could you also send to documentation to my e-mail? I'm especially interested in changing/replacing the :DESCRIBEIMAGE option through command line options. Having a way to point to the object code would also be quite nice.

      Also a simple look up table e.g. from csapacmpz.exe to Target Architecure: ARM devices

      By the way, this is how I currently do it:
      %CYCLONE_TOOLS_PATH%\csapacmpz.exe "%CYCLONE_CFG_FILE%" imagefile "%TARGET%\" imagecontent "%APPL%_concatenated_image"

    • Can you please send me also the documentation for csapwiz00z?
      This will going to help a lot on our automation.
      Thanks in advance.

      • Greetings,

        We do not have a document specifically for csapwiz00z, but the documents I have will work on all CSAP. They are all similar in what parameters they take.

        Takao Yamada

    • Hi Takao!

      Can you please send the documentation. We're tring to create images for a Kinetis L via CMD. Many thanks in advance.

    • Takao,
      Its been quite some time since my previous reply. Please send me the documentation.

    • it's possibile to have this documentation?

  • Thanks!  Which one do I use for the Cyclone for Renesas?

  • Can you please give an example of creating a SAP file from the command line?

  • Greetings,

    We actually do not have a documentation for the Cyclone Renesas. However, the way you setup your script is basically the same with the cyclone pro or cyclone max.

    First, you need to create a CFG file. This is simple by using the Image Creation Utility. Once you have setup all of the settings and commands, go to the File Menu -> Save Cyclone Configuration. This saves all of the necessary information into a CFG file.

    Within the two documents I sent you, you will find that the command-line needs a few parameters. The typical usage is:

    csapwiz00z.exe INTERFACE=CYCLONE_SAP PORT=USB1 ./myconfig.CFG

    I would suggest putting the "!" or "?" parameter as well to help you debug any issues you run into:

    csapwiz00z.exe ? INTERFACE=CYCLONE_SAP PORT=USB1 ./myconfig.CFG

    You can then save this into a batch file (.BAT) so that you do not have to write this command-line code every time. Now whenever you need to update your S19 file or any commands, you just have to edit the CFG file.

    If you have questions about specific commands, please checkout the documents I sent you first. Most of the information is in there. Only the Renesas specific things will not appear in there.

    Takao Yamada

  • I have tried a lot of different things and I cannot get the command line and config file to generate an output.SAP file.  I am not connected to any device.  I just want an output file.

    Here is the command line:
    C:\pemicro\cyclone_renesas\csapwiz00z.exe ? CYCLONE.cfg out.SAP
    I use the '?' to kleep the display open.

    The result is error 43 during script. Invalid command line parameter (out.SAP)

    Here is my config file:

    ; Silicon Manufacturer is Renesas
    ; Silicon Architecture is R8C
    :SECURITYCODE 73 74 65 70 68 65 6E
    CM C:\Projects\SL-AIRCARD\trunk\Firmware\SLAC-FW\Release\R8C_2135CC-ALL.RCP
    SS C:\Projects\SL-AIRCARD\trunk\Firmware\SLAC-FW\Release\OUTPUTS\SLAC-FW.mot
    EM ;Erase Module
    BM ;Blank Check Module
    PM ;Program Module
    VM ;Verify Module

  • Oh, and I have read both documents and the command line parameters for imagefile are not clear, and generate errors.

  • Greetings,

    The documentation can be a bit confusing. The command line you should do to create the SAP image is:

    C:\pemicro\cyclone_renesas\csapwiz00z.exe ? CYCLONE.cfg ImageFile out.SAP

    Takao Yamada

    • That was very fast! Thanks a lot for the docs Takao!

      Already tried with this:

      C:\PEMicro\cyclone_universal\ImageCreationSupportFiles\csaparmz.exe ? C:\my_files\a_cfg_file.cfg imagefile C:\my_files\a.SAP

      A window pops up, then I get a warning message:

      WARNING!!! = Access violation at address 0051856B in module 'csaparmz.exe'. Read of address 3863738B

      Below it just says "Running programming script..."

      And stays in there forever.

      Kind regards,

      Jon M.

      • Greetings,

        Wrong CSAP. Use CSAPACMPZ.exe
        Sorry the documentation is extremely old and we are planning on updating in within the next month.

        Takao Yamada

        • No problem Takao, tried with that one and it throws Error 70 during script.

          It says: No target processor was selected.

          But I'm currently at the *.SAP creation. Here's my *.CFG that's specified in above commands. Like this:

          C:\PEMicro\cyclone_universal\ImageCreationSupportFiles\csapacmpz.exe ? C:\my_files\a_cfg_file.cfg imagefile C:\my_files\a.SAP

          CM C:\PEMicro\cyclone_universal\supportFiles_ARM\NXP\KL1x\freescale_kl17z128m4_1x32x32k_pflash.arp
          SS C:\my_files\final_firmware.srec
          EM ;Erase Module
          BM ;Blank Check Module
          PT ;Program Trim
          PM ;Program Module
          VM ;Verify Module
          VC ;Verify Checksum

        • Already solved it Takao, many thanks! :)

          What I did, was to copy the contents of the cfg that would be created with the Cyclone Image Creation Utility.

          Kind regards, }

          Jon M.

  • Greetings,

    Were you able to resolve the errors you were seeing?

    Takao Yamada

  • all seems to be working now.  Thanks.  Now, I just need to figure out a quick command line to erase the cyclone and push 5 SAP images to the cyclone over USB.

  • Greetings,

    Unfortunately, the CSAP is only going to load one SAP image and replace the first image on the cyclone.

    You should look into our cyclone automated control package:

    We do have a demo version that will work with one cyclone and one image. Once you get the professional or enterprise version, then you can expand to multiple cyclones and load multiple images. You can also run the images remotely instead of having to press the START button. Try it out and see if it this is something your company is willing to invest in.

    Takao Yamada

  • Greetings,

    Do you have any other questions or concerns?

    Takao Yamada

  • actually, yes - is there an easy way, maybe via batch file/command line, that I can remove all, and load several SAP images into the Cyclone Programmer?


  • Greetings,

    You already asked this question above. And I have already answered it by pointing you towards getting the cyclone automated control package. Not only does it come with a DLL but you can use the CYCLONE_LAUNCH.exe as a command-line tool to run commands like erase and load multiple SAP images.

    Takao Yamada

    • Hi again Takao!

      Once I loaded the images to the Cyclone via Manager Utility...

      Is it possible to flash one image per button press in an incremental fashion with every image stored in Cyclone?

      The automated package can help with this?

      Thanks a lot!

      Kind regards
      Jon M.

      • Greetings,

        Button press will only execute the current image. You will need to use the cyclone automated control package to control the cyclone remotely like changing image on the cyclone without using the touch screen.

        Takao Yamada

        • Hi again Takao! (:

          Ok, then it sounds more like batch scripting. With the automated control package.

          How can I flash one image per iteration at a script?

          Let's say... Inside a for loop:

          for /r C:\my_sap_images\ %%F in (*) do ( <flashing_process with %%F> )

  • Oh!  I didn't see that! Thanks.

  • Could you send me the documentation too?
    Thank you

  • Can I Please Receive this documentation as well?

  • Please, send me the documentation as well :-)

  • Could you send me the documentation too ? I use the Cyclone FX.
    Best regards

Add comment

   Want to comment? Please login or create a new PEMicro account.

© 2018 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement