2 FreeRTOS V8.2.2 - Copyright (C) 2014 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 itcan 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 PUBLIC vRegTest1Implementation
\r
76 PUBLIC vRegTest2Implementation
\r
77 EXTERN ulRegTest1LoopCounter
\r
78 EXTERN ulRegTest2LoopCounter
\r
80 SECTION intvec:CODE:ROOT(2)
\r
83 /* This function is explained in the comments at the top of main-full.c. */
\r
84 vRegTest1Implementation:
\r
86 /* Fill each general purpose register with a known value. */
\r
103 /* Fill each FPU register with a known value. */
\r
121 /* Loop, checking each iteration that each register still contains the
\r
124 /* Yield to increase test coverage */
\r
127 /* Check all the VFP registers still contain the values set above.
\r
128 First save registers that are clobbered by the test. */
\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 bne reg1_error_loopf
\r
210 bne reg1_error_loopf
\r
213 /* Restore the registers that were clobbered by the test. */
\r
216 /* VFP register test passed. Jump to the core register test. */
\r
220 /* If this line is hit then a VFP register value was found to be
\r
226 /* Test each general purpose register to check that it still contains the
\r
227 expected known value, jumping to reg1_error_loop if any register contains
\r
228 an unexpected value. */
\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 bne reg1_error_loop
\r
256 bne reg1_error_loop
\r
258 /* Everything passed, increment the loop counter. */
\r
260 ldr r0, =ulRegTest1LoopCounter
\r
270 /* If this line is hit then there was an error in a core register value.
\r
271 The loop ensures the loop counter stops incrementing. */
\r
275 /*-----------------------------------------------------------*/
\r
277 vRegTest2Implementation:
\r
279 /* Put a known value in each register. */
\r
280 mov r0, #0xFF000000
\r
281 mov r1, #0x11000000
\r
282 mov r2, #0x22000000
\r
283 mov r3, #0x33000000
\r
284 mov r4, #0x44000000
\r
285 mov r5, #0x55000000
\r
286 mov r6, #0x66000000
\r
287 mov r7, #0x77000000
\r
288 mov r8, #0x88000000
\r
289 mov r9, #0x99000000
\r
290 mov r10, #0xAA000000
\r
291 mov r11, #0xBB000000
\r
292 mov r12, #0xCC000000
\r
293 mov r14, #0xEE000000
\r
295 /* Likewise the floating point registers */
\r
313 /* Loop, checking each iteration that each register still contains the
\r
316 /* Check all the VFP registers still contain the values set above.
\r
317 First save registers that are clobbered by the test. */
\r
321 cmp r0, #0xFF000000
\r
322 bne reg2_error_loopf
\r
323 cmp r1, #0x11000000
\r
324 bne reg2_error_loopf
\r
326 cmp r0, #0x22000000
\r
327 bne reg2_error_loopf
\r
328 cmp r1, #0x33000000
\r
329 bne reg2_error_loopf
\r
331 cmp r0, #0x44000000
\r
332 bne reg2_error_loopf
\r
333 cmp r1, #0x55000000
\r
334 bne reg2_error_loopf
\r
336 cmp r0, #0x66000000
\r
337 bne reg2_error_loopf
\r
338 cmp r1, #0x77000000
\r
339 bne reg2_error_loopf
\r
341 cmp r0, #0x88000000
\r
342 bne reg2_error_loopf
\r
343 cmp r1, #0x99000000
\r
344 bne reg2_error_loopf
\r
346 cmp r0, #0xAA000000
\r
347 bne reg2_error_loopf
\r
348 cmp r1, #0xBB000000
\r
349 bne reg2_error_loopf
\r
351 cmp r0, #0xFF000000
\r
352 bne reg2_error_loopf
\r
353 cmp r1, #0x11000000
\r
354 bne reg2_error_loopf
\r
356 cmp r0, #0x22000000
\r
357 bne reg2_error_loopf
\r
358 cmp r1, #0x33000000
\r
359 bne reg2_error_loopf
\r
361 cmp r0, #0x44000000
\r
362 bne reg2_error_loopf
\r
363 cmp r1, #0x55000000
\r
364 bne reg2_error_loopf
\r
366 cmp r0, #0x66000000
\r
367 bne reg2_error_loopf
\r
368 cmp r1, #0x77000000
\r
369 bne reg2_error_loopf
\r
371 cmp r0, #0x88000000
\r
372 bne reg2_error_loopf
\r
373 cmp r1, #0x99000000
\r
374 bne reg2_error_loopf
\r
376 cmp r0, #0xAA000000
\r
377 bne reg2_error_loopf
\r
378 cmp r1, #0xBB000000
\r
379 bne reg2_error_loopf
\r
381 cmp r0, #0xFF000000
\r
382 bne reg2_error_loopf
\r
383 cmp r1, #0x11000000
\r
384 bne reg2_error_loopf
\r
386 cmp r0, #0x22000000
\r
387 bne reg2_error_loopf
\r
388 cmp r1, #0x33000000
\r
389 bne reg2_error_loopf
\r
391 cmp r0, #0x44000000
\r
392 bne reg2_error_loopf
\r
393 cmp r1, #0x55000000
\r
394 bne reg2_error_loopf
\r
396 cmp r0, #0x66000000
\r
397 bne reg2_error_loopf
\r
398 cmp r1, #0x77000000
\r
399 bne reg2_error_loopf
\r
401 /* Restore the registers that were clobbered by the test. */
\r
404 /* VFP register test passed. Jump to the core register test. */
\r
408 /* If this line is hit then a VFP register value was found to be
\r
414 cmp r0, #0xFF000000
\r
415 bne reg2_error_loop
\r
416 cmp r1, #0x11000000
\r
417 bne reg2_error_loop
\r
418 cmp r2, #0x22000000
\r
419 bne reg2_error_loop
\r
420 cmp r3, #0x33000000
\r
421 bne reg2_error_loop
\r
422 cmp r4, #0x44000000
\r
423 bne reg2_error_loop
\r
424 cmp r5, #0x55000000
\r
425 bne reg2_error_loop
\r
426 cmp r6, #0x66000000
\r
427 bne reg2_error_loop
\r
428 cmp r7, #0x77000000
\r
429 bne reg2_error_loop
\r
430 cmp r8, #0x88000000
\r
431 bne reg2_error_loop
\r
432 cmp r9, #0x99000000
\r
433 bne reg2_error_loop
\r
434 cmp r10, #0xAA000000
\r
435 bne reg2_error_loop
\r
436 cmp r11, #0xBB000000
\r
437 bne reg2_error_loop
\r
438 cmp r12, #0xCC000000
\r
439 bne reg2_error_loop
\r
440 cmp r14, #0xEE000000
\r
441 bne reg2_error_loop
\r
443 /* Everything passed, increment the loop counter. */
\r
445 ldr r0, =ulRegTest2LoopCounter
\r
455 /* If this line is hit then there was an error in a core register value.
\r
456 The loop ensures the loop counter stops incrementing. */
\r