Access violation on connectUsartBootloader(uartParam[2]) using CubeProgrammer_Api.dll
Hi
This is my first post on this Community. I am not sure I am getting in the right place for questions. If this is a wrong one, please let me know where I can find for help.
I am working on my own console project with VS2019 Community VC++. I have followed the example "STM32CubePrgApi" to have all settings done on my console project. I could compile it without error. But, when I ran it with debug on, I ran in to an exception
"Exception thrown at 0x0000000000000000 in MCP2221Demo.exe 0xC0000005:
Access violation executing location 0x0000000000000000."
This exception looks like a NULL exception to me. The code I was getting this exception is
"int uartConnectFlag = connectUsartBootloader(uartParam[2]);"
I peeked uartParam[2] and got uartParam[2].portName = "COM6". This meant that there was a serial port COM6 but was not allowed to access.
By the way, with same codes above, I could run nicely on "STM32CubePrgApi" example.
General project settings for both projects are
- Windows SDK version : 10.0.19041.0
- Platform toolset : Visual Studio 2019(v142)
- Platform: x64
Does any one can help?
Thanks
Rick
