2011-09-20 17:35:01     mmap() of file on vfat spi MMC card - possible?

Document created by Aaronwu Employee on Aug 28, 2013
Version 1Show Document
  • View in full screen mode

2011-09-20 17:35:01     mmap() of file on vfat spi MMC card - possible?

Timothy Stotts (UNITED STATES)

Message: 103467   

 

I have a 128 Kbyte file on a vfat file system on an MMC card connected to a BF-537E via SPI. The file system works correctly: I can read and write data with fread() and fwrite().

 

Is it possible to open a file on this file system and map it directly into RAM for read/write with open() and then mmap()? Or is this not possible with a file system residing over SPI?

 

The accessing processes crashes with an error:

 

llegal use of supervisor resource

<5> - Attempted to use a Supervisor register or instruction from User mode.

<5>   Supervisor resources are registers and instructions that are reserved

<5>   for Supervisor use: Supervisor only registers, all MMRs, and Supervisor

<5>   only instructions.

QuoteReplyEditDelete

 

 

2011-09-20 23:21:59     Re: mmap() of file on vfat spi MMC card - possible?

Aaron Wu (CHINA)

Message: 103469   

 

Could you share me your test App code to have a try on my side. And what's the software version you are using?

QuoteReplyEditDelete

 

 

2011-10-19 15:55:10     Re: mmap() of file on vfat spi MMC card - possible?

Timothy Stotts (UNITED STATES)

Message: 103996   

 

I found comments on a mailing list from a kernel developer that the Linux kernel does not support memory-mapping blocks over serial connections.

QuoteReplyEditDelete

 

 

2011-10-21 03:19:58     Re: mmap() of file on vfat spi MMC card - possible?

Aaron Wu (CHINA)

Message: 104054   

 

Have you found out where it fails. The mmap happens on the VFS of block layer so should be irrelavant with the detailed hardware storage.

Attachments

    Outcomes