How to add external memory regions to existing projects

From SEGGER Wiki
Jump to: navigation, search

When creating new projects with the Embedded Studio project wizard most of the time the default memory regions that are available in the project only cover internal memory. The following guide will cover the use case where some board design might implement external memory like QSPI Flash or external SDRAM which you want to use in your current project as well.

How to

  1. Open an existing project for your target device or create a new project
  2. Edit the memory map file which is set in project options under Code > Linker > Memory Map File. The memory map format is explained here.
    • Should your project not have a memory map set e.g. because you created a project without CPU package or BSP template you will find the memory segments defined in project option: Code > Linker > Memory Segments
  3. If you are adding external Flash you can set the Flash loader as explained here. Already available Flash Loaders are listed in the corresponding device specific Wiki articles.
  4. Add the new memory region to your Linker script and place symbols and code sections as needed. SEGGER Linker User Manual


Booting from external memory

To be able to use the external memory from your application to either read data from it or even execute from it the external memory must be initialized during boot up. As this is chip and target application specific make sure to consult the target devices reference manual for information about the boot process. In many cases the silicon vendor will provide sources for boot scenarios from external memory.