1 /* Copyright Motorola, Inc. 1993, 1994
4 You are hereby granted a copyright license to use, modify, and
5 distribute the SOFTWARE so long as this entire notice is retained
6 without alteration in any modified and/or redistributed versions,
7 and that such modified versions are clearly identified as such.
8 No licenses are granted by implication, estoppel or otherwise under
9 any patents or trademarks of Motorola, Inc.
11 The SOFTWARE is provided on an "AS IS" basis and without warranty.
12 To the maximum extent permitted by applicable law, MOTOROLA DISCLAIMS
13 ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING IMPLIED
14 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
15 PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH
16 REGARD TO THE SOFTWARE (INCLUDING ANY MODIFIED VERSIONS
17 THEREOF) AND ANY ACCOMPANYING WRITTEN MATERIALS.
19 To the maximum extent permitted by applicable law, IN NO EVENT SHALL
20 MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER
21 (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF
22 BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
23 INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OF THE USE OR
24 INABILITY TO USE THE SOFTWARE. Motorola assumes no responsibility
25 for the maintenance and support of the SOFTWARE.
34 01234567890123456789012345678901234567890123456789012345678901234567890123456789
36 /* List define statements here */
38 /* These are for all the toolboxes and functions to use. These will help
39 to standardize the error handling in the current project */
41 /* this is the "data type" for the error
42 messages in the system */
43 #define STATUS unsigned int
45 /* this is a success status code */
48 /* likewise this is failure */
53 /* This first section of "defines" are for error codes ONLY. The called
54 routine will return one of these error codes to the caller. If the final
55 returned code is "VALID", then everything is a-okay. However, if one
56 of the functions returns a non-valid status, that error code should be
57 propogated back to all the callers. At the end, the last caller will
58 call an error_processing function, and send in the status which was
59 returned. It's up to the error_processing function to determine which
60 error occured (as indicated by the status), and print an appropriate
61 message back to the user.
63 /*----------------------------------------------------------------------*/
64 /* these are specifically for the parser routines */
66 #define UNKNOWN_COMMAND 0xfb00 /* "unrecognized command " */
67 #define UNKNOWN_REGISTER 0xfb01 /* "unknown register "*/
68 #define ILLEGAL_RD_STAGE 0xfb02 /* cannot specify reg. family in range*/
69 #define ILLEGAL_REG_FAMILY 0xfb03 /* "cannot specify a range of special
70 or miscellaneous registers"*/
71 #define RANGE_CROSS_FAMILY 0xfb04 /* "cannot specify a range across
73 #define UNIMPLEMENTED_STAGE 0xfb05 /* invalid rd or rmm parameter format */
74 #define REG_NOT_WRITEABLE 0xfb06 /* "unknown operator in arguements"*/
75 #define INVALID_FILENAME 0xfb07 /* "invalid download filename" */
76 #define INVALID_BAUD_RATE 0xfb08 /* invalid baud rate from sb command */
77 #define UNSUPPORTED_REGISTER 0xfb09 /* Special register is not supported */
78 #define FOR_BOARD_ONLY 0xfb0a /* "Not available for Unix." */
81 /*----------------------------------------------------------------------*/
82 /* these are for the error checking toolbox */
84 #define INVALID 0xfd00 /* NOT valid */
85 #define VALID 0xfd01 /* valid */
87 /* This error is found in the fcn:
88 is_right_size_input() to indicate
89 that the input was not 8 characters
91 #define INVALID_SIZE 0xfd02
93 /* This error is found in the fcn:
94 is_valid_address_range() to indicate
95 that the address given falls outside
96 of valid memory defined by MEM_START
99 #define OUT_OF_BOUNDS_ADDRESS 0xfd03
101 /* This error is found in the fcn:
102 is_valid_hex_input() to indicate that
103 one of more of the characters entered
104 are not valid hex characters. Valid
105 hex characters are 0-9, A-F, a-f.
107 #define INVALID_HEX_INPUT 0xfd04
109 /* This error is found in the fcn:
110 is_valid_register_number() to indicate
111 that a given register does not exist.
113 #define REG_NOT_READABLE 0xfd05
115 /* This error is found in the fcn:
116 is_word_aligned_address() to indicate
117 that the given address is not word-
118 aligned. A word-aligned address ends
121 #define NOT_WORD_ALIGNED 0xfd07
123 /* This error is found in the fcn:
124 is_valid_address_range() to indicate
125 that the starting address is greater
126 than the ending address.
128 #define REVERSED_ADDRESS 0xfd08
130 /* this error tells us that the address
131 specified as the destination is within
132 the source addresses */
133 #define RANGE_OVERLAP 0xfd09
136 #define ERROR 0xfd0a /* An error occured */
137 #define INVALID_PARAM 0xfd0b /* "invalid input parameter " */
140 #define INVALID_FLAG 0xfd0c /* invalid flag */
142 /*----------------------------------------------------------------------*/
143 /* these are for the getarg toolbox */
145 #define INVALID_NUMBER_ARGS 0xFE00 /* invalid number of commd arguements */
146 #define UNKNOWN_PARAMETER 0xFE01 /* "unknown type of parameter "*/
149 /*----------------------------------------------------------------------*/
150 /* these are for the tokenizer toolbox */
152 #define ILLEGAL_CHARACTER 0xFF00 /* unrecognized char. in input stream*/
153 #define TTL_NOT_SORTED 0xFF01 /* token translation list not sorted */
154 #define TTL_NOT_DEFINED 0xFF02 /* token translation list not assigned*/
155 #define INVALID_STRING 0xFF03 /* unable to extract string from input */
156 #define BUFFER_EMPTY 0xFF04 /* "input buffer is empty" */
157 #define INVALID_MODE 0xFF05 /* input buf is in an unrecognized mode*/
158 #define TOK_INTERNAL_ERROR 0xFF06 /* "internal tokenizer error" */
159 #define TOO_MANY_IBS 0xFF07 /* "too many open input buffers" */
160 #define NO_OPEN_IBS 0xFF08 /* "no open input buffers" */
163 /* these are for the read from screen toolbox */
165 #define RESERVED_WORD 0xFC00 /* used a reserved word as an arguement*/
168 /* these are for the breakpoint routines */
170 #define FULL_BPDS 0xFA00 /* breakpoint data structure is full */
173 /* THESE are for the downloader */
175 #define NOT_IN_S_RECORD_FORMAT 0xf900 /* "not in S-Record Format" */
176 #define UNREC_RECORD_TYPE 0xf901 /* "unrecognized record type" */
177 #define CONVERSION_ERROR 0xf902 /* "ascii to int conversion error" */
178 #define INVALID_MEMORY 0xf903 /* "bad s-record memory address " */
181 /* these are for the compression and decompression stuff */
183 #define COMP_UNK_CHARACTER 0xf800 /* "unknown compressed character " */
185 #define COMP_UNKNOWN_STATE 0xf801 /* "unknown binary state" */
187 #define NOT_IN_COMPRESSED_FORMAT 0xf802 /* not in compressed S-Record format */
190 /* these are for the DUART handling things */
192 /* "unrecognized serial port configuration" */
193 #define UNKNOWN_PORT_STATE 0xf700
196 /* these are for the register toolbox */
198 /* "cannot find register in special
199 purpose register file " */
200 #define SPR_NOT_FOUND 0xf600
203 /* these are for the duart specific stuff */
205 /* "transparent mode needs access to
207 #define TM_NEEDS_BOTH_PORTS 0xf500
210 /*----------------------------------------------------------------------*/
211 /* these are specifically for the flash routines */
212 #define FLASH_ERROR 0xf100 /* general flash error */