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

keil m3 board read/write files in on-cip flash using RL-flash

Hi,

I have a Keil MCB1760 M3 dev board with 512K on-chip flash.
I need to write a program to read a large file from on-chip flash.

So I need to put a large file of about 146-150KB in the m3 on-chip flash and be able to read it from the program (that will grow in size and that is also in that flash. There will also be some other small log and configuration files on the flash filesystem so about 8 files total. So it seems reasonable that the flash file system needs to be 256K and leave the other 256K half for code.

I have the licensed MDK-PRO with RL-ARM so was wondering how to use RL-FLASH to do this.

I understand Is all of this done in a new "File_Config.c" that I create. Here is my attempt at the settings:


// file system
#define N_FILES 8                 // number of open files
#define CPU_CLK 60000000          // CPU clock frequency

// flash drive
#define FLO_EN 1                  // enable the flash drive support
#define FLO_BADR 0x80000000       // flash device base address. Is this right?
#define FLO_SIZE 0x40000          // number of bytes for the flash device (256K)
#define FLO_INITV 0xFF            // content of erased memory. Does this matter?
#define FLO_HFILE "FS_FlashDev.h" // flash device description file. Is this right?
#define FLO_DEF 1                 // default drive. Is it F:?

Can it be configured so the code and files do not collide?

Do I need to configure anything for the compiler or downloader or anything else?

Thanks!