Menu

#329 ST-Link TCP server backend code windows

0.11.0
closed
None
Not a bug
2021-12-29
2021-12-27
Pawel
No

Winsock is missing initialization.

#ifdef _WIN32
    // Initialize Winsock
    WSADATA wsaData;
    int iResult = WSAStartup(MAKEWORD(2, 2), &wsaData);
    if (iResult != 0)
    {
        LOG_ERROR("Error initializing socket (WSAStartup failed: %d)", iResult);
        return ERROR_FAIL;
    }
#endif

Regards,
Pawel

Discussion

  • Pawel

    Pawel - 2021-12-27

    You can close/delete this ticket. No one probably except me can see this problem as I am using stlink backend from openocd as my library. In openocd winsock initialisation is present in serverhostosentry();

     
  • Antonio Borneo

    Antonio Borneo - 2021-12-28

    I've never investigated using openocd as library
    The file main.c should be skipped; the entry point of the library libopenocd.a should be openocd_main(), that includes the call to server_host_os_entry().
    If you decide to not call openocd_main() and to call lowest level functions, you should take care of the dependencies.
    Do I miss something?
    The call to server_host_os_entry() has been moved in http://openocd.zylin.com/5456 as part of the effort for stlink tcp server.

     
  • Pawel

    Pawel - 2021-12-28

    Sorry, but I was too much "trigger happy" with this issue. Unfortunately it is not github and I can't see an option to delete this issue.

     
  • Antonio Borneo

    Antonio Borneo - 2021-12-29
    • status: new --> closed
    • Resolution: --> Not a bug
     
  • Antonio Borneo

    Antonio Borneo - 2021-12-29

    No problem. Closed!

     

Log in to post a comment.

MongoDB Logo MongoDB