This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTL: Flash File System

Hi

I'm using flash device.

Configuration:
Sector size 256 byte.

The fuction ffree() returns always 0 byte.

Is this possible?

Parents
  • Hi Mikhail

    I'm sure the problem is the configuration. I had the same problem.

    Make sure <read/write area> (--> set in <options for target>)
    and
    <target device base address> (--> set in the file <file_config.c>)
    do not overlap each other.

    Example for my ARM:

    <read/write area> (--> set in <options for target>):
    Start=0x200000, Size=0x8000
    
    <target device base address>  (--> set in the file <file_config.c>):
    Target base address=0x208000
    Device size in bytes=0x8000
    

    Ckeck it and let me know about your memory layout. Best regards Stefan

Reply
  • Hi Mikhail

    I'm sure the problem is the configuration. I had the same problem.

    Make sure <read/write area> (--> set in <options for target>)
    and
    <target device base address> (--> set in the file <file_config.c>)
    do not overlap each other.

    Example for my ARM:

    <read/write area> (--> set in <options for target>):
    Start=0x200000, Size=0x8000
    
    <target device base address>  (--> set in the file <file_config.c>):
    Target base address=0x208000
    Device size in bytes=0x8000
    

    Ckeck it and let me know about your memory layout. Best regards Stefan

Children
  • Hi Stefan,
    my configuration:

    Read/Write Memory Areas
    on-chip:
    IRAM1 Start:0x4000000 Size:0x8000
    
    In the file "AFS_Config.c":
    #define RAM_DEV     1
    #define RAM_BADR    0x04008000
    #define RAM_SIZE    0x010000
    #define RAM_NSECT   8
    

    as you can see, there is no overlap. Stefan, are your test project work in simulator? Mikhail

  • Hi Mikhail

    Yes, application with RAM drive works on target and in simualtor.

    Have you tryed with smal RAM size configuartion yet?
    How is the memory layout of your ARM?

    Stefan

  • Hi Stefan,

    Memory layout for the STR912FW44 is:

    ROM bank0 0x0 0x7FFFF (size 0x80000)
    ROM bank1 0x80000 0x87FFF (size 0x8000)
    RAM 0x4000000 0x4017FFF (size 0x18000)
    

    Stefan, can you send me your test project with file system, so I can try it on simulator and compare with my project. Do not send lib files, just zip up your project with simple main() that you already post here. My address: mikhail.sokolov@baselineindustries.com

    thanks
    Mikhail