Keil™, An ARM® Company

RL-ARM User's Guide

Using One Large Flash Device

A special configuration is required when a single Flash Device is used for storing files and application code. The code can not be executed from a Flash device while it is being programmed. For this reason, programming routines are relocated to RAM and executed within RAM while Flash is being programmed or erased. The programming routines located in module FS_FlashPrg.c are relocated at runtime and copied to RAM for execution.

In addition to a standard Flash Device configuration, the programming functions must:

  • relocate to RAM using the function attribute __ram,
  • be protected from interrupts for IRQ and FIQ interrupts. This is possible by using the function attribute __swi or relocating your IRQ interrupt handler function to RAM also. You should be careful if you are using FIQ interrupts as well.