[chbot] GCC / Codesourcery #pragma for ARM Cortex M3

Charles Manning manningc2 at actrix.gen.nz
Tue Oct 25 22:44:48 BST 2011


On Sunday 16 October 2011 08:30:55 Mark Atherton wrote:
> Dunno if anyone has the answer off the top of their head...
>
> I need tight optimization around a small code block (can be made into
> a function if need be).
>
> The main body (10k lines) has been tested without any optimization,
> so, I am loathed to change optimization for the whole system and then
> have to re-test.
>
> Anyone know of an optimization pragma I can use just for this tight piece ?
>
> I guess the other option is do-it-in-assembler, which isn't such a
> bad idea now I come to think of it. The M3 is such a lovely target...
>
> Anyway, one step at a time (just trying to think of an M3 pun, maybe
> that is it :)

Unless you really, really need to don't use pragmas. They make code 
non-portable.

How about putting the function into a separate file?




More information about the Chchrobotics mailing list