CAN I EXECUTE ARM CODE FROM RAM?
Applies to: RealView C Compiler
Information in this knowledgebase article applies to:
- RealView MDK - all versions
I need to execute a part of my program from RAM
Hardware requirements, for procedures such as In Application
Programming (IAP) of the Flash ROM.
Assuming we have 8000h bytes of RAM, starting at 40000000H, and we
want to execute about 1k of code from RAM:
Place all the code that you want to execute from RAM into its
own C module (for example "ram_code.c") and add that module to your
Subtract 0x400 (= 1k) from the size of your IRAM1, in your
Target options(Project Options for Target
Set the start address for IROM2 to your IRAM1 start address,
plus your IRAM1 size. for example
IRAM1 start = 0x40000000
IRAM1 size = 0x7C00
IROM2 start = 0x40007C00
- Set IROM2 size to 0x400.
- Click OK in the options dialog
Right-click on ram_code.c in the project workspace, and
select Options for File
Change the Code / Const: setting, under Memory
Assignment, from <> to
Request the files attached to this knowledgebase article.
Article last edited on: 2008-08-15 08:27:00
Rate this article
Disagree? Move your mouse over the bar and click