mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Finalise XMC4000 GCC demos.
This commit is contained in:
parent
0185643b39
commit
111283a9b2
|
@ -82,6 +82,11 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
extern uint32_t SystemCoreClock;
|
extern uint32_t SystemCoreClock;
|
||||||
|
|
||||||
|
/* The following definition allows the startup files that ship with the IDE
|
||||||
|
to be used without modification when the chip used includes the PMU CM001
|
||||||
|
errata. */
|
||||||
|
#define WORKAROUND_PMU_CM001 1
|
||||||
|
|
||||||
#define configUSE_PREEMPTION 1
|
#define configUSE_PREEMPTION 1
|
||||||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
|
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
|
||||||
#define configUSE_IDLE_HOOK 0
|
#define configUSE_IDLE_HOOK 0
|
||||||
|
@ -148,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 !!!!
|
/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
|
||||||
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
|
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
|
||||||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
|
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
|
||||||
|
|
||||||
/* Normal assert() semantics without relying on the provision of an assert.h
|
/* Normal assert() semantics without relying on the provision of an assert.h
|
||||||
header file. */
|
header file. */
|
||||||
#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }
|
#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }
|
||||||
|
|
||||||
/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
|
/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
|
||||||
standard names. */
|
standard names. */
|
||||||
|
#if WORKAROUND_PMU_CM001 == 1
|
||||||
|
#define xPortPendSVHandler PendSV_Handler_Veneer
|
||||||
|
#else
|
||||||
|
#define xPortPendSVHandler PendSV_Handler
|
||||||
|
#endif
|
||||||
#define vPortSVCHandler SVC_Handler
|
#define vPortSVCHandler SVC_Handler
|
||||||
#define xPortPendSVHandler PendSV_Handler
|
|
||||||
#define xPortSysTickHandler SysTick_Handler
|
#define xPortSysTickHandler SysTick_Handler
|
||||||
|
|
||||||
|
|
||||||
/* Demo application specific settings. */
|
/* Demo application specific settings. */
|
||||||
#if UC_ID == 4502
|
#if UC_ID == 4502
|
||||||
/* Hardware includes. */
|
/* Hardware includes. */
|
||||||
|
|
|
@ -106,7 +106,7 @@ __Xmc4200_interrupt_vector_cortex_m:
|
||||||
Entry SVC_Handler /* SVCall Handler */
|
Entry SVC_Handler /* SVCall Handler */
|
||||||
Entry DebugMon_Handler /* Debug Monitor Handler */
|
Entry DebugMon_Handler /* Debug Monitor Handler */
|
||||||
.long 0 /* Reserved */
|
.long 0 /* Reserved */
|
||||||
.long PendSV_Handler /* PendSV Handler */
|
Entry PendSV_Handler /* PendSV Handler */
|
||||||
Entry SysTick_Handler /* SysTick Handler */
|
Entry SysTick_Handler /* SysTick Handler */
|
||||||
|
|
||||||
/* Interrupt Handlers for Service Requests (SR) from XMC4200 Peripherals */
|
/* Interrupt Handlers for Service Requests (SR) from XMC4200 Peripherals */
|
||||||
|
|
|
@ -105,7 +105,7 @@ __Xmc4400_interrupt_vector_cortex_m:
|
||||||
Entry SVC_Handler /* SVCall Handler */
|
Entry SVC_Handler /* SVCall Handler */
|
||||||
Entry DebugMon_Handler /* Debug Monitor Handler */
|
Entry DebugMon_Handler /* Debug Monitor Handler */
|
||||||
.long 0 /* Reserved */
|
.long 0 /* Reserved */
|
||||||
.long PendSV_Handler /* PendSV Handler */
|
Entry PendSV_Handler /* PendSV Handler */
|
||||||
Entry SysTick_Handler /* SysTick Handler */
|
Entry SysTick_Handler /* SysTick Handler */
|
||||||
|
|
||||||
/* Interrupt Handlers for Service Requests (SR) from XMC4400 Peripherals */
|
/* Interrupt Handlers for Service Requests (SR) from XMC4400 Peripherals */
|
||||||
|
|
|
@ -118,7 +118,7 @@ __Xmc4500_interrupt_vector_cortex_m:
|
||||||
Entry SVC_Handler /* SVCall Handler */
|
Entry SVC_Handler /* SVCall Handler */
|
||||||
Entry DebugMon_Handler /* Debug Monitor Handler */
|
Entry DebugMon_Handler /* Debug Monitor Handler */
|
||||||
.long 0 /* Reserved */
|
.long 0 /* Reserved */
|
||||||
.long PendSV_Handler /* PendSV Handler */
|
Entry PendSV_Handler /* PendSV Handler */
|
||||||
Entry SysTick_Handler /* SysTick Handler */
|
Entry SysTick_Handler /* SysTick Handler */
|
||||||
|
|
||||||
/* Interrupt Handlers for Service Requests (SR) from XMC4500 Peripherals */
|
/* Interrupt Handlers for Service Requests (SR) from XMC4500 Peripherals */
|
||||||
|
|
|
@ -73,9 +73,9 @@
|
||||||
* This file implements the code that is not demo specific, including the
|
* This file implements the code that is not demo specific, including the
|
||||||
* hardware setup and FreeRTOS hook functions.
|
* hardware setup and FreeRTOS hook functions.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Additional code:
|
* Additional code:
|
||||||
*
|
*
|
||||||
* This demo does not contain a non-kernel interrupt service routine that
|
* This demo does not contain a non-kernel interrupt service routine that
|
||||||
* can be used as an example for application writers to use as a reference.
|
* can be used as an example for application writers to use as a reference.
|
||||||
* Therefore, the framework of a dummy (not installed) handler is provided
|
* Therefore, the framework of a dummy (not installed) handler is provided
|
||||||
|
@ -110,9 +110,9 @@ or 0 to run the more comprehensive test and demo application. */
|
||||||
*/
|
*/
|
||||||
static void prvSetupHardware( void );
|
static void prvSetupHardware( void );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
|
* main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
|
||||||
* main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
|
* main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
|
||||||
*/
|
*/
|
||||||
extern void main_blinky( void );
|
extern void main_blinky( void );
|
||||||
extern void main_full( void );
|
extern void main_full( void );
|
||||||
|
@ -195,7 +195,7 @@ void vApplicationStackOverflowHook( xTaskHandle pxTask, signed char *pcTaskName
|
||||||
|
|
||||||
void vApplicationTickHook( void )
|
void vApplicationTickHook( void )
|
||||||
{
|
{
|
||||||
/* This function will be called by each tick interrupt if
|
/* This function will be called by each tick interrupt if
|
||||||
configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be
|
configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be
|
||||||
added here, but the tick hook is called from an interrupt context, so
|
added here, but the tick hook is called from an interrupt context, so
|
||||||
code must not attempt to block, and only the interrupt safe FreeRTOS API
|
code must not attempt to block, and only the interrupt safe FreeRTOS API
|
||||||
|
@ -211,19 +211,19 @@ long lHigherPriorityTaskWoken = pdFALSE;
|
||||||
|
|
||||||
/* Clear the interrupt if necessary. */
|
/* Clear the interrupt if necessary. */
|
||||||
Dummy_ClearITPendingBit();
|
Dummy_ClearITPendingBit();
|
||||||
|
|
||||||
/* This interrupt does nothing more than demonstrate how to synchronise a
|
/* This interrupt does nothing more than demonstrate how to synchronise a
|
||||||
task with an interrupt. A semaphore is used for this purpose. Note
|
task with an interrupt. A semaphore is used for this purpose. Note
|
||||||
lHigherPriorityTaskWoken is initialised to zero. */
|
lHigherPriorityTaskWoken is initialised to zero. */
|
||||||
xSemaphoreGiveFromISR( xTestSemaphore, &lHigherPriorityTaskWoken );
|
xSemaphoreGiveFromISR( xTestSemaphore, &lHigherPriorityTaskWoken );
|
||||||
|
|
||||||
/* If there was a task that was blocked on the semaphore, and giving the
|
/* If there was a task that was blocked on the semaphore, and giving the
|
||||||
semaphore caused the task to unblock, and the unblocked task has a priority
|
semaphore caused the task to unblock, and the unblocked task has a priority
|
||||||
higher than the current Running state task (the task that this interrupt
|
higher than the current Running state task (the task that this interrupt
|
||||||
interrupted), then lHigherPriorityTaskWoken will have been set to pdTRUE
|
interrupted), then lHigherPriorityTaskWoken will have been set to pdTRUE
|
||||||
internally within xSemaphoreGiveFromISR(). Passing pdTRUE into the
|
internally within xSemaphoreGiveFromISR(). Passing pdTRUE into the
|
||||||
portEND_SWITCHING_ISR() macro will result in a context switch being pended to
|
portEND_SWITCHING_ISR() macro will result in a context switch being pended to
|
||||||
ensure this interrupt returns directly to the unblocked, higher priority,
|
ensure this interrupt returns directly to the unblocked, higher priority,
|
||||||
task. Passing pdFALSE into portEND_SWITCHING_ISR() has no effect. */
|
task. Passing pdFALSE into portEND_SWITCHING_ISR() has no effect. */
|
||||||
portEND_SWITCHING_ISR( lHigherPriorityTaskWoken );
|
portEND_SWITCHING_ISR( lHigherPriorityTaskWoken );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue