CubeProgrammer API Error: file does not exist, please check the file's path
Hello,
I am using the CubeProgrammerAPI.dll in a C# software and I get this error :
CubeprogrammerErrorNoFile = -4, when I use the download function.
I don't understand why this file path issue persists. Even after changing the directory, the problem persists without success.
Here is my function:
string filePath = @"D:\DFU\CodeChanges_18_GasTypeTempComp.hex";
var filePathAdapted = string.IsNullOrEmpty(filePath) ? "" : filePath.Replace(@"\", "/");
uint address = 0x08000000;
uint isverify = 1;
uint isSkipErase = 0;
var password = "";
var download = CubeProgrammerApi.downloadFile(filePathAdapted, address, isSkipErase, isverify, password);
if (download != 0)
{
Console.WriteLine($"Download Error {download}", "No USB DFU available\n");
CubeProgrammerApi.disconnect();
return;
}