path: root/AT91SAM7S256/Source/stdconst.h
diff options
authorNicolas Schodet2010-01-17 19:01:19 +0100
committerNicolas Schodet2010-08-20 00:18:22 +0200
commita76dd27d273424a260908c88c6b3aa5d04e898b7 (patch)
tree38d7c39cc52d4ecc8a1f8b5121fd2275f5509207 /AT91SAM7S256/Source/stdconst.h
parent39668ecb5ca8c74b8fedd75a6d80efb9d89a3f7f (diff)
gcc: add __ramfunc definition
Functions which can be executed during flash programming (this include interrupts) should not be stored in flash. They are copied to RAM at startup. Also disable jump table generation for switch statements as those are stored in .rodata section (which is in flash).
Diffstat (limited to 'AT91SAM7S256/Source/stdconst.h')
1 files changed, 4 insertions, 0 deletions
diff --git a/AT91SAM7S256/Source/stdconst.h b/AT91SAM7S256/Source/stdconst.h
index 29bf239..07ffd87 100644
--- a/AT91SAM7S256/Source/stdconst.h
+++ b/AT91SAM7S256/Source/stdconst.h
@@ -62,4 +62,8 @@ typedef char* PSZ;
#define SIZEOF_DATA(name) (sizeof (name))
+#ifdef __GNUC__
+#define __ramfunc __attribute__ ((section (".fastrun"), optimize ("no-jump-tables")))