How to place a function in RAM
Revision as of 11:45, 21 August 2018 by Alex (talk | contribs) (Alex moved page How to copy ROM sections into RAM sections during run time to How to place a function in RAM)
In some instances it is beneficial to run certain code parts in RAM instead of ROM. For this e.g. a function from ROM needs to be copied at some point into RAM for later usage. The following article will explain how this can be accomplished using Embedded Studio.
In order to put a function into RAM, it needs to be placed into the .fast section. This is done as follows:
__attribute__ ((section(".fast"))) // Place the following function in RAM void _Delay(void) { }