]> git.sur5r.net Git - freertos/blob - Demo/CORTEX_LM3S316_IAR/hw_include/asmdefs.h
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@14 1d2547de-c912-0410-9cb9...
[freertos] / Demo / CORTEX_LM3S316_IAR / hw_include / asmdefs.h
1 //*****************************************************************************\r
2 //\r
3 // asmdefs.h - Macros to allow assembly code be portable among toolchains.\r
4 //\r
5 // Copyright (c) 2005,2006 Luminary Micro, Inc.  All rights reserved.\r
6 //\r
7 // Software License Agreement\r
8 //\r
9 // Luminary Micro, Inc. (LMI) is supplying this software for use solely and\r
10 // exclusively on LMI's Stellaris Family of microcontroller products.\r
11 //\r
12 // The software is owned by LMI and/or its suppliers, and is protected under\r
13 // applicable copyright laws.  All rights are reserved.  Any use in violation\r
14 // of the foregoing restrictions may subject the user to criminal sanctions\r
15 // under applicable laws, as well as to civil liability for the breach of the\r
16 // terms and conditions of this license.\r
17 //\r
18 // THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED\r
19 // OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF\r
20 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.\r
21 // LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR\r
22 // CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.\r
23 //\r
24 // This is part of revision 635 of the Stellaris Driver Library.\r
25 //\r
26 //*****************************************************************************\r
27 \r
28 #ifndef __ASMDEFS_H__\r
29 #define __ASMDEFS_H__\r
30 \r
31 //*****************************************************************************\r
32 //\r
33 // The defines required for EW-ARM.\r
34 //\r
35 //*****************************************************************************\r
36 #ifdef ewarm\r
37 \r
38 //\r
39 // Section headers.\r
40 //\r
41 #define __TEXT__                rseg CODE:CODE(2)\r
42 #define __DATA__                rseg DATA:DATA(2)\r
43 #define __BSS__                 rseg DATA:DATA(2)\r
44 \r
45 //\r
46 // Assembler nmenonics.\r
47 //\r
48 #define __ALIGN__               alignrom 4\r
49 #define __END__                 end\r
50 #define __EXPORT__              export\r
51 #define __IMPORT__              import\r
52 #define __LABEL__\r
53 #define __STR__                 dcb\r
54 #define __THUMB_LABEL__\r
55 #define __WORD__                dcd\r
56 \r
57 #endif // ewarm\r
58 \r
59 //*****************************************************************************\r
60 //\r
61 // The defines required for GCC.\r
62 //\r
63 //*****************************************************************************\r
64 #ifdef gcc\r
65 \r
66 //\r
67 // The assembly code preamble required to put the assembler into the correct\r
68 // configuration.\r
69 //\r
70     .syntax unified\r
71     .thumb\r
72 \r
73 //\r
74 // Section headers.\r
75 //\r
76 #define __TEXT__                .text\r
77 #define __DATA__                .data\r
78 #define __BSS__                 .bss\r
79 \r
80 //\r
81 // Assembler nmenonics.\r
82 //\r
83 #define __ALIGN__               .balign 4\r
84 #define __END__                 .end\r
85 #define __EXPORT__              .globl\r
86 #define __IMPORT__              .extern\r
87 #define __LABEL__               :\r
88 #define __STR__                 .ascii\r
89 #define __THUMB_LABEL__         .thumb_func\r
90 #define __WORD__                .word\r
91 \r
92 #endif // gcc\r
93 \r
94 //*****************************************************************************\r
95 //\r
96 // The defines required for RV-MDK.\r
97 //\r
98 //*****************************************************************************\r
99 #ifdef rvmdk\r
100 \r
101 //\r
102 // The assembly code preamble required to put the assembler into the correct\r
103 // configuration.\r
104 //\r
105     thumb\r
106     require8\r
107     preserve8\r
108 \r
109 //\r
110 // Section headers.\r
111 //\r
112 #define __TEXT__                area ||.text||, code, readonly, align=2\r
113 #define __DATA__                area ||.data||, data, align=2\r
114 #define __BSS__                 area ||.bss||, noinit, align=2\r
115 \r
116 //\r
117 // Assembler nmenonics.\r
118 //\r
119 #define __ALIGN__               align 4\r
120 #define __END__                 end\r
121 #define __EXPORT__              export\r
122 #define __IMPORT__              import\r
123 #define __LABEL__\r
124 #define __STR__                 dcb\r
125 #define __THUMB_LABEL__\r
126 #define __WORD__                dcd\r
127 \r
128 #endif // rvmdk\r
129 \r
130 #endif // __ASMDEF_H__\r