Skip to main content
Gabriel T
Senior
November 6, 2020
Question

Cube Prog API Error write memory

  • November 6, 2020
  • 1 reply
  • 1047 views

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

This topic has been closed for replies.

1 reply

Mipoter
Visitor II
September 22, 2022

Hello,

Please check the filePath as follows:

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

Regards

Associate
February 22, 2024

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