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

FlashDev / FlashPrg for STM32F107

Hello.

I'm trying to set up a MCBSTM32C to have a Flash File System using the RL-ARM FlashFS library, but i'm having a bit of trouble i hoped someone could help me sort out.

In the book "Building Applications with RL-ARM" under RL-Flash introduction, there's a section discussing how to set up a Flash-based filesystem.

It calls out for the file FS_FlashPrg.c and FS_FlashDev.h under the folder C:\KEIL\ARM\RL\FLASHFS\FLASH then a subdirectory named according to your flash or microcontroller.

Looking in that folder i have the following folders:

25F640S33
AM29x800BB
AM29x800BBx2
AM29x800BT
AM29x800BTx2
AT45DB321C
AT45DB642D
LPC_IAP_128
LPC_IAP_256
SST39x320x
STR71x
STR75x
STR91x

I'm not sure which one would correspond to the STM32F107VC... Do I have to write my own drivers for this controller? If so, is there literature i can obtain covering how to do this?

Thanks for any insight.

- Per

Parents
  • Some more information ...

    If i try to use any memory area at 0x0802 5800 or higher, the program i have will hard fault with the call stack as follows.

    HardFault_Handler()
    <0800135e()>
    fs_ReadData()
      adr <invisible>
      cnt <invisible>
      buf <invisible>
    fs_Find_File()
      fname 0x00000000
      fcb 0x20000090
      fa 0x20000b9d8
      buf 0x2000b9b4
      bl 0x00000000
      prev <invisible>
      fid 0x0000bdf7
    __fopen()
      fname 0x0800048a
      openmode <invisible>
      i <invisible>
      fid 0x2000b9b4
      handle 0x00000000
      fcb 0x20000090
      rval <invisible>
    _sys_open()
      name <invisible>
      openmode <invisible>
    <080010f2()>
    main()
    

    if i do not include any addresses above this, it behaves as such:

    ...
            fptr = fopen("F:\\test.txt", "w");
            if ( fptr != NULL )
            {
                    r= fwrite("this is a test", 1, 14, fptr);
                    r= fflush(fptr);
                    r= fclose(fptr); // the code will run to here
            }
    
            fptr = fopen("F:\\test.txt", "r" );
            if ( fptr != NULL )
            {
                    r= fread(sz, sizeof(char), 14, fptr);
                    r= fflush(fptr);
                    r= fclose(fptr); // the code will NOT run to here
            }
    

    It seems the file is not written properly in the fwrite call?

Reply
  • Some more information ...

    If i try to use any memory area at 0x0802 5800 or higher, the program i have will hard fault with the call stack as follows.

    HardFault_Handler()
    <0800135e()>
    fs_ReadData()
      adr <invisible>
      cnt <invisible>
      buf <invisible>
    fs_Find_File()
      fname 0x00000000
      fcb 0x20000090
      fa 0x20000b9d8
      buf 0x2000b9b4
      bl 0x00000000
      prev <invisible>
      fid 0x0000bdf7
    __fopen()
      fname 0x0800048a
      openmode <invisible>
      i <invisible>
      fid 0x2000b9b4
      handle 0x00000000
      fcb 0x20000090
      rval <invisible>
    _sys_open()
      name <invisible>
      openmode <invisible>
    <080010f2()>
    main()
    

    if i do not include any addresses above this, it behaves as such:

    ...
            fptr = fopen("F:\\test.txt", "w");
            if ( fptr != NULL )
            {
                    r= fwrite("this is a test", 1, 14, fptr);
                    r= fflush(fptr);
                    r= fclose(fptr); // the code will run to here
            }
    
            fptr = fopen("F:\\test.txt", "r" );
            if ( fptr != NULL )
            {
                    r= fread(sz, sizeof(char), 14, fptr);
                    r= fflush(fptr);
                    r= fclose(fptr); // the code will NOT run to here
            }
    

    It seems the file is not written properly in the fwrite call?

Children
No data