This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C2000-GANG: Gang Programmer DLL Interface Issues.

Part Number: C2000-GANG

We are scripting the image creation as part of our automated build process.

Issues I found with C2000GANG_ImageFileSave function.

First of all, the 'type' argument is not documented.  I looked at the C2000_GANG.h file and it says nothing about this argument.  

I sent an support request to Elprotronic more than half a year ago and there has been no answer.

The 'filename' argument handles periods in the name weirdly and inconsistently.  

filename: "555-5555.00_00_00.BN9999" generates this:
555-5555.00_00_00.c2000gangbin
555-5555.00_00_00.c2000gangimage

filename: "555-5555.00_00_00_BN9999" generates this:
555-5555.c2000gangbin
555-5555.c2000gangimage

filename: "555-5555_00_00_00_BN9999" generates this:
555-5555_00_00_00_BN9999.c2000gangbin
555-5555_00_00_00_BN9999.c2000gangimage

Please support periods in the file name.

Guessing at the Type and changing the file naming format we are able to work around these issues but it would be nice to see fixes in later versions.

Thanks in Advance

  • Hi Francis,

    Below is the description of the type used in the C2000GANG_ImageFileSave(..) function

    #define PROJ_SEC_UNPROTECTED 1
    #define PROJ_SEC_PASSW_PROTECTED 2
    #define PROJ_SEC_PC_HW_PROTECTED 3
    #define PROJ_LOCK_EN 0x10
    // available type in the C2000GANG_ImageFileSave
    // type = PROJ_SEC_UNPROTECTED
    // or PROJ_SEC_PASSW_PROTECTED
    // or PROJ_SEC_PC_HW_PROTECTED
    // or (PROJ_SEC_UNPROTECTED | PROJ_LOCK_EN)
    // or (PROJ_SEC_PASSW_PROTECTED | PROJ_LOCK_EN)
    // or (PROJ_SEC_PC_HW_PROTECTED | PROJ_LOCK_EN)

    See picture 2-12 in the C2000 Gang Programmer (SPRUHS0C) for the meaning of the definitions above related to the Image protection setup.

    In the file name you presented, the extension (last part after dot) is removed and replaced with the new extension - .c2000gangbin and .c2000gangimage. If you remove 'ext" from your files you provided you will get the file names you provided.
    In the first your example the ext. BN9999 is removed, in the second example ext 00_00_00_BN9999 is removed and in the last example ext. is not present (no dot in the name) and whole file name is used with added ext .c2000gangbin and .c2000gangimage.

    Best regards,
    Gregory Czajkowski
    Elprotronic Inc.