mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_7_0_0/s110_nrf51822_7.0.0_API/include/nrf_svc.h@307:e2f2e83d7c41, 2014-09-05 (annotated)
- Committer:
- mbed_official
- Date:
- Fri Sep 05 10:30:06 2014 +0100
- Revision:
- 307:e2f2e83d7c41
- Parent:
- 277:0dffe5d9e928
Synchronized with git revision 449b984e4ab75299d9353830b810e7cbd5ba2820
Full URL: https://github.com/mbedmicro/mbed/commit/449b984e4ab75299d9353830b810e7cbd5ba2820/
[nrf51822][gcc_arm]: fix makefile templates and nrf_svc.h's 'impossible constraint in asm' error
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 277:0dffe5d9e928 | 1 | #ifndef NRF_SVC__ |
mbed_official | 277:0dffe5d9e928 | 2 | #define NRF_SVC__ |
mbed_official | 277:0dffe5d9e928 | 3 | |
mbed_official | 277:0dffe5d9e928 | 4 | #ifdef SVCALL_AS_NORMAL_FUNCTION |
mbed_official | 277:0dffe5d9e928 | 5 | #define SVCALL(number, return_type, signature) return_type signature |
mbed_official | 277:0dffe5d9e928 | 6 | #else |
mbed_official | 277:0dffe5d9e928 | 7 | |
mbed_official | 277:0dffe5d9e928 | 8 | #ifndef SVCALL |
mbed_official | 277:0dffe5d9e928 | 9 | #if defined (__CC_ARM) |
mbed_official | 277:0dffe5d9e928 | 10 | #define SVCALL(number, return_type, signature) return_type __svc(number) signature |
mbed_official | 277:0dffe5d9e928 | 11 | #elif defined (__GNUC__) |
mbed_official | 277:0dffe5d9e928 | 12 | #define SVCALL(number, return_type, signature) \ |
mbed_official | 277:0dffe5d9e928 | 13 | _Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \ |
mbed_official | 277:0dffe5d9e928 | 14 | _Pragma("GCC diagnostic ignored \"-Wunused-function\"") \ |
mbed_official | 277:0dffe5d9e928 | 15 | __attribute__((naked)) static return_type signature \ |
mbed_official | 277:0dffe5d9e928 | 16 | { \ |
mbed_official | 277:0dffe5d9e928 | 17 | __asm( \ |
mbed_official | 277:0dffe5d9e928 | 18 | "svc %0\n" \ |
mbed_official | 307:e2f2e83d7c41 | 19 | "bx r14" : : "I" ((uint32_t)number) : "r0" \ |
mbed_official | 277:0dffe5d9e928 | 20 | ); \ |
mbed_official | 277:0dffe5d9e928 | 21 | } |
mbed_official | 277:0dffe5d9e928 | 22 | #elif defined (__ICCARM__) |
mbed_official | 277:0dffe5d9e928 | 23 | #define PRAGMA(x) _Pragma(#x) |
mbed_official | 277:0dffe5d9e928 | 24 | #define SVCALL(number, return_type, signature) \ |
mbed_official | 277:0dffe5d9e928 | 25 | PRAGMA(swi_number = number) \ |
mbed_official | 277:0dffe5d9e928 | 26 | __swi return_type signature; |
mbed_official | 277:0dffe5d9e928 | 27 | #else |
mbed_official | 277:0dffe5d9e928 | 28 | #define SVCALL(number, return_type, signature) return_type signature |
mbed_official | 277:0dffe5d9e928 | 29 | #endif |
mbed_official | 277:0dffe5d9e928 | 30 | #endif // SVCALL |
mbed_official | 277:0dffe5d9e928 | 31 | |
mbed_official | 277:0dffe5d9e928 | 32 | #endif // SVCALL_AS_NORMAL_FUNCTION |
mbed_official | 277:0dffe5d9e928 | 33 | #endif // NRF_SVC__ |