10 years, 10 months ago.

MSCFileSystem Conflict with the May 2013 mbed build

I tried to compile the MSCFileSystem application with the May 2013 mbed build. I get several errors like this:

" The virtual function elimination information for i.disk_ioctl(diskio.cpp.lpc1768.arm.o) incorrectly indicates that section .constdataZTV13MSCFileSystem(MSCFileSystem.cpp.LPC1768.o), offset 64 is a relocation (to a virtual function or RTTI), but there is no relocation at that offset." in file "/"

Is there an update? Thanks. P.S. the MSCFileSystem used to work with an older build of the mbd!

2 Answers

10 years, 10 months ago.

Which code are you using? (Easiest is to publish it, then when people import it they also have the same libraries). A very quick test still compiles for me.

Otherwise you can also have a look at the new USBHost MSD library: http://mbed.org/handbook/USBHostMSD

ah shabon
poster
10 years, 10 months ago.

I use the mbed application board with the following program I imported from the application board page. It works fine as an imported app. When I create my own program and insert the MSCFile... code, the compiler gives me the above error messages.

http://mbed.org/cookbook/mbed-application-board

mbed-App-USBFlash - main.cpp

  1. include "mbed.h"
  2. include "MSCFileSystem.h"

MSCFileSystem fs("fs"); DigitalOut led(LED1); AnalogIn pot1(p19);

int main() { FILE *fp = fopen("/fs/test.csv","w"); printf("Create filehandle for test.csv\n");

printf("Writing to file\n"); for (int i=0; i<100; i++) { fprintf(fp,"%.2f\n",pot1.read()); wait(0.05); led=!led; }

fclose(fp); printf("Close the handle\n"); led=1; }

Quick test, the issue doesn't seem to be the MSCFileSystem, but the FatFileSystem that is also required (and for some reason not included in the MSCFileSystem library). No idea why it doesn't work, but if you delete the FatFileSystem library, and then import Igor's FatFileSystemCpp it compiles.

posted by Erik - 07 Jun 2013