1 //***************************************************************************** 2 // 3 // asmdefs.h - Macros to allow assembly code be portable among toolchains. 4 // 5 // Copyright (c) 2005-2020 Texas Instruments Incorporated. All rights reserved. 6 // Software License Agreement 7 // 8 // Redistribution and use in source and binary forms, with or without 9 // modification, are permitted provided that the following conditions 10 // are met: 11 // 12 // Redistributions of source code must retain the above copyright 13 // notice, this list of conditions and the following disclaimer. 14 // 15 // Redistributions in binary form must reproduce the above copyright 16 // notice, this list of conditions and the following disclaimer in the 17 // documentation and/or other materials provided with the 18 // distribution. 19 // 20 // Neither the name of Texas Instruments Incorporated nor the names of 21 // its contributors may be used to endorse or promote products derived 22 // from this software without specific prior written permission. 23 // 24 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 25 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 26 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 27 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 28 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 30 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 // 36 // This is part of revision 2.2.0.295 of the Tiva Firmware Development Package. 37 // 38 //***************************************************************************** 39 40 #ifndef __ASMDEFS_H__ 41 #define __ASMDEFS_H__ 42 43 //***************************************************************************** 44 // 45 // The defines required for code_red. 46 // 47 //***************************************************************************** 48 #ifdef codered 49 50 // 51 // The assembly code preamble required to put the assembler into the correct 52 // configuration. 53 // 54 .syntax unified 55 .thumb 56 57 // 58 // Section headers. 59 // 60 #define __LIBRARY__ @ 61 #define __TEXT__ .text 62 #define __DATA__ .data 63 #define __BSS__ .bss 64 #define __TEXT_NOROOT__ .text 65 66 // 67 // Assembler nmenonics. 68 // 69 #define __ALIGN__ .balign 4 70 #define __END__ .end 71 #define __EXPORT__ .globl 72 #define __IMPORT__ .extern 73 #define __LABEL__ : 74 #define __STR__ .ascii 75 #define __THUMB_LABEL__ .thumb_func 76 #define __WORD__ .word 77 #define __INLINE_DATA__ 78 79 #endif // codered 80 81 //***************************************************************************** 82 // 83 // The defines required for EW-ARM. 84 // 85 //***************************************************************************** 86 #ifdef ewarm 87 88 // 89 // Section headers. 90 // 91 #define __LIBRARY__ module 92 #define __TEXT__ rseg CODE:CODE(2) 93 #define __DATA__ rseg DATA:DATA(2) 94 #define __BSS__ rseg DATA:DATA(2) 95 #define __TEXT_NOROOT__ rseg CODE:CODE:NOROOT(2) 96 97 // 98 // Assembler nmenonics. 99 // 100 #define __ALIGN__ alignrom 2 101 #define __END__ end 102 #define __EXPORT__ export 103 #define __IMPORT__ import 104 #define __LABEL__ 105 #define __STR__ dcb 106 #define __THUMB_LABEL__ thumb 107 #define __WORD__ dcd 108 #define __INLINE_DATA__ data 109 110 #endif // ewarm 111 112 //***************************************************************************** 113 // 114 // The defines required for GCC. 115 // 116 //***************************************************************************** 117 #if defined(gcc) 118 119 // 120 // The assembly code preamble required to put the assembler into the correct 121 // configuration. 122 // 123 .syntax unified 124 .thumb 125 126 // 127 // Section headers. 128 // 129 #define __LIBRARY__ @ 130 #define __TEXT__ .text 131 #define __DATA__ .data 132 #define __BSS__ .bss 133 #define __TEXT_NOROOT__ .text 134 135 // 136 // Assembler nmenonics. 137 // 138 #define __ALIGN__ .balign 4 139 #define __END__ .end 140 #define __EXPORT__ .globl 141 #define __IMPORT__ .extern 142 #define __LABEL__ : 143 #define __STR__ .ascii 144 #define __THUMB_LABEL__ .thumb_func 145 #define __WORD__ .word 146 #define __INLINE_DATA__ 147 148 #endif // gcc 149 150 //***************************************************************************** 151 // 152 // The defines required for RV-MDK. 153 // 154 //***************************************************************************** 155 #ifdef rvmdk 156 157 // 158 // The assembly code preamble required to put the assembler into the correct 159 // configuration. 160 // 161 thumb 162 require8 163 preserve8 164 165 // 166 // Section headers. 167 // 168 #define __LIBRARY__ ; 169 #define __TEXT__ area ||.text||, code, readonly, align=2 170 #define __DATA__ area ||.data||, data, align=2 171 #define __BSS__ area ||.bss||, noinit, align=2 172 #define __TEXT_NOROOT__ area ||.text||, code, readonly, align=2 173 174 // 175 // Assembler nmenonics. 176 // 177 #define __ALIGN__ align 4 178 #define __END__ end 179 #define __EXPORT__ export 180 #define __IMPORT__ import 181 #define __LABEL__ 182 #define __STR__ dcb 183 #define __THUMB_LABEL__ 184 #define __WORD__ dcd 185 #define __INLINE_DATA__ 186 187 #endif // rvmdk 188 189 //***************************************************************************** 190 // 191 // The defines required for Sourcery G++. 192 // 193 //***************************************************************************** 194 #if defined(sourcerygxx) 195 196 // 197 // The assembly code preamble required to put the assembler into the correct 198 // configuration. 199 // 200 .syntax unified 201 .thumb 202 203 // 204 // Section headers. 205 // 206 #define __LIBRARY__ @ 207 #define __TEXT__ .text 208 #define __DATA__ .data 209 #define __BSS__ .bss 210 #define __TEXT_NOROOT__ .text 211 212 // 213 // Assembler nmenonics. 214 // 215 #define __ALIGN__ .balign 4 216 #define __END__ .end 217 #define __EXPORT__ .globl 218 #define __IMPORT__ .extern 219 #define __LABEL__ : 220 #define __STR__ .ascii 221 #define __THUMB_LABEL__ .thumb_func 222 #define __WORD__ .word 223 #define __INLINE_DATA__ 224 225 #endif // sourcerygxx 226 227 #endif // __ASMDEF_H__ 228