8 Replies Latest reply on Nov 24, 2020 9:55 PM by DheerajK_81

    cybootloaderutils throwing AccessViolationException when opening connection.  Trying to track down cause.

    KyTr_1955226

      Hi all,

       

      I'm working on trying a create multi-protocol (UART and USB HID) bootloader host application in C#, using .NET Core 3.1/WPF.  I'm hitting a roadblock where attempting to call CyBtldr_Program() always results in an AccessViolationException being thrown.

       

      After some digging, the exception is thrown inside CyBtldr_StartBootloadOperation at the line:

      err = g_comm->OpenConnection();

       

      Looks like possibly an issue with the communication functions not getting passed through/referenced properly?  I'm not much of an application developer, so if it's something obvious I'm probably missing it.

       

      I've attached the entire VS2019 solution that includes both the application as well as the CyBootloaderUtils project.  The application itself is a bit messy and incomplete.  The HID USB loader has not been tested at all yet.  I am running into this issue attempting to load via serial port interface.  CyBootloaderUtils is being built from the source code included in PSoC Creator 4.3.

       

      I have also included the Creator 4.3 workspace targeting the PSoC5LP onboard a CY8CKIT-050 that I am using to test the bootloader.

       

      Might anyone have an idea as to what's going on here?