Saving files to flash memory

Home Forums mDot/xDot Saving files to flash memory

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #19822
    Jaco Marais
    Participant

    Good evening everyone,

    I’m having trouble getting saveUserFile() to work. My end goal is to update the mDot by sending it new firmware over the PA_2 and PA_3 serial connection. My current plan is to send the first 100 kB, save it to flash memory using saveUserFile(), send the rest of the firmware and append to the file using appendUserFile().

    However my attempts to use saveUserFile() won’t return true or false, it only hangs. I’m using manual_example as my basis.

    
     char testfile[3];
       testfile[0]='a';
       testfile[1]='b';
       testfile[2]='c';
       
       if(dot->saveUserFile("test.txt",testfile,3)== true)
       pc.printf("File saved successfully\r\n");    
      else
       pc.printf("File did not save successfully\r\n");
    

    Even this attempt won’t return true or false. Does anyone have a working example or can spot my error?

    Regards,
    Jaco

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.