2 FreeRTOS V7.4.1 - Copyright (C) 2013 Real Time Engineers Ltd.
\r
4 FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT
\r
5 http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
\r
7 ***************************************************************************
\r
9 * FreeRTOS tutorial books are available in pdf and paperback. *
\r
10 * Complete, revised, and edited pdf reference manuals are also *
\r
13 * Purchasing FreeRTOS documentation will not only help you, by *
\r
14 * ensuring you get running as quickly as possible and with an *
\r
15 * in-depth knowledge of how to use FreeRTOS, it will also help *
\r
16 * the FreeRTOS project to continue with its mission of providing *
\r
17 * professional grade, cross platform, de facto standard solutions *
\r
18 * for microcontrollers - completely free of charge! *
\r
20 * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
\r
22 * Thank you for using FreeRTOS, and thank you for your support! *
\r
24 ***************************************************************************
\r
27 This file is part of the FreeRTOS distribution.
\r
29 FreeRTOS is free software; you can redistribute it and/or modify it under
\r
30 the terms of the GNU General Public License (version 2) as published by the
\r
31 Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
\r
33 >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to
\r
34 distribute a combined work that includes FreeRTOS without being obliged to
\r
35 provide the source code for proprietary components outside of the FreeRTOS
\r
38 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
\r
39 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
\r
40 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
\r
41 details. You should have received a copy of the GNU General Public License
\r
42 and the FreeRTOS license exception along with FreeRTOS; if not it can be
\r
43 viewed here: http://www.freertos.org/a00114.html and also obtained by
\r
44 writing to Real Time Engineers Ltd., contact details for whom are available
\r
45 on the FreeRTOS WEB site.
\r
49 ***************************************************************************
\r
51 * Having a problem? Start by reading the FAQ "My application does *
\r
52 * not run, what could be wrong?" *
\r
54 * http://www.FreeRTOS.org/FAQHelp.html *
\r
56 ***************************************************************************
\r
59 http://www.FreeRTOS.org - Documentation, books, training, latest versions,
\r
60 license and Real Time Engineers Ltd. contact details.
\r
62 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
\r
63 including FreeRTOS+Trace - an indispensable productivity tool, and our new
\r
64 fully thread aware and reentrant UDP/IP stack.
\r
66 http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
\r
67 Integrity Systems, who sell the code with commercial support,
\r
68 indemnification and middleware, under the OpenRTOS brand.
\r
70 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
\r
71 engineered and independently SIL3 certified version for use in safety and
\r
72 mission critical applications that require provable dependability.
\r
75 /******************************************************************************
\r
76 * NOTE 1: This project provides two demo applications. A simple blinky style
\r
77 * project, and a more comprehensive test and demo application. The
\r
78 * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select
\r
79 * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY
\r
80 * in main.c. This file implements the comprehensive test and demo version.
\r
82 * NOTE 2: This file only contains the source code that is specific to the
\r
83 * full demo. Generic functions, such FreeRTOS hook functions, and functions
\r
84 * required to configure the hardware, are defined in main.c.
\r
85 ******************************************************************************
\r
87 * main_full() creates all the demo application tasks and a software timer, then
\r
88 * starts the scheduler. The web documentation provides more details of the
\r
89 * standard demo application tasks, which provide no particular functionality,
\r
90 * but do provide a good example of how to use the FreeRTOS API.
\r
92 * In addition to the standard demo tasks, the following tasks and tests are
\r
93 * defined and/or created within this file:
\r
95 * "Reg test" tasks - These fill both the core and floating point registers with
\r
96 * known values, then check that each register maintains its expected value for
\r
97 * the lifetime of the task. Each task uses a different set of values. The reg
\r
98 * test tasks execute with a very low priority, so get preempted very
\r
99 * frequently. A register containing an unexpected value is indicative of an
\r
100 * error in the context switching mechanism.
\r
102 * "Check" timer - The check software timer period is initially set to three
\r
103 * seconds. The callback function associated with the check software timer
\r
104 * checks that all the standard demo tasks, and the register check tasks, are
\r
105 * not only still executing, but are executing without reporting any errors. If
\r
106 * the check software timer discovers that a task has either stalled, or
\r
107 * reported an error, then it changes its own execution period from the initial
\r
108 * three seconds, to just 200ms. The check software timer callback function
\r
109 * also toggles the single LED each time it is called. This provides a visual
\r
110 * indication of the system status: If the LED toggles every three seconds,
\r
111 * then no issues have been discovered. If the LED toggles every 200ms, then
\r
112 * an issue has been discovered with at least one task.
\r
115 /* Standard includes. */
\r
118 /* Kernel includes. */
\r
119 #include "FreeRTOS.h"
\r
121 #include "timers.h"
\r
122 #include "semphr.h"
\r
124 /* Standard demo application includes. */
\r
126 #include "integer.h"
\r
128 #include "semtest.h"
\r
129 #include "dynamic.h"
\r
130 #include "BlockQ.h"
\r
131 #include "blocktim.h"
\r
132 #include "countsem.h"
\r
133 #include "GenQTest.h"
\r
134 #include "recmutex.h"
\r
137 /* Hardware includes. */
\r
138 #include "XMC4500.h"
\r
139 #include "System_XMC4500.h"
\r
141 /* Priorities for the demo application tasks. */
\r
142 #define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2UL )
\r
143 #define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1UL )
\r
144 #define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2UL )
\r
145 #define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3UL )
\r
146 #define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY )
\r
148 /* To toggle the single LED */
\r
149 #define mainTOGGLE_LED() ( PORT3->OMR = 0x02000200 )
\r
151 /* A block time of zero simply means "don't block". */
\r
152 #define mainDONT_BLOCK ( 0UL )
\r
154 /* The period after which the check timer will expire, in ms, provided no errors
\r
155 have been reported by any of the standard demo tasks. ms are converted to the
\r
156 equivalent in ticks using the portTICK_RATE_MS constant. */
\r
157 #define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )
\r
159 /* The period at which the check timer will expire, in ms, if an error has been
\r
160 reported in one of the standard demo tasks. ms are converted to the equivalent
\r
161 in ticks using the portTICK_RATE_MS constant. */
\r
162 #define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )
\r
164 /*-----------------------------------------------------------*/
\r
167 * The check timer callback function, as described at the top of this file.
\r
169 static void prvCheckTimerCallback( xTimerHandle xTimer );
\r
172 * Register check tasks, and the tasks used to write over and check the contents
\r
173 * of the FPU registers, as described at the top of this file. The nature of
\r
174 * these files necessitates that they are written in an assembly file.
\r
176 static void vRegTest1Task( void *pvParameters ) __attribute__((naked));
\r
177 static void vRegTest2Task( void *pvParameters ) __attribute__((naked));
\r
179 /*-----------------------------------------------------------*/
\r
181 /* The following two variables are used to communicate the status of the
\r
182 register check tasks to the check software timer. If the variables keep
\r
183 incrementing, then the register check tasks has not discovered any errors. If
\r
184 a variable stops incrementing, then an error has been found. */
\r
185 volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL;
\r
187 /*-----------------------------------------------------------*/
\r
189 void main_full( void )
\r
191 xTimerHandle xCheckTimer = NULL;
\r
193 /* Start all the other standard demo/test tasks. The have not particular
\r
194 functionality, but do demonstrate how to use the FreeRTOS API and test the
\r
196 vStartIntegerMathTasks( tskIDLE_PRIORITY );
\r
197 vStartDynamicPriorityTasks();
\r
198 vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
\r
199 vCreateBlockTimeTasks();
\r
200 vStartCountingSemaphoreTasks();
\r
201 vStartGenericQueueTasks( tskIDLE_PRIORITY );
\r
202 vStartRecursiveMutexTasks();
\r
203 vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
\r
204 vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
\r
205 vStartMathTasks( mainFLOP_TASK_PRIORITY );
\r
207 /* Create the register check tasks, as described at the top of this
\r
209 xTaskCreate( vRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL );
\r
210 xTaskCreate( vRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL );
\r
212 /* Create the software timer that performs the 'check' functionality,
\r
213 as described at the top of this file. */
\r
214 xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */
\r
215 ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */
\r
216 pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */
\r
217 ( void * ) 0, /* The ID is not used, so can be set to anything. */
\r
218 prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */
\r
221 if( xCheckTimer != NULL )
\r
223 xTimerStart( xCheckTimer, mainDONT_BLOCK );
\r
226 /* The set of tasks created by the following function call have to be
\r
227 created last as they keep account of the number of tasks they expect to see
\r
229 vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
\r
231 /* Start the scheduler. */
\r
232 vTaskStartScheduler();
\r
234 /* If all is well, the scheduler will now be running, and the following line
\r
235 will never be reached. If the following line does execute, then there was
\r
236 insufficient FreeRTOS heap memory available for the idle and/or timer tasks
\r
237 to be created. See the memory management section on the FreeRTOS web site
\r
238 for more details. */
\r
241 /*-----------------------------------------------------------*/
\r
243 static void prvCheckTimerCallback( xTimerHandle xTimer )
\r
245 static long lChangedTimerPeriodAlready = pdFALSE;
\r
246 static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;
\r
247 unsigned long ulErrorFound = pdFALSE;
\r
249 /* Check all the demo tasks (other than the flash tasks) to ensure
\r
250 that they are all still running, and that none have detected an error. */
\r
252 if( xAreMathsTaskStillRunning() != pdTRUE )
\r
254 ulErrorFound = pdTRUE;
\r
257 if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
\r
259 ulErrorFound = pdTRUE;
\r
262 if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
\r
264 ulErrorFound = pdTRUE;
\r
267 if( xAreBlockingQueuesStillRunning() != pdTRUE )
\r
269 ulErrorFound = pdTRUE;
\r
272 if ( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
\r
274 ulErrorFound = pdTRUE;
\r
277 if ( xAreGenericQueueTasksStillRunning() != pdTRUE )
\r
279 ulErrorFound = pdTRUE;
\r
282 if ( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
\r
284 ulErrorFound = pdTRUE;
\r
287 if( xIsCreateTaskStillRunning() != pdTRUE )
\r
289 ulErrorFound = pdTRUE;
\r
292 if( xArePollingQueuesStillRunning() != pdTRUE )
\r
294 ulErrorFound = pdTRUE;
\r
297 if( xAreSemaphoreTasksStillRunning() != pdTRUE )
\r
299 ulErrorFound = pdTRUE;
\r
302 /* Check that the register test 1 task is still running. */
\r
303 if( ulLastRegTest1Value == ulRegTest1LoopCounter )
\r
305 ulErrorFound = pdTRUE;
\r
307 ulLastRegTest1Value = ulRegTest1LoopCounter;
\r
309 /* Check that the register test 2 task is still running. */
\r
310 if( ulLastRegTest2Value == ulRegTest2LoopCounter )
\r
312 ulErrorFound = pdTRUE;
\r
314 ulLastRegTest2Value = ulRegTest2LoopCounter;
\r
316 /* Toggle the check LED to give an indication of the system status. If
\r
317 the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then
\r
318 everything is ok. A faster toggle indicates an error. */
\r
321 /* Have any errors been latch in ulErrorFound? If so, shorten the
\r
322 period of the check timer to mainERROR_CHECK_TIMER_PERIOD_MS milliseconds.
\r
323 This will result in an increase in the rate at which mainCHECK_LED
\r
325 if( ulErrorFound != pdFALSE )
\r
327 if( lChangedTimerPeriodAlready == pdFALSE )
\r
329 lChangedTimerPeriodAlready = pdTRUE;
\r
331 /* This call to xTimerChangePeriod() uses a zero block time.
\r
332 Functions called from inside of a timer callback function must
\r
333 *never* attempt to block. */
\r
334 xTimerChangePeriod( xTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK );
\r
338 /*-----------------------------------------------------------*/
\r
340 /* This is a naked function. */
\r
341 static void vRegTest1Task( void *pvParameters )
\r
345 " /* Fill the core registers with known values. */ \n"
\r
356 " mov r10, #110 \n"
\r
357 " mov r11, #111 \n"
\r
358 " mov r12, #112 \n"
\r
360 " /* Fill the VFP registers with known values. */ \n"
\r
361 " vmov d0, r0, r1 \n"
\r
362 " vmov d1, r2, r3 \n"
\r
363 " vmov d2, r4, r5 \n"
\r
364 " vmov d3, r6, r7 \n"
\r
365 " vmov d4, r8, r9 \n"
\r
366 " vmov d5, r10, r11 \n"
\r
367 " vmov d6, r0, r1 \n"
\r
368 " vmov d7, r2, r3 \n"
\r
369 " vmov d8, r4, r5 \n"
\r
370 " vmov d9, r6, r7 \n"
\r
371 " vmov d10, r8, r9 \n"
\r
372 " vmov d11, r10, r11 \n"
\r
373 " vmov d12, r0, r1 \n"
\r
374 " vmov d13, r2, r3 \n"
\r
375 " vmov d14, r4, r5 \n"
\r
376 " vmov d15, r6, r7 \n"
\r
379 " /* Check all the VFP registers still contain the values set above.\n"
\r
380 " First save registers that are clobbered by the test. */ \n"
\r
381 " push { r0-r1 } \n"
\r
383 " vmov r0, r1, d0 \n"
\r
385 " bne reg1_error_loopf \n"
\r
387 " bne reg1_error_loopf \n"
\r
388 " vmov r0, r1, d1 \n"
\r
390 " bne reg1_error_loopf \n"
\r
392 " bne reg1_error_loopf \n"
\r
393 " vmov r0, r1, d2 \n"
\r
395 " bne reg1_error_loopf \n"
\r
397 " bne reg1_error_loopf \n"
\r
398 " vmov r0, r1, d3 \n"
\r
400 " bne reg1_error_loopf \n"
\r
402 " bne reg1_error_loopf \n"
\r
403 " vmov r0, r1, d4 \n"
\r
405 " bne reg1_error_loopf \n"
\r
407 " bne reg1_error_loopf \n"
\r
408 " vmov r0, r1, d5 \n"
\r
410 " bne reg1_error_loopf \n"
\r
412 " bne reg1_error_loopf \n"
\r
413 " vmov r0, r1, d6 \n"
\r
415 " bne reg1_error_loopf \n"
\r
417 " bne reg1_error_loopf \n"
\r
418 " vmov r0, r1, d7 \n"
\r
420 " bne reg1_error_loopf \n"
\r
422 " bne reg1_error_loopf \n"
\r
423 " vmov r0, r1, d8 \n"
\r
425 " bne reg1_error_loopf \n"
\r
427 " bne reg1_error_loopf \n"
\r
428 " vmov r0, r1, d9 \n"
\r
430 " bne reg1_error_loopf \n"
\r
432 " bne reg1_error_loopf \n"
\r
433 " vmov r0, r1, d10 \n"
\r
435 " bne reg1_error_loopf \n"
\r
437 " bne reg1_error_loopf \n"
\r
438 " vmov r0, r1, d11 \n"
\r
440 " bne reg1_error_loopf \n"
\r
442 " bne reg1_error_loopf \n"
\r
443 " vmov r0, r1, d12 \n"
\r
445 " bne reg1_error_loopf \n"
\r
447 " bne reg1_error_loopf \n"
\r
448 " vmov r0, r1, d13 \n"
\r
450 " bne reg1_error_loopf \n"
\r
452 " bne reg1_error_loopf \n"
\r
453 " vmov r0, r1, d14 \n"
\r
455 " bne reg1_error_loopf \n"
\r
457 " bne reg1_error_loopf \n"
\r
458 " vmov r0, r1, d15 \n"
\r
460 " bne reg1_error_loopf \n"
\r
462 " bne reg1_error_loopf \n"
\r
464 " /* Restore the registers that were clobbered by the test. */\n"
\r
467 " /* VFP register test passed. Jump to the core register test. */\n"
\r
468 " b reg1_loopf_pass \n"
\r
470 "reg1_error_loopf: \n"
\r
471 " /* If this line is hit then a VFP register value was found to be\n"
\r
472 " incorrect. */ \n"
\r
473 " b reg1_error_loopf \n"
\r
475 "reg1_loopf_pass: \n"
\r
478 " bne reg1_error_loop \n"
\r
480 " bne reg1_error_loop \n"
\r
482 " bne reg1_error_loop \n"
\r
484 " bne reg1_error_loop \n"
\r
486 " bne reg1_error_loop \n"
\r
488 " bne reg1_error_loop \n"
\r
490 " bne reg1_error_loop \n"
\r
492 " bne reg1_error_loop \n"
\r
494 " bne reg1_error_loop \n"
\r
496 " bne reg1_error_loop \n"
\r
497 " cmp r10, #110 \n"
\r
498 " bne reg1_error_loop \n"
\r
499 " cmp r11, #111 \n"
\r
500 " bne reg1_error_loop \n"
\r
501 " cmp r12, #112 \n"
\r
502 " bne reg1_error_loop \n"
\r
504 " /* Everything passed, increment the loop counter. */ \n"
\r
505 " push { r0-r1 } \n"
\r
506 " ldr r0, =ulRegTest1LoopCounter \n"
\r
508 " adds r1, r1, #1 \n"
\r
510 " pop { r0-r1 } \n"
\r
512 " /* Start again. */ \n"
\r
515 "reg1_error_loop: \n"
\r
516 " /* If this line is hit then there was an error in a core register value.\n"
\r
517 " The loop ensures the loop counter stops incrementing. */\n"
\r
518 " b reg1_error_loop \n"
\r
522 /*-----------------------------------------------------------*/
\r
524 /* This is a naked function. */
\r
525 static void vRegTest2Task( void *pvParameters )
\r
529 " /* Set all the core registers to known values. */ \n"
\r
544 " /* Set all the VFP to known values. */ \n"
\r
545 " vmov d0, r0, r1 \n"
\r
546 " vmov d1, r2, r3 \n"
\r
547 " vmov d2, r4, r5 \n"
\r
548 " vmov d3, r6, r7 \n"
\r
549 " vmov d4, r8, r9 \n"
\r
550 " vmov d5, r10, r11 \n"
\r
551 " vmov d6, r0, r1 \n"
\r
552 " vmov d7, r2, r3 \n"
\r
553 " vmov d8, r4, r5 \n"
\r
554 " vmov d9, r6, r7 \n"
\r
555 " vmov d10, r8, r9 \n"
\r
556 " vmov d11, r10, r11 \n"
\r
557 " vmov d12, r0, r1 \n"
\r
558 " vmov d13, r2, r3 \n"
\r
559 " vmov d14, r4, r5 \n"
\r
560 " vmov d15, r6, r7 \n"
\r
564 " /* Check all the VFP registers still contain the values set above.\n"
\r
565 " First save registers that are clobbered by the test. */ \n"
\r
566 " push { r0-r1 } \n"
\r
568 " vmov r0, r1, d0 \n"
\r
570 " bne reg2_error_loopf \n"
\r
572 " bne reg2_error_loopf \n"
\r
573 " vmov r0, r1, d1 \n"
\r
575 " bne reg2_error_loopf \n"
\r
577 " bne reg2_error_loopf \n"
\r
578 " vmov r0, r1, d2 \n"
\r
580 " bne reg2_error_loopf \n"
\r
582 " bne reg2_error_loopf \n"
\r
583 " vmov r0, r1, d3 \n"
\r
585 " bne reg2_error_loopf \n"
\r
587 " bne reg2_error_loopf \n"
\r
588 " vmov r0, r1, d4 \n"
\r
590 " bne reg2_error_loopf \n"
\r
592 " bne reg2_error_loopf \n"
\r
593 " vmov r0, r1, d5 \n"
\r
595 " bne reg2_error_loopf \n"
\r
597 " bne reg2_error_loopf \n"
\r
598 " vmov r0, r1, d6 \n"
\r
600 " bne reg2_error_loopf \n"
\r
602 " bne reg2_error_loopf \n"
\r
603 " vmov r0, r1, d7 \n"
\r
605 " bne reg2_error_loopf \n"
\r
607 " bne reg2_error_loopf \n"
\r
608 " vmov r0, r1, d8 \n"
\r
610 " bne reg2_error_loopf \n"
\r
612 " bne reg2_error_loopf \n"
\r
613 " vmov r0, r1, d9 \n"
\r
615 " bne reg2_error_loopf \n"
\r
617 " bne reg2_error_loopf \n"
\r
618 " vmov r0, r1, d10 \n"
\r
620 " bne reg2_error_loopf \n"
\r
622 " bne reg2_error_loopf \n"
\r
623 " vmov r0, r1, d11 \n"
\r
625 " bne reg2_error_loopf \n"
\r
627 " bne reg2_error_loopf \n"
\r
628 " vmov r0, r1, d12 \n"
\r
630 " bne reg2_error_loopf \n"
\r
632 " bne reg2_error_loopf \n"
\r
633 " vmov r0, r1, d13 \n"
\r
635 " bne reg2_error_loopf \n"
\r
637 " bne reg2_error_loopf \n"
\r
638 " vmov r0, r1, d14 \n"
\r
640 " bne reg2_error_loopf \n"
\r
642 " bne reg2_error_loopf \n"
\r
643 " vmov r0, r1, d15 \n"
\r
645 " bne reg2_error_loopf \n"
\r
647 " bne reg2_error_loopf \n"
\r
649 " /* Restore the registers that were clobbered by the test. */\n"
\r
652 " /* VFP register test passed. Jump to the core register test. */\n"
\r
653 " b reg2_loopf_pass \n"
\r
655 "reg2_error_loopf: \n"
\r
656 " /* If this line is hit then a VFP register value was found to be\n"
\r
657 " incorrect. */ \n"
\r
658 " b reg2_error_loopf \n"
\r
660 "reg2_loopf_pass: \n"
\r
663 " bne reg2_error_loop \n"
\r
665 " bne reg2_error_loop \n"
\r
667 " bne reg2_error_loop \n"
\r
669 " bne reg2_error_loop \n"
\r
671 " bne reg2_error_loop \n"
\r
673 " bne reg2_error_loop \n"
\r
675 " bne reg2_error_loop \n"
\r
677 " bne reg2_error_loop \n"
\r
679 " bne reg2_error_loop \n"
\r
681 " bne reg2_error_loop \n"
\r
683 " bne reg2_error_loop \n"
\r
685 " bne reg2_error_loop \n"
\r
687 " bne reg2_error_loop \n"
\r
689 " /* Increment the loop counter to indicate this test is still functioning\n"
\r
690 " correctly. */ \n"
\r
691 " push { r0-r1 } \n"
\r
692 " ldr r0, =ulRegTest2LoopCounter \n"
\r
694 " adds r1, r1, #1 \n"
\r
696 " pop { r0-r1 } \n"
\r
698 " /* Start again. */ \n"
\r
701 "reg2_error_loop: \n"
\r
702 " /* If this line is hit then there was an error in a core register value.\n"
\r
703 " This loop ensures the loop counter variable stops incrementing. */\n"
\r
704 " b reg2_error_loop \n"
\r