Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
ERROR 41 During script(.12P file does not exists)
Ganesh V. Jun 28, 2017 at 05:29 AM (05:29 hours)
Staff: Takao Y.

  • Hello all,

    Greetings!!!
    I am trying to write batch file for cprog12z.exe erase the EEPROM. but when I execute my batch file it is throwing the following error.

    >>CMD>CM "C:\Users\ganesh\Desktop\P&E\CMEEPROM.12P"
    >>.12P file does not exist.
    >>ERROR 41 During script

    The same .12P file is working for prg12z.exe(GUI) application.

    Am I missing anything in the command line?

    Please help me out how to resolve the problem.

    Thank you in advance!!!

    Regards,
    Ganesh Vijaya Kumar P




    Comments

  • Greetings,

    This is most likely a pathing issue, not a problem with your algorithm. Maybe use this method here to see if your file does exist using the pathing you used:
    https://stackoverflow.com/questions/3022176/how-to-verify-if-a-file-exists-in-a-windows-bat-file


    Takao Yamada

    • Hello Takao Yamada,

      Thank you very much for your reply,

      I have tried using the if exist command in batch file:
      IF EXIST "filename" (
      %LIBRE_PATH% ? io_delay_cnt 17 "C:\Users\ganesh\Desktop\P&E\PBL.cfg" Interface=CyclonePro port=USB1
      ) ELSE (
      ECHO Does not Exist
      )

      And the condition is pass, file exists.

      But still I am receiving the same error from the cprog12z.exe.

      Thank you,

      Regards,
      Ganesh Vijaya Kumar P

  • Greetings,

    Then there may be issues in your CFG and BAT files. Please copy/paste your file contents here so I can tell you where the problem is. Please also read the CPROG documentation before we proceed. There are examples in there on how you are suppose to set up CPROG.


    Takao Yamada

  • Thank you,

    Please find the batch commands below:

    set LIBRE_PATH="C:\pemicro\prog12z\cprog12z.exe"
    %LIBRE_PATH% ? io_delay_cnt 17 "C:\Users\ganesh\Desktop\P&E\PBL.cfg" Interface=CyclonePro port=USB1


    Please find the CFG commands below:

    RE
    CM "C:\Users\ganesh\Desktop\P&E\Freescale_9S12G128_1x16x64k_128k_Linear_Pflash.12P"
    EM
    BM
    SS "D:\Technical\Batorial\P&E\PBL.abs.phy"
    PM
    VM
    RE

  • Greetings,

    Why am I seeing different things between your first post and your last?

    Your first post said:
    >>CMD>CM "C:\Users\ganesh\Desktop\P&E\CMEEPROM.12P"
    >>.12P file does not exist.
    >>ERROR 41 During script

    Your last post indicates your algorithm is at:
    "C:\Users\ganesh\Desktop\P&E\Freescale_9S12G128_1x16x64k_128k_Linear_Pflash.12P"

    Could you please clarify and update the error you are seeing so that I have the correct information.


    Takao Yamada

    • First I expected that number of characters in the file is causing the error and renamed the file name with "CMEEPROM.12P" but in the two posts algorithms used are same. But error still exists.

  • Greetings,

    It is a good test that you checked for path length. I believe the limit is 128 characters. You should be fine.

    Could you run the file EXIST test again but this time on your algorithm path, not the path to your CFG file?

    Not too important, but there is no need to have "RE" command at the beginning of your CFG file. It only increases time spent completing the script. A reset is already being done right before the algorithm is loaded. A RE at the end of the script is also not necessary. It simply does a software reset and re-enters debug mode. You are most likely going to disconnect the cyclone anyways and power cycle the board.


    Takao Yamada

  • Still there is no luck, please look in to the exist code mentioned below:

    IF EXIST "C:\Users\ganesh\Desktop\P&E\Freescale_9S12G128_1x16x64k_128k_Linear_Pflash.12P" (
    %LIBRE_PATH% ? io_delay_cnt 17 "C:\Users\ganesh\Desktop\P&E\PBL.cfg" Interface=CyclonePro port=USB1
    ) ELSE (
    ECHO Doesnot Exist
    )

    File is existing and cprogg12z.exe command is executed, throwing the same error.

    Thank you for your inputs, I removed RE command at the beging from my CFG script.

  • Greetings,

    The only other thing I can think of that can cause this is permissions. Do you have full permissions on this computer? Are there read/write restrictions?


    Takao Yamada

  • Greetings!!!

    There is no read/write restriction on any of the file I am using in the script.

    Also, I tried executing the batch file manually through command line(cmd.exe) running as administrator. Still there is no luck.

    Ganesh Vijaya Kumar P

  • Greetings,

    What version of PROG and CPROG are you using? Typically you can find this at the top of the software. Otherwise right-click -> properties on the executable will tell you the version.

    I noticed that your files are in 2 different drives. What happens if you moved all of your files and software in the same drive. Are you able to resolve this issue? Just an experiment.


    Takao Yamada

  • Greetings!!!

    I am using CPROG12Z Version 1.78.0.0

    I already have tried with all the files(Batch file, CFG and .12P) in the same directory, but there is no luck.

    Also I have copied the above mentioned files into the path: C:\pemicro\prog12z
    To give a try, still there is no luck.


    Ganesh Vijaya Kumar P

  • Greetings,

    Could you go to Support page -> Support requests and create a ticket for me? There I want you to zip up your PROG/CPROG folder and also include the CFG, .12P, and Batch files you are using. I want to see if I can replicate the issue on my end.


    Takao Yamada

    • GTreetings!!!

      I have raised a ticket using the subject "ERROR 41 During script(.12P file does not exists)".

      I really appreciate your support...:-)

      Thank you.

Add comment


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







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