mirror of https://github.com/ARMmbed/mbed-os.git
Correct Nuvoton compiler detection logic
parent
75549754bc
commit
91afbce18a
|
@ -21,7 +21,7 @@
|
|||
#include "cmsis_nvic.h"
|
||||
|
||||
// Support linker-generated symbol as start of relocated vector table.
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
extern uint32_t Image$$ER_IRAMVEC$$ZI$$Base;
|
||||
#elif defined(__ICCARM__)
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#define NVIC_NUM_VECTORS (16 + 64)
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
# define NVIC_RAM_VECTOR_ADDRESS ((uint32_t) &Image$$ER_IRAMVEC$$ZI$$Base)
|
||||
#elif defined(__ICCARM__)
|
||||
# pragma section = "IRAMVEC"
|
||||
|
|
|
@ -47,7 +47,7 @@ void FUN(void) __attribute__ ((weak, alias(#FUN_ALIAS)));
|
|||
|
||||
|
||||
/* Initialize segments */
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Limit;
|
||||
extern void __main(void);
|
||||
#elif defined(__ICCARM__)
|
||||
|
@ -152,7 +152,7 @@ WEAK_ALIAS_FUNC(SC0_IRQHandler, Default_Handler) // 58:
|
|||
WEAK_ALIAS_FUNC(TK_IRQHandler, Default_Handler) // 63:
|
||||
|
||||
/* Vector table */
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
__attribute__ ((section("RESET")))
|
||||
const uint32_t __vector_handlers[] = {
|
||||
#elif defined(__ICCARM__)
|
||||
|
@ -164,7 +164,7 @@ const uint32_t __vector_handlers[] = {
|
|||
#endif
|
||||
|
||||
/* Configure Initial Stack Pointer, using linker-generated symbols */
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
(uint32_t) &Image$$ARM_LIB_STACK$$ZI$$Limit,
|
||||
#elif defined(__ICCARM__)
|
||||
//(uint32_t) __sfe("CSTACK"),
|
||||
|
@ -279,7 +279,7 @@ void Reset_Handler(void)
|
|||
/* Enable register write-protection function */
|
||||
SYS_LockReg();
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
__main();
|
||||
|
||||
#elif defined(__ICCARM__)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "cmsis_nvic.h"
|
||||
|
||||
// Support linker-generated symbol as start of relocated vector table.
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
extern uint32_t Image$$ER_IRAMVEC$$ZI$$Base;
|
||||
#elif defined(__ICCARM__)
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#define NVIC_USER_IRQ_NUMBER 96
|
||||
#define NVIC_NUM_VECTORS (NVIC_USER_IRQ_OFFSET + NVIC_USER_IRQ_NUMBER)
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
# define NVIC_RAM_VECTOR_ADDRESS ((uint32_t) &Image$$ER_IRAMVEC$$ZI$$Base)
|
||||
#elif defined(__ICCARM__)
|
||||
# pragma section = "IRAMVEC"
|
||||
|
|
|
@ -50,7 +50,7 @@ void FUN(void) __attribute__ ((weak, alias(#FUN_ALIAS)));
|
|||
|
||||
|
||||
/* Initialize segments */
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Limit;
|
||||
extern void __main(void);
|
||||
#elif defined(__ICCARM__)
|
||||
|
@ -190,7 +190,7 @@ WEAK_ALIAS_FUNC(SWDC_IRQHandler, Default_Handler) // 94:
|
|||
WEAK_ALIAS_FUNC(ETMC_IRQHandler, Default_Handler) // 95:
|
||||
|
||||
/* Vector table */
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
__attribute__ ((section("RESET")))
|
||||
const uint32_t __vector_handlers[] = {
|
||||
#elif defined(__ICCARM__)
|
||||
|
@ -201,7 +201,7 @@ __attribute__ ((section(".vector_table")))
|
|||
const uint32_t __vector_handlers[] = {
|
||||
#endif
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
(uint32_t) &Image$$ARM_LIB_STACK$$ZI$$Limit,
|
||||
#elif defined(__ICCARM__)
|
||||
(uint32_t) &CSTACK$$Limit,
|
||||
|
@ -339,7 +339,7 @@ const uint32_t __vector_handlers[] = {
|
|||
* C/C++ runtime initialization
|
||||
*/
|
||||
|
||||
#if defined (__CC_ARM)
|
||||
#if defined(__CC_ARM)
|
||||
|
||||
__asm static void Reset_Handler(void)
|
||||
{
|
||||
|
@ -406,7 +406,7 @@ void Reset_Handler_1(void)
|
|||
/* Enable register write-protection function */
|
||||
SYS_LockReg();
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
Reset_Handler_Cascade((void *) &Image$$ARM_LIB_STACK$$ZI$$Limit, (void *) Reset_Handler_2);
|
||||
#elif defined(__ICCARM__)
|
||||
Reset_Handler_Cascade((void *) &CSTACK$$Limit, (void *) Reset_Handler_2);
|
||||
|
@ -429,7 +429,7 @@ void Reset_Handler_2(void)
|
|||
uvisor_init();
|
||||
#endif
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
__main();
|
||||
|
||||
#elif defined(__ICCARM__)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "cmsis_nvic.h"
|
||||
|
||||
// Support linker-generated symbol as start of relocated vector table.
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
extern uint32_t Image$$ER_IRAMVEC$$ZI$$Base;
|
||||
#elif defined(__ICCARM__)
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#define NVIC_USER_IRQ_NUMBER 32
|
||||
#define NVIC_NUM_VECTORS (NVIC_USER_IRQ_OFFSET + NVIC_USER_IRQ_NUMBER)
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
# define NVIC_RAM_VECTOR_ADDRESS ((uint32_t) &Image$$ER_IRAMVEC$$ZI$$Base)
|
||||
#elif defined(__ICCARM__)
|
||||
# pragma section = "IRAMVEC"
|
||||
|
|
|
@ -45,7 +45,7 @@ void FUN(void) __attribute__ ((weak, alias(#FUN_ALIAS)));
|
|||
|
||||
|
||||
/* Initialize segments */
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Limit;
|
||||
extern void __main(void);
|
||||
#elif defined(__ICCARM__)
|
||||
|
@ -114,7 +114,7 @@ WEAK_ALIAS_FUNC(DAC_IRQHandler, Default_Handler) // DAC interrupt
|
|||
WEAK_ALIAS_FUNC(RTC_IRQHandler, Default_Handler) // Real time clock interrupt
|
||||
|
||||
/* Vector table */
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
__attribute__ ((section("RESET")))
|
||||
const uint32_t __vector_handlers[] = {
|
||||
#elif defined(__ICCARM__)
|
||||
|
@ -126,7 +126,7 @@ const uint32_t __vector_handlers[] = {
|
|||
#endif
|
||||
|
||||
/* Configure Initial Stack Pointer, using linker-generated symbols */
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
(uint32_t) &Image$$ARM_LIB_STACK$$ZI$$Limit,
|
||||
#elif defined(__ICCARM__)
|
||||
(uint32_t) &CSTACK$$Limit,
|
||||
|
@ -199,7 +199,7 @@ void Reset_Handler(void)
|
|||
/* Enable register write-protection function */
|
||||
SYS_LockReg();
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
__main();
|
||||
|
||||
#elif defined(__ICCARM__)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
// Support linker-generated symbol as start of relocated vector table.
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
extern uint32_t Image$$ER_IRAMVEC$$ZI$$Base;
|
||||
#elif defined(__ICCARM__)
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#define NVIC_NUM_VECTORS (16 + 142)
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
# define NVIC_RAM_VECTOR_ADDRESS ((uint32_t) &Image$$ER_IRAMVEC$$ZI$$Base)
|
||||
#elif defined(__ICCARM__)
|
||||
# pragma section = "IRAMVEC"
|
||||
|
|
|
@ -47,7 +47,7 @@ void FUN(void) __attribute__ ((weak, alias(#FUN_ALIAS)));
|
|||
|
||||
|
||||
/* Initialize segments */
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Limit;
|
||||
extern void __main(void);
|
||||
#elif defined(__ICCARM__)
|
||||
|
@ -232,7 +232,7 @@ WEAK_ALIAS_FUNC(CRYPTO_IRQHandler, Default_Handler) // 140: CRYPTO
|
|||
WEAK_ALIAS_FUNC(CRC_IRQHandler, Default_Handler) // 141: CRC
|
||||
|
||||
/* Vector table */
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
__attribute__ ((section("RESET")))
|
||||
const uint32_t __vector_handlers[] = {
|
||||
#elif defined(__ICCARM__)
|
||||
|
@ -244,7 +244,7 @@ const uint32_t __vector_handlers[] = {
|
|||
#endif
|
||||
|
||||
/* Configure Initial Stack Pointer, using linker-generated symbols */
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
(uint32_t) &Image$$ARM_LIB_STACK$$ZI$$Limit,
|
||||
#elif defined(__ICCARM__)
|
||||
//(uint32_t) __sfe("CSTACK"),
|
||||
|
@ -439,7 +439,7 @@ void Reset_Handler(void)
|
|||
/* Enable register write-protection function */
|
||||
SYS_LockReg();
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
__main();
|
||||
|
||||
#elif defined(__ICCARM__)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#if defined(TARGET_NUVOTON)
|
||||
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
extern uint32_t Image$$ARM_LIB_HEAP$$ZI$$Base[];
|
||||
extern uint32_t Image$$ARM_LIB_HEAP$$ZI$$Length[];
|
||||
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Base[];
|
||||
|
|
Loading…
Reference in New Issue