Требуется программист в Зеленограде
- обработка данных с датчиков; ColdFire; 40 тыс. e-mail:jobsmp@pochta.ru |
В IAR есть модификатор "__ramfunc" который указывает линкеру разместить программу в RAM.
При этом линкер пересчитывает адреса вызовов так нужно, а стартап сам переганяет в RAM то что нужно.
Вот из хелпа IAR:
Syntax
Follows the generic syntax rules for object attributes, see Object attributes.
Description
The __ramfunc keyword makes a function execute in RAM. Two code segments will be created: one for the RAM execution, and one for the ROM initialization.
If a function declared __ramfunc tries to access ROM, the compiler will issue a warning. This behavior is intended to simplify the creation of upgrade routines, for instance, rewriting parts of flash memory. If this is not why you have declared the function __ramfunc, you may safely ignore or disable these warnings.
Functions declared __ramfunc are by default stored in the segment named CODE_I.
Example
__ramfunc int FlashPage(char * data, char * page);
See also
To read more about __ramfunc declared functions in relation to breakpoints, see the ARM® IAR Embedded Workbench® IDE User Guide.