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 PUBLIC vRegTest1Implementation
\r
71 PUBLIC vRegTest2Implementation
\r
72 EXTERN ulRegTest1LoopCounter
\r
73 EXTERN ulRegTest2LoopCounter
\r
75 SECTION intvec:CODE:ROOT(2)
\r
78 /* This function is explained in the comments at the top of main-full.c. */
\r
79 vRegTest1Implementation:
\r
81 /* Fill each general purpose register with a known value. */
\r
98 /* Fill each FPU register with a known value. */
\r
116 /* Loop, checking each iteration that each register still contains the
\r
119 /* Yield to increase test coverage */
\r
122 /* Check all the VFP registers still contain the values set above.
\r
123 First save registers that are clobbered by the test. */
\r
128 bne reg1_error_loopf
\r
130 bne reg1_error_loopf
\r
133 bne reg1_error_loopf
\r
135 bne reg1_error_loopf
\r
138 bne reg1_error_loopf
\r
140 bne reg1_error_loopf
\r
143 bne reg1_error_loopf
\r
145 bne reg1_error_loopf
\r
148 bne reg1_error_loopf
\r
150 bne reg1_error_loopf
\r
153 bne reg1_error_loopf
\r
155 bne reg1_error_loopf
\r
158 bne reg1_error_loopf
\r
160 bne reg1_error_loopf
\r
163 bne reg1_error_loopf
\r
165 bne reg1_error_loopf
\r
168 bne reg1_error_loopf
\r
170 bne reg1_error_loopf
\r
173 bne reg1_error_loopf
\r
175 bne reg1_error_loopf
\r
178 bne reg1_error_loopf
\r
180 bne reg1_error_loopf
\r
183 bne reg1_error_loopf
\r
185 bne reg1_error_loopf
\r
188 bne reg1_error_loopf
\r
190 bne reg1_error_loopf
\r
193 bne reg1_error_loopf
\r
195 bne reg1_error_loopf
\r
198 bne reg1_error_loopf
\r
200 bne reg1_error_loopf
\r
203 bne reg1_error_loopf
\r
205 bne reg1_error_loopf
\r
208 /* Restore the registers that were clobbered by the test. */
\r
211 /* VFP register test passed. Jump to the core register test. */
\r
215 /* If this line is hit then a VFP register value was found to be
\r
221 /* Test each general purpose register to check that it still contains the
\r
222 expected known value, jumping to reg1_error_loop if any register contains
\r
223 an unexpected value. */
\r
225 bne reg1_error_loop
\r
227 bne reg1_error_loop
\r
229 bne reg1_error_loop
\r
231 bne reg1_error_loop
\r
233 bne reg1_error_loop
\r
235 bne reg1_error_loop
\r
237 bne reg1_error_loop
\r
239 bne reg1_error_loop
\r
241 bne reg1_error_loop
\r
243 bne reg1_error_loop
\r
245 bne reg1_error_loop
\r
247 bne reg1_error_loop
\r
249 bne reg1_error_loop
\r
251 bne reg1_error_loop
\r
253 /* Everything passed, increment the loop counter. */
\r
255 ldr r0, =ulRegTest1LoopCounter
\r
265 /* If this line is hit then there was an error in a core register value.
\r
266 The loop ensures the loop counter stops incrementing. */
\r
270 /*-----------------------------------------------------------*/
\r
272 vRegTest2Implementation:
\r
274 /* Put a known value in each register. */
\r
275 mov r0, #0xFF000000
\r
276 mov r1, #0x11000000
\r
277 mov r2, #0x22000000
\r
278 mov r3, #0x33000000
\r
279 mov r4, #0x44000000
\r
280 mov r5, #0x55000000
\r
281 mov r6, #0x66000000
\r
282 mov r7, #0x77000000
\r
283 mov r8, #0x88000000
\r
284 mov r9, #0x99000000
\r
285 mov r10, #0xAA000000
\r
286 mov r11, #0xBB000000
\r
287 mov r12, #0xCC000000
\r
288 mov r14, #0xEE000000
\r
290 /* Likewise the floating point registers */
\r
308 /* Loop, checking each iteration that each register still contains the
\r
311 /* Check all the VFP registers still contain the values set above.
\r
312 First save registers that are clobbered by the test. */
\r
316 cmp r0, #0xFF000000
\r
317 bne reg2_error_loopf
\r
318 cmp r1, #0x11000000
\r
319 bne reg2_error_loopf
\r
321 cmp r0, #0x22000000
\r
322 bne reg2_error_loopf
\r
323 cmp r1, #0x33000000
\r
324 bne reg2_error_loopf
\r
326 cmp r0, #0x44000000
\r
327 bne reg2_error_loopf
\r
328 cmp r1, #0x55000000
\r
329 bne reg2_error_loopf
\r
331 cmp r0, #0x66000000
\r
332 bne reg2_error_loopf
\r
333 cmp r1, #0x77000000
\r
334 bne reg2_error_loopf
\r
336 cmp r0, #0x88000000
\r
337 bne reg2_error_loopf
\r
338 cmp r1, #0x99000000
\r
339 bne reg2_error_loopf
\r
341 cmp r0, #0xAA000000
\r
342 bne reg2_error_loopf
\r
343 cmp r1, #0xBB000000
\r
344 bne reg2_error_loopf
\r
346 cmp r0, #0xFF000000
\r
347 bne reg2_error_loopf
\r
348 cmp r1, #0x11000000
\r
349 bne reg2_error_loopf
\r
351 cmp r0, #0x22000000
\r
352 bne reg2_error_loopf
\r
353 cmp r1, #0x33000000
\r
354 bne reg2_error_loopf
\r
356 cmp r0, #0x44000000
\r
357 bne reg2_error_loopf
\r
358 cmp r1, #0x55000000
\r
359 bne reg2_error_loopf
\r
361 cmp r0, #0x66000000
\r
362 bne reg2_error_loopf
\r
363 cmp r1, #0x77000000
\r
364 bne reg2_error_loopf
\r
366 cmp r0, #0x88000000
\r
367 bne reg2_error_loopf
\r
368 cmp r1, #0x99000000
\r
369 bne reg2_error_loopf
\r
371 cmp r0, #0xAA000000
\r
372 bne reg2_error_loopf
\r
373 cmp r1, #0xBB000000
\r
374 bne reg2_error_loopf
\r
376 cmp r0, #0xFF000000
\r
377 bne reg2_error_loopf
\r
378 cmp r1, #0x11000000
\r
379 bne reg2_error_loopf
\r
381 cmp r0, #0x22000000
\r
382 bne reg2_error_loopf
\r
383 cmp r1, #0x33000000
\r
384 bne reg2_error_loopf
\r
386 cmp r0, #0x44000000
\r
387 bne reg2_error_loopf
\r
388 cmp r1, #0x55000000
\r
389 bne reg2_error_loopf
\r
391 cmp r0, #0x66000000
\r
392 bne reg2_error_loopf
\r
393 cmp r1, #0x77000000
\r
394 bne reg2_error_loopf
\r
396 /* Restore the registers that were clobbered by the test. */
\r
399 /* VFP register test passed. Jump to the core register test. */
\r
403 /* If this line is hit then a VFP register value was found to be
\r
409 cmp r0, #0xFF000000
\r
410 bne reg2_error_loop
\r
411 cmp r1, #0x11000000
\r
412 bne reg2_error_loop
\r
413 cmp r2, #0x22000000
\r
414 bne reg2_error_loop
\r
415 cmp r3, #0x33000000
\r
416 bne reg2_error_loop
\r
417 cmp r4, #0x44000000
\r
418 bne reg2_error_loop
\r
419 cmp r5, #0x55000000
\r
420 bne reg2_error_loop
\r
421 cmp r6, #0x66000000
\r
422 bne reg2_error_loop
\r
423 cmp r7, #0x77000000
\r
424 bne reg2_error_loop
\r
425 cmp r8, #0x88000000
\r
426 bne reg2_error_loop
\r
427 cmp r9, #0x99000000
\r
428 bne reg2_error_loop
\r
429 cmp r10, #0xAA000000
\r
430 bne reg2_error_loop
\r
431 cmp r11, #0xBB000000
\r
432 bne reg2_error_loop
\r
433 cmp r12, #0xCC000000
\r
434 bne reg2_error_loop
\r
435 cmp r14, #0xEE000000
\r
436 bne reg2_error_loop
\r
438 /* Everything passed, increment the loop counter. */
\r
440 ldr r0, =ulRegTest2LoopCounter
\r
450 /* If this line is hit then there was an error in a core register value.
\r
451 The loop ensures the loop counter stops incrementing. */
\r