| |||||
Technical Support On-Line Manuals RL-ARM User's Guide | Sector Memory MapThis map specifies the Flash Device Sector layout. You must specify the sector size and sector base address for each Flash Sector. The RL-FlashFS does not require that specified Flash sectors be continuous. Gaps are allowed in the Device Memory space. You may freely reserve some Flash sectors for the application code. Reserved sectors are not used for storing files. Simply do not include such Flash Sectors in the FLASH_DEVICE description table. However, it is not allowed to assign part of a Sector to the RL-FlashFS and the rest of that sector for some other usage. When such a sector is erased by the RL-FlashFS, the whole sector is erased, not just part of it. Therefore, the erase process also erases the sector area assigned to some other usage. FS_FlashDev.hThe memory map is specified in the FS_FlashDev.h description header file. Every device has it's own description file. Those files are located in the \Keil\ARM\RL\FlashFS\Flash folder. To generate the FS_FlashDev.h description file, copy flash sector layout information from the Flash Device datasheet. You may also convert ULINK flash programming algorithms to be used for the RL-FlashFS. They are in the \Keil\ARM\Flash folder. Device specific files are in a subfolder with a device name. Source files used for the conversion are named FlashDev.c and FlashPrg.c respectively. You must specify a sector size in bytes and a sector base address relative to a Flash Device. Macro DFB converts this information into the RL-FlashFS compatible sector description. The following example shows a Flash Sector layout configuration description for the Am29x800BT Flash Device: #define FLASH_DEVICE \ DFB(0x10000, 0x000000), /* Sector Size 64kB */ \ DFB(0x10000, 0x010000), /* Sector Size 64kB */ \ DFB(0x10000, 0x020000), /* Sector Size 64kB */ \ DFB(0x10000, 0x030000), /* Sector Size 64kB */ \ DFB(0x10000, 0x040000), /* Sector Size 64kB */ \ DFB(0x10000, 0x050000), /* Sector Size 64kB */ \ DFB(0x10000, 0x060000), /* Sector Size 64kB */ \ DFB(0x10000, 0x070000), /* Sector Size 64kB */ \ DFB(0x10000, 0x080000), /* Sector Size 64kB */ \ DFB(0x10000, 0x090000), /* Sector Size 64kB */ \ DFB(0x10000, 0x0A0000), /* Sector Size 64kB */ \ DFB(0x10000, 0x0B0000), /* Sector Size 64kB */ \ DFB(0x10000, 0x0C0000), /* Sector Size 64kB */ \ DFB(0x10000, 0x0D0000), /* Sector Size 64kB */ \ DFB(0x04000, 0x0E0000), /* Sector Size 16kB */ \ DFB(0x08000, 0x0E4000), /* Sector Size 32kB */ \ DFB(0x02000, 0x0EC000), /* Sector Size 8kB */ \ DFB(0x02000, 0x0EE000), /* Sector Size 8kB */ \ DFB(0x02000, 0x0F0000), /* Sector Size 8kB */ \ DFB(0x02000, 0x0E2000), /* Sector Size 8kB */ \ DFB(0x08000, 0x0F4000), /* Sector Size 32kB */ \ DFB(0x04000, 0x0FC000), /* Sector Size 16kB */ \ #define FL_NSECT 22 To improve the RL-FlashFS performance, the sector information is stored as a table in the code. The RL-FlashFS scans this table when accessing files from the Flash Device. Converting FlashDev.cHere are instructions to convert existing device description files for various Flash Devices, which are used by ULINK flash programming to the RL-FlashFS. There are two macros which must be specified in this file:
If you have done everything correctly, your FS_FlashDev.h file should look like this. | ||||
| |||||