Contiki 2.5
asm.h
1 #ifndef __ASM_H__
2 #define __ASM_H__
3 
4 #ifdef __IAR_SYSTEMS_ASM__
5 
6  // IAR V5 Definitions.
7  #define __END__ END
8  #define __EXPORT__ EXPORT
9  #define __IMPORT__ IMPORT
10  #define __SPACE__ DS8
11  #define __EQU__(a, b) a EQU b
12  #define __WEAK__ PUBWEAK
13  #define __THUMB__ THUMB
14 
15  #if __VER__ >= 5000000
16 
17  // IAR V5 Definitions.
18  RSEG RESETINFO:DATA
19  RSEG CSTACK:DATA
20  #define __CODE__ SECTION .text:CODE:REORDER:NOROOT(2)
21  #define __BSS__ SECTION .bss:DATA:NOROOT(2)
22  #define __BEGIN_RESETINFO__(offset) SFB(RESETINFO + offset)
23  #define __END_RESETINFO__(offset) SFE(RESETINFO + offset)
24  #define __BEGIN_STACK__(offset) SFB(CSTACK + offset)
25  #define __END_STACK__(offset) SFE(CSTACK + offset)
26  #define __CFI__(x)
27 
28  #else // __VER__
29 
30  #error IAR versions less that 5.xx are not supported
31 
32  #endif // __VER__
33 
34 #endif // __IAR_SYSTEMS_ASM__
35 
36 #ifdef __GNUC__
37 
38  // GCC Definitions.
39  .syntax unified
40  .thumb
41  #define __CODE__ .text
42  #define __THUMB__ .thumb_func
43  #define __BSS__ .bss
44  #define __END__ .end
45  #define __EXPORT__ .global
46  #define __IMPORT__ .extern
47  #define __SPACE__ .space
48  #define __EQU__(a, b) .equ a, b
49  #define __WEAK__ .weak
50  #define __BEGIN_NVDATA__(offset) (_noinit + offset)
51  #define __BEGIN_STACK__(offset) (_stack + offset)
52  #define __END_STACK__(offset) (_estack + offset)
53  #define __CFI__(x)
54 
55 #endif // __GNUC__
56 
57 #endif // __ASM_H__