RL-ARM User's Guide

Sector Layout

The Sector Layout description file, FS_FlashDev.h, specifies the memory map of the device. Every device has its own description file located in the folder \ARM\RL\FlashFS\Flash\device_family.

To generate a new description file, copy the flash sector layout information from the Flash device datasheet. Specify a sector size in bytes and a sector base address relative to a Flash device start address. The macro DFB converts this information into RL-FlashFS compatible sector descriptions.

  • Flash sectors must not be aligned continuously. Gaps are allowed in the device memory space.
  • Flash sectors can be reserved for application code. Do not include such sectors in the FLASH_DEVICE description table.

The following example shows a Flash sector layout 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

Note

  • When the Flash device is also used for other purposes than storing files, do not provide the function EraseChip in the Flash driver.
  • An alternative to writing a new sector layout is to convert the device specification provided for ULINK adapters. Refer to Converting FlashDev.c for detailed instructions.