cancel
Showing results for 
Search instead for 
Did you mean: 

CubeProgrammer_API.dll problem with the debugConnectParameters struct

FDarr.1
Associate II

Hello everyone,

I try to use CubeProgrammer_API.dll in my oun program and I have a strange thing when I connect to STLink and ask for the list using "getStLinkList"...

The answer is correct for the first stlink found but the second one have an offset off 100 byte...

The Original struct in CubeProgrammer_API.h is

typedef struct debugConnectParameters
{
    debugPort dbgPort;                  /**< Select the type of debug interface #debugPort. */
    int index;                          /**< Select one of the debug ports connected. */
    char serialNumber[33];              /**< ST-LINK serial number. */
    char firmwareVersion[20];           /**< Firmware version. */
    char targetVoltage[5];              /**< Operate voltage. */
    int accessPortNumber;               /**< Number of available access port. */
    int accessPort;                     /**< Select access port controller. */
    debugConnectMode connectionMode;    /**< Select the debug CONNECT mode #debugConnectMode. */
    debugResetMode resetMode;           /**< Select the debug RESET mode #debugResetMode. */
    int isOldFirmware;                  /**< Check Old ST-LINK firmware version. */
    frequencies freq;                   /**< Supported frequencies #frequencies. */
    int frequency;                      /**< Select specific frequency. */
    int isBridge;                       /**< Indicates if it's Bridge device or not. */
    int shared;                         /**< Select connection type, if it's shared, use ST-LINK Server. */
}debugConnectParameters;

Using Exemple1.ccp with 2 probes I need to modify the struct definition adding 100 dummy byte at the end...?

typedef struct debugConnectParameters
{
    debugPort dbgPort;                  /**< Select the type of debug interface #debugPort. */
    int index;                          /**< Select one of the debug ports connected. */
    char serialNumber[33];              /**< ST-LINK serial number. */
    char firmwareVersion[20];           /**< Firmware version. */
    char targetVoltage[5];              /**< Operate voltage. */
    int accessPortNumber;               /**< Number of available access port. */
    int accessPort;                     /**< Select access port controller. */
    debugConnectMode connectionMode;    /**< Select the debug CONNECT mode #debugConnectMode. */
    debugResetMode resetMode;           /**< Select the debug RESET mode #debugResetMode. */
    int isOldFirmware;                  /**< Check Old ST-LINK firmware version. */
    frequencies freq;                   /**< Supported frequencies #frequencies. */
    int frequency;                      /**< Select specific frequency. */
    int isBridge;                       /**< Indicates if it's Bridge device or not. */
    int shared;                         /**< Select connection type, if it's shared, use ST-LINK Server. */
    char dymmy[100];
}debugConnectParameters;

This think is stange ... do anyone can explain this ?

Thanks.

1 REPLY 1
Houda GHABRI
ST Employee

Hi @FDarr.1​ ,

Thanks for rising this very interesting point.

It will be treated asap and will be fixed in next CubeProgrammer release.

regards,

Houda