2 ; FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.
\r
3 ; All rights reserved
\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
67 ; 1 tab == 4 spaces!
\r
73 .ref ulRegTest1LoopCounter
\r
74 .ref ulRegTest2LoopCounter
\r
76 .def vRegTest1Implementation
\r
77 .def vRegTest2Implementation
\r
79 ulRegTest1LoopCounterConst: .word ulRegTest1LoopCounter
\r
80 ulRegTest2LoopCounterConst: .word ulRegTest2LoopCounter
\r
81 ulNVIC_INT_CTRL: .word 0xe000ed04
\r
82 ;/*-----------------------------------------------------------*/
\r
84 vRegTest1Implementation: .asmfunc
\r
86 ;/* Fill the core registers with known values. */
\r
101 ;/* Fill the VFP registers with known values. */
\r
120 ;/* Check all the VFP registers still contain the values set above.
\r
121 ;First save registers that are clobbered by the test. */
\r
126 bne reg1_error_loopf
\r
128 bne reg1_error_loopf
\r
131 bne reg1_error_loopf
\r
133 bne reg1_error_loopf
\r
136 bne reg1_error_loopf
\r
138 bne reg1_error_loopf
\r
141 bne reg1_error_loopf
\r
143 bne reg1_error_loopf
\r
146 bne reg1_error_loopf
\r
148 bne reg1_error_loopf
\r
151 bne reg1_error_loopf
\r
153 bne reg1_error_loopf
\r
156 bne reg1_error_loopf
\r
158 bne reg1_error_loopf
\r
161 bne reg1_error_loopf
\r
163 bne reg1_error_loopf
\r
166 bne reg1_error_loopf
\r
168 bne reg1_error_loopf
\r
171 bne reg1_error_loopf
\r
173 bne reg1_error_loopf
\r
176 bne reg1_error_loopf
\r
178 bne reg1_error_loopf
\r
181 bne reg1_error_loopf
\r
183 bne reg1_error_loopf
\r
186 bne reg1_error_loopf
\r
188 bne reg1_error_loopf
\r
191 bne reg1_error_loopf
\r
193 bne reg1_error_loopf
\r
196 bne reg1_error_loopf
\r
198 bne reg1_error_loopf
\r
201 bne reg1_error_loopf
\r
203 bne reg1_error_loopf
\r
205 ;/* Restore the registers that were clobbered by the test. */
\r
208 ;/* VFP register test passed. Jump to the core register test. */
\r
212 ;/* If this line is hit then a VFP register value was found to be
\r
219 bne reg1_error_loop
\r
221 bne reg1_error_loop
\r
223 bne reg1_error_loop
\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 ;/* Everything passed, increment the loop counter. */
\r
247 ldr r0, ulRegTest1LoopCounterConst
\r
253 ;/* Start again. */
\r
257 ;/* If this line is hit then there was an error in a core register value.
\r
258 ;The loop ensures the loop counter stops incrementing. */
\r
262 ;/*-----------------------------------------------------------*/
\r
265 vRegTest2Implementation: .asmfunc
\r
267 ;/* Set all the core registers to known values. */
\r
282 ;/* Set all the VFP to known values. */
\r
302 ;/* Check all the VFP registers still contain the values set above.
\r
303 ;First save registers that are clobbered by the test. */
\r
308 bne reg2_error_loopf
\r
310 bne reg2_error_loopf
\r
313 bne reg2_error_loopf
\r
315 bne reg2_error_loopf
\r
318 bne reg2_error_loopf
\r
320 bne reg2_error_loopf
\r
323 bne reg2_error_loopf
\r
325 bne reg2_error_loopf
\r
328 bne reg2_error_loopf
\r
330 bne reg2_error_loopf
\r
333 bne reg2_error_loopf
\r
335 bne reg2_error_loopf
\r
338 bne reg2_error_loopf
\r
340 bne reg2_error_loopf
\r
343 bne reg2_error_loopf
\r
345 bne reg2_error_loopf
\r
348 bne reg2_error_loopf
\r
350 bne reg2_error_loopf
\r
353 bne reg2_error_loopf
\r
355 bne reg2_error_loopf
\r
358 bne reg2_error_loopf
\r
360 bne reg2_error_loopf
\r
363 bne reg2_error_loopf
\r
365 bne reg2_error_loopf
\r
368 bne reg2_error_loopf
\r
370 bne reg2_error_loopf
\r
373 bne reg2_error_loopf
\r
375 bne reg2_error_loopf
\r
378 bne reg2_error_loopf
\r
380 bne reg2_error_loopf
\r
383 bne reg2_error_loopf
\r
385 bne reg2_error_loopf
\r
387 ;/* Restore the registers that were clobbered by the test. */
\r
390 ;/* VFP register test passed. Jump to the core register test. */
\r
394 ;/* If this line is hit then a VFP register value was found to be
\r
401 bne reg2_error_loop
\r
403 bne reg2_error_loop
\r
405 bne reg2_error_loop
\r
407 bne reg2_error_loop
\r
409 bne reg2_error_loop
\r
411 bne reg2_error_loop
\r
413 bne reg2_error_loop
\r
415 bne reg2_error_loop
\r
417 bne reg2_error_loop
\r
419 bne reg2_error_loop
\r
421 bne reg2_error_loop
\r
423 bne reg2_error_loop
\r
425 bne reg2_error_loop
\r
427 ;/* Increment the loop counter to indicate this test is still functioning
\r
430 ldr r0, ulRegTest2LoopCounterConst
\r
435 ;/* Yield to increase test coverage. */
\r
437 ldr r1, ulNVIC_INT_CTRL
\r
438 lsl r0, r0, #28 ;/* Shift to PendSV bit */
\r
444 ;/* Start again. */
\r
448 ;/* If this line is hit then there was an error in a core register value.
\r
449 ;This loop ensures the loop counter variable stops incrementing. */
\r
452 ;/*-----------------------------------------------------------*/
\r