mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-02 20:33:49 -04:00
Check in RX231 IAR demo.
This commit is contained in:
parent
c6a4e3191e
commit
38cb08133d
33 changed files with 3674 additions and 92 deletions
|
@ -55,6 +55,7 @@
|
|||
<option id="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.isa.760685592" name="Instruction set architecture" superClass="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.isa" value="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.isa.rxv2" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.floatIns.1935378446" name="Use floating point arithmetic instructions" superClass="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.floatIns" value="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.floatIns.enable" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.optimizeLevel.1251656569" name="Optimize level" superClass="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.optimizeLevel" value="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.optimizeLevel.0" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.optimizationType.1200083822" name="Optimization type" superClass="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.optimizationType" value="com.renesas.cdt.rxc.HardwareDebug.Compiler.option.optimizationType.speed" valueType="enumerated"/>
|
||||
<inputType id="%Base.Compiler.Shc.C.Input.Id.421764231" name="C Input" superClass="%Base.Compiler.Shc.C.Input.Id"/>
|
||||
<inputType id="%Base.Compiler.Shc.C.Input1.Id.1660674237" name="C++ Input" superClass="%Base.Compiler.Shc.C.Input1.Id"/>
|
||||
</tool>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
[{000214A0-0000-0000-C000-000000000046}]
|
||||
Prop3=19,2
|
||||
[InternetShortcut]
|
||||
URL=http://www.freertos.org/RX231_RTOS_Renesas_GCC_IAR.html
|
||||
IDList=
|
|
@ -84,24 +84,14 @@
|
|||
*
|
||||
* The Queue Send Task:
|
||||
* The queue send task is implemented by the prvQueueSendTask() function in
|
||||
* this file. prvQueueSendTask() sits in a loop that causes it to repeatedly
|
||||
* block for 200 milliseconds, before sending the value 100 to the queue that
|
||||
* was created within main_blinky(). Once the value is sent, the task loops
|
||||
* back around to block for another 200 milliseconds...and so on.
|
||||
* this file. It sends the value 100 to the queue every 200 milliseconds.
|
||||
*
|
||||
* The Queue Receive Task:
|
||||
* The queue receive task is implemented by the prvQueueReceiveTask() function
|
||||
* in this file. prvQueueReceiveTask() sits in a loop where it repeatedly
|
||||
* blocks on attempts to read data from the queue that was created within
|
||||
* main_blinky(). When data is received, the task checks the value of the
|
||||
* data, and if the value equals the expected 100, toggles an LED. The 'block
|
||||
* time' parameter passed to the queue receive function specifies that the
|
||||
* task should be held in the Blocked state indefinitely to wait for data to
|
||||
* be available on the queue. The queue receive task will only leave the
|
||||
* Blocked state when the queue send task writes to the queue. As the queue
|
||||
* send task writes to the queue every 200 milliseconds, the queue receive
|
||||
* task leaves the Blocked state every 200 milliseconds, and therefore toggles
|
||||
* the LED every 200 milliseconds.
|
||||
* in this file. It blocks on the queue to wait for data to arrive from the
|
||||
* queue send task - toggling the LED each time it receives the value 100. The
|
||||
* queue send task writes to the queue every 200ms, so the LED should toggle
|
||||
* every 200ms.
|
||||
*/
|
||||
|
||||
/* Kernel includes. */
|
||||
|
@ -118,7 +108,7 @@
|
|||
|
||||
/* The rate at which data is sent to the queue. The 200ms value is converted
|
||||
to ticks using the portTICK_PERIOD_MS constant. */
|
||||
#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_PERIOD_MS )
|
||||
#define mainQUEUE_SEND_FREQUENCY_MS ( pdMS_TO_TICKS( 200UL ) )
|
||||
|
||||
/* The number of items the queue can hold. This is 1 as the receive task
|
||||
will remove items as they are added, meaning the send task should always find
|
||||
|
|
|
@ -92,6 +92,7 @@ void vInitialiseTimerForIntQueueTest( void )
|
|||
/* Ensure interrupts do not start until full configuration is complete. */
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
/* Give write access. */
|
||||
SYSTEM.PRCR.WORD = 0xa502;
|
||||
|
||||
/* Cascade two 8bit timer channels to generate the interrupts.
|
||||
|
|
|
@ -71,8 +71,8 @@
|
|||
#define INT_QUEUE_TIMER_H
|
||||
|
||||
void vInitialiseTimerForIntQueueTest( void );
|
||||
portBASE_TYPE xTimer0Handler( void );
|
||||
portBASE_TYPE xTimer1Handler( void );
|
||||
BaseType_t xTimer0Handler( void );
|
||||
BaseType_t xTimer1Handler( void );
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
*
|
||||
******************************************************************************
|
||||
*
|
||||
* main_full() creates all the demo application tasks and software timers, then
|
||||
* main_full() creates a set of demo application tasks and software timers, then
|
||||
* starts the scheduler. The web documentation provides more details of the
|
||||
* standard demo application tasks, which provide no particular functionality,
|
||||
* but do provide a good example of how to use the FreeRTOS API.
|
||||
|
@ -97,15 +97,14 @@
|
|||
* error in the context switching mechanism.
|
||||
*
|
||||
* "Check" task - The check task period is initially set to three seconds. The
|
||||
* task checks that all the standard demo tasks, and the register check tasks,
|
||||
* are not only still executing, but are executing without reporting any errors.
|
||||
* If the check task discovers that a task has either stalled, or reported an
|
||||
* error, then it changes its own execution period from the initial three
|
||||
* seconds, to just 200ms. The check task also toggles an LED each time it is
|
||||
* called. This provides a visual indication of the system status: If the LED
|
||||
* toggles every three seconds, then no issues have been discovered. If the LED
|
||||
* toggles every 200ms, then an issue has been discovered with at least one
|
||||
* task.
|
||||
* task checks that all the standard demo tasks are not only still executing,
|
||||
* but are executing without reporting any errors. If the check task discovers
|
||||
* that a task has either stalled, or reported an error, then it changes its own
|
||||
* execution period from the initial three seconds, to just 200ms. The check
|
||||
* task also toggles an LED on each iteration of its loop. This provides a
|
||||
* visual indication of the system status: If the LED toggles every three
|
||||
* seconds, then no issues have been discovered. If the LED toggles every
|
||||
* 200ms, then an issue has been discovered with at least one task.
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
|
@ -146,25 +145,18 @@
|
|||
#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3UL )
|
||||
#define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||
#define mainUART_COMMAND_CONSOLE_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3UL )
|
||||
#define mainCOM_TEST_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
||||
#define mainQUEUE_OVERWRITE_PRIORITY ( tskIDLE_PRIORITY )
|
||||
|
||||
/* The priority used by the UART command console task. */
|
||||
#define mainUART_COMMAND_CONSOLE_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )
|
||||
|
||||
/* A block time of zero simply means "don't block". */
|
||||
#define mainDONT_BLOCK ( 0UL )
|
||||
|
||||
/* The period after which the check timer will expire, in ms, provided no errors
|
||||
have been reported by any of the standard demo tasks. ms are converted to the
|
||||
equivalent in ticks using the portTICK_PERIOD_MS constant. */
|
||||
#define mainNO_ERROR_CHECK_TASK_PERIOD ( 3000UL / portTICK_PERIOD_MS )
|
||||
#define mainNO_ERROR_CHECK_TASK_PERIOD pdMS_TO_TICKS( 3000UL )
|
||||
|
||||
/* The period at which the check timer will expire, in ms, if an error has been
|
||||
reported in one of the standard demo tasks. ms are converted to the equivalent
|
||||
in ticks using the portTICK_PERIOD_MS constant. */
|
||||
#define mainERROR_CHECK_TASK_PERIOD ( 200UL / portTICK_PERIOD_MS )
|
||||
#define mainERROR_CHECK_TASK_PERIOD pdMS_TO_TICKS( 200UL )
|
||||
|
||||
/* Parameters that are passed into the register check tasks solely for the
|
||||
purpose of ensuring parameters are passed into tasks correctly. */
|
||||
|
@ -218,9 +210,6 @@ then the register check tasks have not discovered any errors. If a variable
|
|||
stops incrementing, then an error has been found. */
|
||||
volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL;
|
||||
|
||||
/* String for display in the web server. It is set to an error message if the
|
||||
check task detects an error. */
|
||||
const char *pcStatusMessage = "All tasks running without error";
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void main_full( void )
|
||||
|
@ -402,7 +391,6 @@ unsigned long ulErrorFound = pdFALSE;
|
|||
gone wrong (it might just be that the loop back connector required
|
||||
by the comtest tasks has not been fitted). */
|
||||
xDelayPeriod = mainERROR_CHECK_TASK_PERIOD;
|
||||
pcStatusMessage = "Error found in at least one task.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -410,7 +398,7 @@ unsigned long ulErrorFound = pdFALSE;
|
|||
|
||||
static void prvPseudoRandomiser( void *pvParameters )
|
||||
{
|
||||
const uint32_t ulMultiplier = 0x015a4e35UL, ulIncrement = 1UL, ulMinDelay = ( 35 / portTICK_PERIOD_MS );
|
||||
const uint32_t ulMultiplier = 0x015a4e35UL, ulIncrement = 1UL, ulMinDelay = pdMS_TO_TICKS( 35 );
|
||||
volatile uint32_t ulNextRand = ( uint32_t ) &pvParameters, ulValue;
|
||||
|
||||
/* This task does nothing other than ensure there is a little bit of
|
||||
|
|
|
@ -83,6 +83,8 @@
|
|||
* THE http://www.FreeRTOS.org WEB SITE FOR FULL INFORMATION ON USING THIS DEMO
|
||||
* APPLICATION, AND ITS ASSOCIATE FreeRTOS ARCHITECTURE PORT!
|
||||
*
|
||||
* http://www.freertos.org/RX231_RTOS_Renesas_GCC_IAR.html
|
||||
*
|
||||
*/
|
||||
|
||||
/* Scheduler include files. */
|
||||
|
@ -92,7 +94,7 @@
|
|||
|
||||
/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,
|
||||
or 0 to run the more comprehensive test and demo application. */
|
||||
#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0
|
||||
#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -120,6 +122,7 @@ void vApplicationTickHook( void );
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* See http://www.freertos.org/RX231_RTOS_Renesas_GCC_IAR.html */
|
||||
int main( void )
|
||||
{
|
||||
/* Configure the hardware ready to run the demo. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue