Flexible Memory Model Tutorial

Describes how to enable Flexible Memory Model in the baseport.

Before you start, you must:

The Flexible Memory Model is enabled in a baseport by modifying the variant.mmh, bld.inf, header.iby and base_<platform>.iby files. The following procedure describes the keywords to be used in different files to enable the Flexible Memory Model in the baseport.

  1. In variant.mmh file of the baseport, replace the keyword MM_MULTIPLE with MM_FLEXIBLE. The key word MM_FLEXIBLE instructs the kernel to use the flexible memory model.
    
    ...
    #define MM_FLEXIBLE

  2. In bld.inf file of the baseport, replace the option for bootstrap extension section. Change the option MEMMODEL multiple to MEMMODEL flexible. This option configures the bootstrap to initialise the system for kernel to use the Flexible memory model.
    
    ...
    #define FLEXIBLE
    

  3. In both header.iby and base_<platform>.iby files change the line of memmodel to memmodel flexible 0x100000 0x1000 -0x4000.
    ...
    memmodel flexible 0x100000 0x1000 -0x4000

  4. Add dlldatatop 0x7f000000 in both header.iby and base_<platform>.iby files. If the line dlldatatop exists, replace it with dlldatatop 0x7f000000 in both files.
    ..
    dlldatatop 0x7f000000
    If the dlldatatop entry does not exist, enter dlldatatop 0x7f000000.

  5. Build the ROM

The Flexible Memory Model is enabled in the built ROM.

Related concepts
Flexible Memory Model Guide