#include <stdint.h>\r
extern uint32_t SystemCoreClock;\r
\r
-#define configUSE_PREEMPTION 1\r
-#define configUSE_IDLE_HOOK 0\r
-#define configUSE_TICK_HOOK 0\r
-#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
-#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
-#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )\r
-#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )\r
-#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 22800 ) )\r
-#define configMAX_TASK_NAME_LEN ( 10 )\r
-#define configUSE_TRACE_FACILITY 1\r
-#define configUSE_16_BIT_TICKS 0\r
-#define configIDLE_SHOULD_YIELD 1\r
-#define configUSE_MUTEXES 1\r
-#define configQUEUE_REGISTRY_SIZE 8\r
-#define configCHECK_FOR_STACK_OVERFLOW 2\r
-#define configUSE_RECURSIVE_MUTEXES 1\r
-#define configUSE_MALLOC_FAILED_HOOK 1\r
-#define configUSE_APPLICATION_TASK_TAG 0\r
-#define configUSE_COUNTING_SEMAPHORES 1\r
-#define configGENERATE_RUN_TIME_STATS 0\r
+/* The following definition allows the startup files that ship with the IDE\r
+to be used without modification when the chip used includes the PMU CM001\r
+errata. */\r
+#define WORKAROUND_PMU_CM001 1\r
+\r
+#define configUSE_PREEMPTION 1\r
+#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1\r
+#define configUSE_IDLE_HOOK 0\r
+#define configUSE_TICK_HOOK 0\r
+#define configCPU_CLOCK_HZ ( SystemCoreClock )\r
+#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
+#define configMAX_PRIORITIES ( 5 )\r
+#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )\r
+#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 22800 ) )\r
+#define configMAX_TASK_NAME_LEN ( 10 )\r
+#define configUSE_TRACE_FACILITY 1\r
+#define configUSE_16_BIT_TICKS 0\r
+#define configIDLE_SHOULD_YIELD 1\r
+#define configUSE_MUTEXES 1\r
+#define configQUEUE_REGISTRY_SIZE 8\r
+#define configCHECK_FOR_STACK_OVERFLOW 2\r
+#define configUSE_RECURSIVE_MUTEXES 1\r
+#define configUSE_MALLOC_FAILED_HOOK 1\r
+#define configUSE_APPLICATION_TASK_TAG 0\r
+#define configUSE_COUNTING_SEMAPHORES 1\r
+#define configGENERATE_RUN_TIME_STATS 0\r
\r
/* Co-routine definitions. */\r
#define configUSE_CO_ROUTINES 0\r
/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!\r
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */\r
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )\r
- \r
+\r
/* Normal assert() semantics without relying on the provision of an assert.h\r
header file. */\r
-#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); } \r
- \r
+#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }\r
+\r
/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS\r
standard names. */\r
+#if WORKAROUND_PMU_CM001 == 1\r
+ #define xPortPendSVHandler PendSV_Handler_Veneer\r
+#else\r
+ #define xPortPendSVHandler PendSV_Handler\r
+#endif\r
#define vPortSVCHandler SVC_Handler\r
-#define xPortPendSVHandler PendSV_Handler\r
#define xPortSysTickHandler SysTick_Handler\r
\r
-\r
/* Demo application specific settings. */\r
#if UC_ID == 4502\r
/* Hardware includes. */\r
#define configCONFIGURE_LED() ( PORT3->IOCR8 = 0x00008000 )\r
/* To toggle the single LED */\r
#define configTOGGLE_LED() ( PORT3->OMR = 0x02000200 )\r
-#elif defined( PART_XMC4400 )\r
+#elif UC_ID == 4400\r
/* Hardware includes. */\r
#include "XMC4400.h"\r
#include "System_XMC4200.h"\r
#define configCONFIGURE_LED() ( PORT5->IOCR0 = 0x00800000 )\r
/* To toggle the single LED */\r
#define configTOGGLE_LED() ( PORT5->OMR = 0x00040004 )\r
-#elif defined( PART_XMC4200 )\r
+#elif UC_ID == 4206\r
/* Hardware includes. */\r
#include "XMC4200.h"\r
#include "System_XMC4200.h"\r