2 FreeRTOS V9.0.0 - Copyright (C) 2016 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
72 #include <sys/asm.h>
\r
78 /* Reg test macro helper. Test a register for a known value branching to
\r
79 error_loop if not correct otherwise continuing on */
\r
80 .macro portREG_TEST work_reg, test_reg, test_value
\r
85 /* Check each register maintains the value assigned to it for the lifetime
\r
87 addiu \work_reg, $0, 0x00
\r
88 addiu \work_reg, \test_reg, -\test_value
\r
89 beq \work_reg, $0, 1f
\r
91 /* The register value was not that expected. Jump to the error loop so the
\r
92 cycle counter stops incrementing. */
\r
104 /* Reg test tasks call the error loop when they find an error. Sitting in the
\r
105 tight error loop prevents them incrementing their ulRegTestnCycles counter, and
\r
106 so allows the check softwate timer to know an error has been found. */
\r
120 /* Fill the registers with known values. */
\r
124 /* $4 contains the address of the loop counter - don't mess with $4. */
\r
130 addiu $10, $0, 0x110
\r
131 addiu $11, $0, 0x111
\r
132 addiu $12, $0, 0x112
\r
133 addiu $13, $0, 0x113
\r
134 addiu $14, $0, 0x114
\r
135 addiu $15, $0, 0x115
\r
136 addiu $16, $0, 0x116
\r
137 addiu $17, $0, 0x117
\r
138 addiu $18, $0, 0x118
\r
139 addiu $19, $0, 0x119
\r
140 addiu $20, $0, 0x120
\r
141 addiu $21, $0, 0x121
\r
142 addiu $23, $0, 0x123
\r
143 addiu $24, $0, 0x124
\r
144 addiu $25, $0, 0x125
\r
145 addiu $30, $0, 0x130
\r
146 addiu $22, $0, 0x131
\r
149 portREG_TEST $22, $1, 0x11
\r
150 portREG_TEST $22, $2, 0x12
\r
151 portREG_TEST $22, $3, 0x13
\r
152 portREG_TEST $22, $5, 0x15
\r
153 portREG_TEST $22, $6, 0x16
\r
154 portREG_TEST $22, $7, 0x17
\r
155 portREG_TEST $22, $8, 0x18
\r
156 portREG_TEST $22, $9, 0x19
\r
157 portREG_TEST $22, $10, 0x110
\r
158 portREG_TEST $22, $11, 0x111
\r
159 portREG_TEST $22, $12, 0x112
\r
160 portREG_TEST $22, $13, 0x113
\r
161 portREG_TEST $22, $14, 0x114
\r
162 portREG_TEST $22, $15, 0x115
\r
163 portREG_TEST $22, $16, 0x116
\r
164 portREG_TEST $22, $17, 0x117
\r
165 portREG_TEST $22, $18, 0x118
\r
166 portREG_TEST $22, $19, 0x119
\r
167 portREG_TEST $22, $20, 0x120
\r
168 portREG_TEST $22, $21, 0x121
\r
169 portREG_TEST $22, $23, 0x123
\r
170 portREG_TEST $22, $24, 0x124
\r
171 portREG_TEST $22, $25, 0x125
\r
172 portREG_TEST $22, $30, 0x130
\r
174 /* No errors detected. Increment the loop count so the check timer knows
\r
175 this task is still running without error, then loop back to do it all
\r
176 again. The address of the loop counter is in $4. */
\r
178 addiu $22, $22, 0x01
\r
195 /* $4 contains the address of the loop counter - don't mess with $4. */
\r
201 addiu $10, $0, 0x210
\r
202 addiu $11, $0, 0x211
\r
203 addiu $12, $0, 0x212
\r
204 addiu $13, $0, 0x213
\r
205 addiu $14, $0, 0x214
\r
206 addiu $15, $0, 0x215
\r
207 addiu $16, $0, 0x216
\r
208 addiu $17, $0, 0x217
\r
209 addiu $18, $0, 0x218
\r
210 addiu $19, $0, 0x219
\r
211 addiu $20, $0, 0x220
\r
212 addiu $21, $0, 0x221
\r
213 addiu $23, $0, 0x223
\r
214 addiu $24, $0, 0x224
\r
215 addiu $25, $0, 0x225
\r
216 addiu $30, $0, 0x230
\r
217 addiu $22, $0, 0x231
\r
220 portREG_TEST $22, $1, 0x21
\r
221 portREG_TEST $22, $2, 0x22
\r
222 portREG_TEST $22, $3, 0x23
\r
223 portREG_TEST $22, $5, 0x25
\r
224 portREG_TEST $22, $6, 0x26
\r
225 portREG_TEST $22, $7, 0x27
\r
226 portREG_TEST $22, $8, 0x28
\r
227 portREG_TEST $22, $9, 0x29
\r
228 portREG_TEST $22, $10, 0x210
\r
229 portREG_TEST $22, $11, 0x211
\r
230 portREG_TEST $22, $12, 0x212
\r
231 portREG_TEST $22, $13, 0x213
\r
232 portREG_TEST $22, $14, 0x214
\r
233 portREG_TEST $22, $15, 0x215
\r
234 portREG_TEST $22, $16, 0x216
\r
235 portREG_TEST $22, $17, 0x217
\r
236 portREG_TEST $22, $18, 0x218
\r
237 portREG_TEST $22, $19, 0x219
\r
238 portREG_TEST $22, $20, 0x220
\r
239 portREG_TEST $22, $21, 0x221
\r
240 portREG_TEST $22, $23, 0x223
\r
241 portREG_TEST $22, $24, 0x224
\r
242 portREG_TEST $22, $25, 0x225
\r
243 portREG_TEST $22, $30, 0x230
\r
245 /* No errors detected. Increment the loop count so the check timer knows
\r
246 this task is still running without error, then loop back to do it all
\r
247 again. The address of the loop counter is in $4. */
\r
249 addiu $22, $22, 0x01
\r