cancel
Showing results for 
Search instead for 
Did you mean: 

Cube Prog API Error write memory

Gabriel T
Senior

Hello,

I am using the CubeProgrammerAPI.dll in a C# software and I get this error : CUBEPROGRAMMER_ERROR_WRITE_MEM when I use the download function.

I dont think it is a path related issue

Any ideas where this problem comes from / how to solve it ?

Here is my function :

public static int DownloadFile(string filePath)
 
  {
 
    uint address = 0x08000000;
 
    uint skipErase = 0;
 
    uint verify = 1;
 
    string binPath = @"";
 
    return NativeMethods.DownloadFile(filePath, address, skipErase, verify, binPath);
 
  }

Regards

2 REPLIES 2
Mipoter
Associate II

Hello,

Please check the filePath as follows:

var filePathAdapted = string.IsNullOrEmpty(filePath) ? "" : filePath.Replace(@"\", "/");

Regards

I am encountering this problem despite having configured the path as recommended. The error persists with the message '-4 (No such file)'