Skip to main content
Gabriel T
Senior
Nov 6, 2020 5:10 PM UTC
Question

Cube Prog API Error write memory

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.

2 replies

Mipoter
Visitor II
Sep 22, 2022 3:23 PM UTC

Hello,

Please check the filePath as follows:

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

Regards

Associate
Feb 22, 2024 1:29 PM UTC

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