Declare and place your own sections
To declare new sections!ain addition to theones used by the IAR build tools!at
specific parts of your code or data, use mechanisms in the compiler and assemble
example:
/* Places a variable in your own section MyOwnSection. */
const int MyVariable @ "MyOwnSection" = 5;
name createSection
/* Create a section */
section myOwnSection:CONST
/* And fill it with constant bytes */
dcb 5, 6, 7, 8
end
To place your new section, the original place in ROM {readonly}; directive is
sufficient.
However, to place the section MyOwnSection explicitly, update the linker configuration
file with a
place in directive, for example:
/* Place MyOwnSection in the ROM region */
place in ROM {readonly section MyOwnSection};