How to specify a memory location at which function will get stored?
Can anyone please let me know what are the possible ways in which we can store a function(in C) at a fixed memory location. I am using IAR IDE for ARM cortex m3 core. How functions and data can be placed in memory is described in section "Controlling data and function placement in memory" of the IAR manual "IAR C/C++ Development Guide". The only way I see to place a specific function at a specific address is to define a section in memory where to place this and only this function. Example: void MyFunction( void ) @ "MyFunctionsSection" { ... } In the linker file you have to define the section