We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
What is the proper syntax to place struct functions in specific regions? Using something like the example below appears to ignore the #pragma statement, e.g. the object code for foo::bar() is not placed in section "sram2". Using #pragma section on a block would be preferable to __at() on every function as some structs define a large number of functions. MDK version is 4.71 and target is an ARM Cortex-M4. Thanks.
#pragma arm section code = "sram2" struct foo { int bar(int x) { int ret; // Some logic return ret; } } #pragma arm section code
Forgot to use the pre tags in the example. It should look as follows: