2 FreeRTOS V8.1.1 - Copyright (C) 2014 Real Time Engineers Ltd.
\r
5 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
\r
7 ***************************************************************************
\r
9 * FreeRTOS provides completely free yet professionally developed, *
\r
10 * robust, strictly quality controlled, supported, and cross *
\r
11 * platform software that has become a de facto standard. *
\r
13 * Help yourself get started quickly and support the FreeRTOS *
\r
14 * project by purchasing a FreeRTOS tutorial book, reference *
\r
15 * manual, or both from: http://www.FreeRTOS.org/Documentation *
\r
19 ***************************************************************************
\r
21 This file is part of the FreeRTOS distribution.
\r
23 FreeRTOS is free software; you can redistribute it and/or modify it under
\r
24 the terms of the GNU General Public License (version 2) as published by the
\r
25 Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
\r
27 >>! NOTE: The modification to the GPL is included to allow you to !<<
\r
28 >>! distribute a combined work that includes FreeRTOS without being !<<
\r
29 >>! obliged to provide the source code for proprietary components !<<
\r
30 >>! outside of the FreeRTOS kernel. !<<
\r
32 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
\r
33 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
\r
34 FOR A PARTICULAR PURPOSE. Full license text is available from the following
\r
35 link: http://www.freertos.org/a00114.html
\r
39 ***************************************************************************
\r
41 * Having a problem? Start by reading the FAQ "My application does *
\r
42 * not run, what could be wrong?" *
\r
44 * http://www.FreeRTOS.org/FAQHelp.html *
\r
46 ***************************************************************************
\r
48 http://www.FreeRTOS.org - Documentation, books, training, latest versions,
\r
49 license and Real Time Engineers Ltd. contact details.
\r
51 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
\r
52 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
\r
53 compatible FAT file system, and our tiny thread aware UDP/IP stack.
\r
55 http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
\r
56 Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
\r
57 licenses offer ticketed support, indemnification and middleware.
\r
59 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
\r
60 engineered and independently SIL3 certified version for use in safety and
\r
61 mission critical applications that require provable dependability.
\r
66 /******************************************************************************
\r
67 * NOTE 1: This project provides two demo applications. A simple blinky style
\r
68 * project, and a more comprehensive test and demo application. The
\r
69 * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select
\r
70 * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY
\r
71 * in main.c. This file implements the comprehensive test and demo version.
\r
73 * NOTE 2: This file only contains the source code that is specific to the
\r
74 * full demo. Generic functions, such FreeRTOS hook functions, and functions
\r
75 * required to configure the hardware, are defined in main.c.
\r
76 ******************************************************************************
\r
78 * main_full() creates all the demo application tasks and a software timer, then
\r
79 * starts the scheduler. The web documentation provides more details of the
\r
80 * standard demo application tasks, which provide no particular functionality,
\r
81 * but do provide a good example of how to use the FreeRTOS API.
\r
83 * In addition to the standard demo tasks, the following tasks and tests are
\r
84 * defined and/or created within this file:
\r
86 * "Reg test" tasks - These fill both the core and floating point registers with
\r
87 * known values, then check that each register maintains its expected value for
\r
88 * the lifetime of the task. Each task uses a different set of values. The reg
\r
89 * test tasks execute with a very low priority, so get preempted very
\r
90 * frequently. A register containing an unexpected value is indicative of an
\r
91 * error in the context switching mechanism.
\r
93 * "Check" timer - The check software timer period is initially set to three
\r
94 * seconds. The callback function associated with the check software timer
\r
95 * checks that all the standard demo tasks, and the register check tasks, are
\r
96 * not only still executing, but are executing without reporting any errors. If
\r
97 * the check software timer discovers that a task has either stalled, or
\r
98 * reported an error, then it changes its own execution period from the initial
\r
99 * three seconds, to just 200ms. The check software timer callback function
\r
100 * also toggles the single LED each time it is called. This provides a visual
\r
101 * indication of the system status: If the LED toggles every three seconds,
\r
102 * then no issues have been discovered. If the LED toggles every 200ms, then
\r
103 * an issue has been discovered with at least one task.
\r
106 /* Standard includes. */
\r
109 /* Kernel includes. */
\r
110 #include "FreeRTOS.h"
\r
112 #include "timers.h"
\r
113 #include "semphr.h"
\r
115 /* Standard demo application includes. */
\r
117 #include "integer.h"
\r
119 #include "semtest.h"
\r
120 #include "dynamic.h"
\r
121 #include "BlockQ.h"
\r
122 #include "blocktim.h"
\r
123 #include "countsem.h"
\r
124 #include "GenQTest.h"
\r
125 #include "recmutex.h"
\r
128 /* Hardware includes. */
\r
129 #include "XMC4500.h"
\r
130 #include "System_XMC4500.h"
\r
132 /* Priorities for the demo application tasks. */
\r
133 #define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2UL )
\r
134 #define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1UL )
\r
135 #define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2UL )
\r
136 #define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3UL )
\r
137 #define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY )
\r
139 /* To toggle the single LED */
\r
140 #define mainTOGGLE_LED() ( PORT3->OMR = 0x02000200 )
\r
142 /* A block time of zero simply means "don't block". */
\r
143 #define mainDONT_BLOCK ( 0UL )
\r
145 /* The period after which the check timer will expire, in ms, provided no errors
\r
146 have been reported by any of the standard demo tasks. ms are converted to the
\r
147 equivalent in ticks using the portTICK_PERIOD_MS constant. */
\r
148 #define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_PERIOD_MS )
\r
150 /* The period at which the check timer will expire, in ms, if an error has been
\r
151 reported in one of the standard demo tasks. ms are converted to the equivalent
\r
152 in ticks using the portTICK_PERIOD_MS constant. */
\r
153 #define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_PERIOD_MS )
\r
155 /*-----------------------------------------------------------*/
\r
158 * The check timer callback function, as described at the top of this file.
\r
160 static void prvCheckTimerCallback( TimerHandle_t xTimer );
\r
163 * Register check tasks, and the tasks used to write over and check the contents
\r
164 * of the FPU registers, as described at the top of this file. The nature of
\r
165 * these files necessitates that they are written in an assembly file.
\r
167 static void vRegTest1Task( void *pvParameters ) __attribute__((naked));
\r
168 static void vRegTest2Task( void *pvParameters ) __attribute__((naked));
\r
170 /*-----------------------------------------------------------*/
\r
172 /* The following two variables are used to communicate the status of the
\r
173 register check tasks to the check software timer. If the variables keep
\r
174 incrementing, then the register check tasks has not discovered any errors. If
\r
175 a variable stops incrementing, then an error has been found. */
\r
176 volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL;
\r
178 /*-----------------------------------------------------------*/
\r
180 void main_full( void )
\r
182 TimerHandle_t xCheckTimer = NULL;
\r
184 /* Start all the other standard demo/test tasks. The have not particular
\r
185 functionality, but do demonstrate how to use the FreeRTOS API and test the
\r
187 vStartIntegerMathTasks( tskIDLE_PRIORITY );
\r
188 vStartDynamicPriorityTasks();
\r
189 vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
\r
190 vCreateBlockTimeTasks();
\r
191 vStartCountingSemaphoreTasks();
\r
192 vStartGenericQueueTasks( tskIDLE_PRIORITY );
\r
193 vStartRecursiveMutexTasks();
\r
194 vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
\r
195 vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
\r
196 vStartMathTasks( mainFLOP_TASK_PRIORITY );
\r
198 /* Create the register check tasks, as described at the top of this
\r
200 xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL );
\r
201 xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL );
\r
203 /* Create the software timer that performs the 'check' functionality,
\r
204 as described at the top of this file. */
\r
205 xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */
\r
206 ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */
\r
207 pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */
\r
208 ( void * ) 0, /* The ID is not used, so can be set to anything. */
\r
209 prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */
\r
212 if( xCheckTimer != NULL )
\r
214 xTimerStart( xCheckTimer, mainDONT_BLOCK );
\r
217 /* The set of tasks created by the following function call have to be
\r
218 created last as they keep account of the number of tasks they expect to see
\r
220 vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
\r
222 /* Start the scheduler. */
\r
223 vTaskStartScheduler();
\r
225 /* If all is well, the scheduler will now be running, and the following line
\r
226 will never be reached. If the following line does execute, then there was
\r
227 insufficient FreeRTOS heap memory available for the idle and/or timer tasks
\r
228 to be created. See the memory management section on the FreeRTOS web site
\r
229 for more details. */
\r
232 /*-----------------------------------------------------------*/
\r
234 static void prvCheckTimerCallback( TimerHandle_t xTimer )
\r
236 static long lChangedTimerPeriodAlready = pdFALSE;
\r
237 static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;
\r
238 unsigned long ulErrorFound = pdFALSE;
\r
240 /* Check all the demo tasks (other than the flash tasks) to ensure
\r
241 that they are all still running, and that none have detected an error. */
\r
243 if( xAreMathsTaskStillRunning() != pdTRUE )
\r
245 ulErrorFound = pdTRUE;
\r
248 if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
\r
250 ulErrorFound = pdTRUE;
\r
253 if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
\r
255 ulErrorFound = pdTRUE;
\r
258 if( xAreBlockingQueuesStillRunning() != pdTRUE )
\r
260 ulErrorFound = pdTRUE;
\r
263 if ( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
\r
265 ulErrorFound = pdTRUE;
\r
268 if ( xAreGenericQueueTasksStillRunning() != pdTRUE )
\r
270 ulErrorFound = pdTRUE;
\r
273 if ( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
\r
275 ulErrorFound = pdTRUE;
\r
278 if( xIsCreateTaskStillRunning() != pdTRUE )
\r
280 ulErrorFound = pdTRUE;
\r
283 if( xArePollingQueuesStillRunning() != pdTRUE )
\r
285 ulErrorFound = pdTRUE;
\r
288 if( xAreSemaphoreTasksStillRunning() != pdTRUE )
\r
290 ulErrorFound = pdTRUE;
\r
293 /* Check that the register test 1 task is still running. */
\r
294 if( ulLastRegTest1Value == ulRegTest1LoopCounter )
\r
296 ulErrorFound = pdTRUE;
\r
298 ulLastRegTest1Value = ulRegTest1LoopCounter;
\r
300 /* Check that the register test 2 task is still running. */
\r
301 if( ulLastRegTest2Value == ulRegTest2LoopCounter )
\r
303 ulErrorFound = pdTRUE;
\r
305 ulLastRegTest2Value = ulRegTest2LoopCounter;
\r
307 /* Toggle the check LED to give an indication of the system status. If
\r
308 the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then
\r
309 everything is ok. A faster toggle indicates an error. */
\r
312 /* Have any errors been latch in ulErrorFound? If so, shorten the
\r
313 period of the check timer to mainERROR_CHECK_TIMER_PERIOD_MS milliseconds.
\r
314 This will result in an increase in the rate at which mainCHECK_LED
\r
316 if( ulErrorFound != pdFALSE )
\r
318 if( lChangedTimerPeriodAlready == pdFALSE )
\r
320 lChangedTimerPeriodAlready = pdTRUE;
\r
322 /* This call to xTimerChangePeriod() uses a zero block time.
\r
323 Functions called from inside of a timer callback function must
\r
324 *never* attempt to block. */
\r
325 xTimerChangePeriod( xTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK );
\r
329 /*-----------------------------------------------------------*/
\r
331 /* This is a naked function. */
\r
332 static void vRegTest1Task( void *pvParameters )
\r
336 " /* Fill the core registers with known values. */ \n"
\r
347 " mov r10, #110 \n"
\r
348 " mov r11, #111 \n"
\r
349 " mov r12, #112 \n"
\r
351 " /* Fill the VFP registers with known values. */ \n"
\r
352 " vmov d0, r0, r1 \n"
\r
353 " vmov d1, r2, r3 \n"
\r
354 " vmov d2, r4, r5 \n"
\r
355 " vmov d3, r6, r7 \n"
\r
356 " vmov d4, r8, r9 \n"
\r
357 " vmov d5, r10, r11 \n"
\r
358 " vmov d6, r0, r1 \n"
\r
359 " vmov d7, r2, r3 \n"
\r
360 " vmov d8, r4, r5 \n"
\r
361 " vmov d9, r6, r7 \n"
\r
362 " vmov d10, r8, r9 \n"
\r
363 " vmov d11, r10, r11 \n"
\r
364 " vmov d12, r0, r1 \n"
\r
365 " vmov d13, r2, r3 \n"
\r
366 " vmov d14, r4, r5 \n"
\r
367 " vmov d15, r6, r7 \n"
\r
370 " /* Check all the VFP registers still contain the values set above.\n"
\r
371 " First save registers that are clobbered by the test. */ \n"
\r
372 " push { r0-r1 } \n"
\r
374 " vmov r0, r1, d0 \n"
\r
376 " bne reg1_error_loopf \n"
\r
378 " bne reg1_error_loopf \n"
\r
379 " vmov r0, r1, d1 \n"
\r
381 " bne reg1_error_loopf \n"
\r
383 " bne reg1_error_loopf \n"
\r
384 " vmov r0, r1, d2 \n"
\r
386 " bne reg1_error_loopf \n"
\r
388 " bne reg1_error_loopf \n"
\r
389 " vmov r0, r1, d3 \n"
\r
391 " bne reg1_error_loopf \n"
\r
393 " bne reg1_error_loopf \n"
\r
394 " vmov r0, r1, d4 \n"
\r
396 " bne reg1_error_loopf \n"
\r
398 " bne reg1_error_loopf \n"
\r
399 " vmov r0, r1, d5 \n"
\r
401 " bne reg1_error_loopf \n"
\r
403 " bne reg1_error_loopf \n"
\r
404 " vmov r0, r1, d6 \n"
\r
406 " bne reg1_error_loopf \n"
\r
408 " bne reg1_error_loopf \n"
\r
409 " vmov r0, r1, d7 \n"
\r
411 " bne reg1_error_loopf \n"
\r
413 " bne reg1_error_loopf \n"
\r
414 " vmov r0, r1, d8 \n"
\r
416 " bne reg1_error_loopf \n"
\r
418 " bne reg1_error_loopf \n"
\r
419 " vmov r0, r1, d9 \n"
\r
421 " bne reg1_error_loopf \n"
\r
423 " bne reg1_error_loopf \n"
\r
424 " vmov r0, r1, d10 \n"
\r
426 " bne reg1_error_loopf \n"
\r
428 " bne reg1_error_loopf \n"
\r
429 " vmov r0, r1, d11 \n"
\r
431 " bne reg1_error_loopf \n"
\r
433 " bne reg1_error_loopf \n"
\r
434 " vmov r0, r1, d12 \n"
\r
436 " bne reg1_error_loopf \n"
\r
438 " bne reg1_error_loopf \n"
\r
439 " vmov r0, r1, d13 \n"
\r
441 " bne reg1_error_loopf \n"
\r
443 " bne reg1_error_loopf \n"
\r
444 " vmov r0, r1, d14 \n"
\r
446 " bne reg1_error_loopf \n"
\r
448 " bne reg1_error_loopf \n"
\r
449 " vmov r0, r1, d15 \n"
\r
451 " bne reg1_error_loopf \n"
\r
453 " bne reg1_error_loopf \n"
\r
455 " /* Restore the registers that were clobbered by the test. */\n"
\r
458 " /* VFP register test passed. Jump to the core register test. */\n"
\r
459 " b reg1_loopf_pass \n"
\r
461 "reg1_error_loopf: \n"
\r
462 " /* If this line is hit then a VFP register value was found to be\n"
\r
463 " incorrect. */ \n"
\r
464 " b reg1_error_loopf \n"
\r
466 "reg1_loopf_pass: \n"
\r
469 " bne reg1_error_loop \n"
\r
471 " bne reg1_error_loop \n"
\r
473 " bne reg1_error_loop \n"
\r
475 " bne reg1_error_loop \n"
\r
477 " bne reg1_error_loop \n"
\r
479 " bne reg1_error_loop \n"
\r
481 " bne reg1_error_loop \n"
\r
483 " bne reg1_error_loop \n"
\r
485 " bne reg1_error_loop \n"
\r
487 " bne reg1_error_loop \n"
\r
488 " cmp r10, #110 \n"
\r
489 " bne reg1_error_loop \n"
\r
490 " cmp r11, #111 \n"
\r
491 " bne reg1_error_loop \n"
\r
492 " cmp r12, #112 \n"
\r
493 " bne reg1_error_loop \n"
\r
495 " /* Everything passed, increment the loop counter. */ \n"
\r
496 " push { r0-r1 } \n"
\r
497 " ldr r0, =ulRegTest1LoopCounter \n"
\r
499 " adds r1, r1, #1 \n"
\r
501 " pop { r0-r1 } \n"
\r
503 " /* Start again. */ \n"
\r
506 "reg1_error_loop: \n"
\r
507 " /* If this line is hit then there was an error in a core register value.\n"
\r
508 " The loop ensures the loop counter stops incrementing. */\n"
\r
509 " b reg1_error_loop \n"
\r
513 /*-----------------------------------------------------------*/
\r
515 /* This is a naked function. */
\r
516 static void vRegTest2Task( void *pvParameters )
\r
520 " /* Set all the core registers to known values. */ \n"
\r
535 " /* Set all the VFP to known values. */ \n"
\r
536 " vmov d0, r0, r1 \n"
\r
537 " vmov d1, r2, r3 \n"
\r
538 " vmov d2, r4, r5 \n"
\r
539 " vmov d3, r6, r7 \n"
\r
540 " vmov d4, r8, r9 \n"
\r
541 " vmov d5, r10, r11 \n"
\r
542 " vmov d6, r0, r1 \n"
\r
543 " vmov d7, r2, r3 \n"
\r
544 " vmov d8, r4, r5 \n"
\r
545 " vmov d9, r6, r7 \n"
\r
546 " vmov d10, r8, r9 \n"
\r
547 " vmov d11, r10, r11 \n"
\r
548 " vmov d12, r0, r1 \n"
\r
549 " vmov d13, r2, r3 \n"
\r
550 " vmov d14, r4, r5 \n"
\r
551 " vmov d15, r6, r7 \n"
\r
555 " /* Check all the VFP registers still contain the values set above.\n"
\r
556 " First save registers that are clobbered by the test. */ \n"
\r
557 " push { r0-r1 } \n"
\r
559 " vmov r0, r1, d0 \n"
\r
561 " bne reg2_error_loopf \n"
\r
563 " bne reg2_error_loopf \n"
\r
564 " vmov r0, r1, d1 \n"
\r
566 " bne reg2_error_loopf \n"
\r
568 " bne reg2_error_loopf \n"
\r
569 " vmov r0, r1, d2 \n"
\r
571 " bne reg2_error_loopf \n"
\r
573 " bne reg2_error_loopf \n"
\r
574 " vmov r0, r1, d3 \n"
\r
576 " bne reg2_error_loopf \n"
\r
578 " bne reg2_error_loopf \n"
\r
579 " vmov r0, r1, d4 \n"
\r
581 " bne reg2_error_loopf \n"
\r
583 " bne reg2_error_loopf \n"
\r
584 " vmov r0, r1, d5 \n"
\r
586 " bne reg2_error_loopf \n"
\r
588 " bne reg2_error_loopf \n"
\r
589 " vmov r0, r1, d6 \n"
\r
591 " bne reg2_error_loopf \n"
\r
593 " bne reg2_error_loopf \n"
\r
594 " vmov r0, r1, d7 \n"
\r
596 " bne reg2_error_loopf \n"
\r
598 " bne reg2_error_loopf \n"
\r
599 " vmov r0, r1, d8 \n"
\r
601 " bne reg2_error_loopf \n"
\r
603 " bne reg2_error_loopf \n"
\r
604 " vmov r0, r1, d9 \n"
\r
606 " bne reg2_error_loopf \n"
\r
608 " bne reg2_error_loopf \n"
\r
609 " vmov r0, r1, d10 \n"
\r
611 " bne reg2_error_loopf \n"
\r
613 " bne reg2_error_loopf \n"
\r
614 " vmov r0, r1, d11 \n"
\r
616 " bne reg2_error_loopf \n"
\r
618 " bne reg2_error_loopf \n"
\r
619 " vmov r0, r1, d12 \n"
\r
621 " bne reg2_error_loopf \n"
\r
623 " bne reg2_error_loopf \n"
\r
624 " vmov r0, r1, d13 \n"
\r
626 " bne reg2_error_loopf \n"
\r
628 " bne reg2_error_loopf \n"
\r
629 " vmov r0, r1, d14 \n"
\r
631 " bne reg2_error_loopf \n"
\r
633 " bne reg2_error_loopf \n"
\r
634 " vmov r0, r1, d15 \n"
\r
636 " bne reg2_error_loopf \n"
\r
638 " bne reg2_error_loopf \n"
\r
640 " /* Restore the registers that were clobbered by the test. */\n"
\r
643 " /* VFP register test passed. Jump to the core register test. */\n"
\r
644 " b reg2_loopf_pass \n"
\r
646 "reg2_error_loopf: \n"
\r
647 " /* If this line is hit then a VFP register value was found to be\n"
\r
648 " incorrect. */ \n"
\r
649 " b reg2_error_loopf \n"
\r
651 "reg2_loopf_pass: \n"
\r
654 " bne reg2_error_loop \n"
\r
656 " bne reg2_error_loop \n"
\r
658 " bne reg2_error_loop \n"
\r
660 " bne reg2_error_loop \n"
\r
662 " bne reg2_error_loop \n"
\r
664 " bne reg2_error_loop \n"
\r
666 " bne reg2_error_loop \n"
\r
668 " bne reg2_error_loop \n"
\r
670 " bne reg2_error_loop \n"
\r
672 " bne reg2_error_loop \n"
\r
674 " bne reg2_error_loop \n"
\r
676 " bne reg2_error_loop \n"
\r
678 " bne reg2_error_loop \n"
\r
680 " /* Increment the loop counter to indicate this test is still functioning\n"
\r
681 " correctly. */ \n"
\r
682 " push { r0-r1 } \n"
\r
683 " ldr r0, =ulRegTest2LoopCounter \n"
\r
685 " adds r1, r1, #1 \n"
\r
687 " pop { r0-r1 } \n"
\r
689 " /* Start again. */ \n"
\r
692 "reg2_error_loop: \n"
\r
693 " /* If this line is hit then there was an error in a core register value.\n"
\r
694 " This loop ensures the loop counter variable stops incrementing. */\n"
\r
695 " b reg2_error_loop \n"
\r