#include <stdint.h>\r
extern uint32_t SystemCoreClock;\r
\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
/* !!!! 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
* This file implements the code that is not demo specific, including the\r
* hardware setup and FreeRTOS hook functions.\r
*\r
- * \r
+ *\r
* Additional code:\r
- * \r
+ *\r
* This demo does not contain a non-kernel interrupt service routine that\r
* can be used as an example for application writers to use as a reference.\r
* Therefore, the framework of a dummy (not installed) handler is provided\r
*/\r
static void prvSetupHardware( void );\r
\r
-/* \r
+/*\r
* main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.\r
- * main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0. \r
+ * main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.\r
*/\r
extern void main_blinky( void );\r
extern void main_full( void );\r
\r
void vApplicationTickHook( void )\r
{\r
- /* This function will be called by each tick interrupt if \r
+ /* This function will be called by each tick interrupt if\r
configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be\r
added here, but the tick hook is called from an interrupt context, so\r
code must not attempt to block, and only the interrupt safe FreeRTOS API\r
\r
/* Clear the interrupt if necessary. */\r
Dummy_ClearITPendingBit();\r
- \r
+\r
/* This interrupt does nothing more than demonstrate how to synchronise a\r
task with an interrupt. A semaphore is used for this purpose. Note\r
lHigherPriorityTaskWoken is initialised to zero. */\r
xSemaphoreGiveFromISR( xTestSemaphore, &lHigherPriorityTaskWoken );\r
- \r
+\r
/* If there was a task that was blocked on the semaphore, and giving the\r
semaphore caused the task to unblock, and the unblocked task has a priority\r
higher than the current Running state task (the task that this interrupt\r
interrupted), then lHigherPriorityTaskWoken will have been set to pdTRUE\r
- internally within xSemaphoreGiveFromISR(). Passing pdTRUE into the \r
+ internally within xSemaphoreGiveFromISR(). Passing pdTRUE into the\r
portEND_SWITCHING_ISR() macro will result in a context switch being pended to\r
- ensure this interrupt returns directly to the unblocked, higher priority, \r
+ ensure this interrupt returns directly to the unblocked, higher priority,\r
task. Passing pdFALSE into portEND_SWITCHING_ISR() has no effect. */\r
portEND_SWITCHING_ISR( lHigherPriorityTaskWoken );\r
}\r