]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/FreeRTOSConfig.h
Finalise XMC4000 GCC demos.
[freertos] / FreeRTOS / Demo / CORTEX_M4F_Infineon_XMC4000_GCC_Dave / FreeRTOSConfig.h
index 68fcedee27cf316b389c7a5b8029928a078457eb..c44fa5b600371ea5e2efb00b7b7f9464ffe1348b 100644 (file)
 #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
@@ -147,18 +153,21 @@ to all Cortex-M ports, and do not rely on any particular library functions. */
 /* !!!! 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
@@ -169,7 +178,7 @@ standard names. */
        #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
@@ -178,7 +187,7 @@ standard names. */
        #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