2 FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.
\r
5 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
\r
7 This file is part of the FreeRTOS distribution.
\r
9 FreeRTOS is free software; you can redistribute it and/or modify it under
\r
10 the terms of the GNU General Public License (version 2) as published by the
\r
11 Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
\r
13 ***************************************************************************
\r
14 >>! NOTE: The modification to the GPL is included to allow you to !<<
\r
15 >>! distribute a combined work that includes FreeRTOS without being !<<
\r
16 >>! obliged to provide the source code for proprietary components !<<
\r
17 >>! outside of the FreeRTOS kernel. !<<
\r
18 ***************************************************************************
\r
20 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
\r
21 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
\r
22 FOR A PARTICULAR PURPOSE. Full license text is available on the following
\r
23 link: http://www.freertos.org/a00114.html
\r
25 ***************************************************************************
\r
27 * FreeRTOS provides completely free yet professionally developed, *
\r
28 * robust, strictly quality controlled, supported, and cross *
\r
29 * platform software that is more than just the market leader, it *
\r
30 * is the industry's de facto standard. *
\r
32 * Help yourself get started quickly while simultaneously helping *
\r
33 * to support the FreeRTOS project by purchasing a FreeRTOS *
\r
34 * tutorial book, reference manual, or both: *
\r
35 * http://www.FreeRTOS.org/Documentation *
\r
37 ***************************************************************************
\r
39 http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
\r
40 the FAQ page "My application does not run, what could be wrong?". Have you
\r
41 defined configASSERT()?
\r
43 http://www.FreeRTOS.org/support - In return for receiving this top quality
\r
44 embedded software for free we request you assist our global community by
\r
45 participating in the support forum.
\r
47 http://www.FreeRTOS.org/training - Investing in training allows your team to
\r
48 be as productive as possible as early as possible. Now you can receive
\r
49 FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
\r
50 Ltd, and the world's leading authority on the world's leading RTOS.
\r
52 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
\r
53 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
\r
54 compatible FAT file system, and our tiny thread aware UDP/IP stack.
\r
56 http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
\r
57 Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
\r
59 http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
\r
60 Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
\r
61 licenses offer ticketed support, indemnification and commercial middleware.
\r
63 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
\r
64 engineered and independently SIL3 certified version for use in safety and
\r
65 mission critical applications that require provable dependability.
\r
70 .global vRegTest1Implementation
\r
71 .global vRegTest2Implementation
\r
72 .extern ulRegTest1LoopCounter
\r
73 .extern ulRegTest2LoopCounter
\r
78 /* This function is explained in the comments at the top of main-full.c. */
\r
79 .type vRegTest1Implementation, %function
\r
80 vRegTest1Implementation:
\r
82 /* Fill each general purpose register with a known value. */
\r
99 /* Fill each FPU register with a known value. */
\r
117 /* Loop, checking each iteration that each register still contains the
\r
120 /* Yield to increase test coverage */
\r
123 /* Check all the VFP registers still contain the values set above.
\r
124 First save registers that are clobbered by the test. */
\r
129 bne reg1_error_loopf
\r
131 bne reg1_error_loopf
\r
134 bne reg1_error_loopf
\r
136 bne reg1_error_loopf
\r
139 bne reg1_error_loopf
\r
141 bne reg1_error_loopf
\r
144 bne reg1_error_loopf
\r
146 bne reg1_error_loopf
\r
149 bne reg1_error_loopf
\r
151 bne reg1_error_loopf
\r
154 bne reg1_error_loopf
\r
156 bne reg1_error_loopf
\r
159 bne reg1_error_loopf
\r
161 bne reg1_error_loopf
\r
164 bne reg1_error_loopf
\r
166 bne reg1_error_loopf
\r
169 bne reg1_error_loopf
\r
171 bne reg1_error_loopf
\r
174 bne reg1_error_loopf
\r
176 bne reg1_error_loopf
\r
179 bne reg1_error_loopf
\r
181 bne reg1_error_loopf
\r
184 bne reg1_error_loopf
\r
186 bne reg1_error_loopf
\r
189 bne reg1_error_loopf
\r
191 bne reg1_error_loopf
\r
194 bne reg1_error_loopf
\r
196 bne reg1_error_loopf
\r
199 bne reg1_error_loopf
\r
201 bne reg1_error_loopf
\r
204 bne reg1_error_loopf
\r
206 bne reg1_error_loopf
\r
209 /* Restore the registers that were clobbered by the test. */
\r
212 /* VFP register test passed. Jump to the core register test. */
\r
216 /* If this line is hit then a VFP register value was found to be
\r
222 /* Test each general purpose register to check that it still contains the
\r
223 expected known value, jumping to reg1_error_loop if any register contains
\r
224 an unexpected value. */
\r
226 bne reg1_error_loop
\r
228 bne reg1_error_loop
\r
230 bne reg1_error_loop
\r
232 bne reg1_error_loop
\r
234 bne reg1_error_loop
\r
236 bne reg1_error_loop
\r
238 bne reg1_error_loop
\r
240 bne reg1_error_loop
\r
242 bne reg1_error_loop
\r
244 bne reg1_error_loop
\r
246 bne reg1_error_loop
\r
248 bne reg1_error_loop
\r
250 bne reg1_error_loop
\r
252 bne reg1_error_loop
\r
254 /* Everything passed, increment the loop counter. */
\r
256 ldr r0, =ulRegTest1LoopCounter
\r
266 /* If this line is hit then there was an error in a core register value.
\r
267 The loop ensures the loop counter stops incrementing. */
\r
271 /*-----------------------------------------------------------*/
\r
273 .type vRegTest2Implementation, %function
\r
274 vRegTest2Implementation:
\r
276 /* Put a known value in each register. */
\r
277 mov r0, #0xFF000000
\r
278 mov r1, #0x11000000
\r
279 mov r2, #0x22000000
\r
280 mov r3, #0x33000000
\r
281 mov r4, #0x44000000
\r
282 mov r5, #0x55000000
\r
283 mov r6, #0x66000000
\r
284 mov r7, #0x77000000
\r
285 mov r8, #0x88000000
\r
286 mov r9, #0x99000000
\r
287 mov r10, #0xAA000000
\r
288 mov r11, #0xBB000000
\r
289 mov r12, #0xCC000000
\r
290 mov r14, #0xEE000000
\r
292 /* Likewise the floating point registers */
\r
310 /* Loop, checking each iteration that each register still contains the
\r
313 /* Check all the VFP registers still contain the values set above.
\r
314 First save registers that are clobbered by the test. */
\r
318 cmp r0, #0xFF000000
\r
319 bne reg2_error_loopf
\r
320 cmp r1, #0x11000000
\r
321 bne reg2_error_loopf
\r
323 cmp r0, #0x22000000
\r
324 bne reg2_error_loopf
\r
325 cmp r1, #0x33000000
\r
326 bne reg2_error_loopf
\r
328 cmp r0, #0x44000000
\r
329 bne reg2_error_loopf
\r
330 cmp r1, #0x55000000
\r
331 bne reg2_error_loopf
\r
333 cmp r0, #0x66000000
\r
334 bne reg2_error_loopf
\r
335 cmp r1, #0x77000000
\r
336 bne reg2_error_loopf
\r
338 cmp r0, #0x88000000
\r
339 bne reg2_error_loopf
\r
340 cmp r1, #0x99000000
\r
341 bne reg2_error_loopf
\r
343 cmp r0, #0xAA000000
\r
344 bne reg2_error_loopf
\r
345 cmp r1, #0xBB000000
\r
346 bne reg2_error_loopf
\r
348 cmp r0, #0xFF000000
\r
349 bne reg2_error_loopf
\r
350 cmp r1, #0x11000000
\r
351 bne reg2_error_loopf
\r
353 cmp r0, #0x22000000
\r
354 bne reg2_error_loopf
\r
355 cmp r1, #0x33000000
\r
356 bne reg2_error_loopf
\r
358 cmp r0, #0x44000000
\r
359 bne reg2_error_loopf
\r
360 cmp r1, #0x55000000
\r
361 bne reg2_error_loopf
\r
363 cmp r0, #0x66000000
\r
364 bne reg2_error_loopf
\r
365 cmp r1, #0x77000000
\r
366 bne reg2_error_loopf
\r
368 cmp r0, #0x88000000
\r
369 bne reg2_error_loopf
\r
370 cmp r1, #0x99000000
\r
371 bne reg2_error_loopf
\r
373 cmp r0, #0xAA000000
\r
374 bne reg2_error_loopf
\r
375 cmp r1, #0xBB000000
\r
376 bne reg2_error_loopf
\r
378 cmp r0, #0xFF000000
\r
379 bne reg2_error_loopf
\r
380 cmp r1, #0x11000000
\r
381 bne reg2_error_loopf
\r
383 cmp r0, #0x22000000
\r
384 bne reg2_error_loopf
\r
385 cmp r1, #0x33000000
\r
386 bne reg2_error_loopf
\r
388 cmp r0, #0x44000000
\r
389 bne reg2_error_loopf
\r
390 cmp r1, #0x55000000
\r
391 bne reg2_error_loopf
\r
393 cmp r0, #0x66000000
\r
394 bne reg2_error_loopf
\r
395 cmp r1, #0x77000000
\r
396 bne reg2_error_loopf
\r
398 /* Restore the registers that were clobbered by the test. */
\r
401 /* VFP register test passed. Jump to the core register test. */
\r
405 /* If this line is hit then a VFP register value was found to be
\r
411 cmp r0, #0xFF000000
\r
412 bne reg2_error_loop
\r
413 cmp r1, #0x11000000
\r
414 bne reg2_error_loop
\r
415 cmp r2, #0x22000000
\r
416 bne reg2_error_loop
\r
417 cmp r3, #0x33000000
\r
418 bne reg2_error_loop
\r
419 cmp r4, #0x44000000
\r
420 bne reg2_error_loop
\r
421 cmp r5, #0x55000000
\r
422 bne reg2_error_loop
\r
423 cmp r6, #0x66000000
\r
424 bne reg2_error_loop
\r
425 cmp r7, #0x77000000
\r
426 bne reg2_error_loop
\r
427 cmp r8, #0x88000000
\r
428 bne reg2_error_loop
\r
429 cmp r9, #0x99000000
\r
430 bne reg2_error_loop
\r
431 cmp r10, #0xAA000000
\r
432 bne reg2_error_loop
\r
433 cmp r11, #0xBB000000
\r
434 bne reg2_error_loop
\r
435 cmp r12, #0xCC000000
\r
436 bne reg2_error_loop
\r
437 cmp r14, #0xEE000000
\r
438 bne reg2_error_loop
\r
440 /* Everything passed, increment the loop counter. */
\r
442 ldr r0, =ulRegTest2LoopCounter
\r
452 /* If this line is hit then there was an error in a core register value.
\r
453 The loop ensures the loop counter stops incrementing. */
\r