File: fet_error.c

package info (click to toggle)
mspdebug 0.25-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 4,700 kB
  • sloc: ansic: 67,821; makefile: 201; xml: 19
file content (153 lines) | stat: -rw-r--r-- 7,276 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/* MSPDebug - debugging tool for the eZ430
 * Copyright (C) 2009, 2010 Daniel Beer
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * Various constants and tables come from uif430, written by Robert
 * Kavaler (kavaler@diva.com). This is available under the same license
 * as this program, from www.relavak.com.
 */

#include "util.h"

/* These messages come from uif430 and from MSP430.DLL V3. */
static const char *error_strings[] =
{
	/*   0 */ "No error",
	/*   1 */ "Could not initialize device interface",
	/*   2 */ "Could not close device interface",
	/*   3 */ "Invalid parameter(s)",
	/*   4 */ "Could not find device or device not supported",
	/*   5 */ "Unknown device",
	/*   6 */ "Could not read device memory",
	/*   7 */ "Could not write device memory",
	/*   8 */ "Could not read device configuration fuses",
	/*   9 */ "Incorrectly configured device; device derivative not supported",

	/*  10 */ "Could not set device Vcc",
	/*  11 */ "Could not reset device",
	/*  12 */ "Could not preserve/restore device memory",
	/*  13 */ "Could not set device operating frequency",
	/*  14 */ "Could not erase device memory",
	/*  15 */ "Could not set device breakpoint",
	/*  16 */ "Could not single step device",
	/*  17 */ "Could not run device (to breakpoint)",
	/*  18 */ "Could not determine device state",
	/*  19 */ "Could not open Enhanced Emulation Module",

	/*  20 */ "Could not read Enhanced Emulation Module register",
	/*  21 */ "Could not write Enhanced Emulation Module register",
	/*  22 */ "Could not close Enhanced Emulation Module",
	/*  23 */ "File open error",
	/*  24 */ "File type could not be identified",
	/*  25 */ "File end error",
	/*  26 */ "File input/output error",
	/*  27 */ "File data error",
	/*  28 */ "Verification error",
	/*  29 */ "Could not blow device security fuse",

	/*  30 */ "Security fuse has been blown",
	/*  31 */ "Error within Intel hex file",
	/*  32 */ "Could not write device register",
	/*  33 */ "Could not read device register",
	/*  34 */ "Not supported by selected interface or interface is not initialized",
	/*  35 */ "Interface communication error",
	/*  36 */ "No external power supply detected",
	/*  37 */ "External power too low",
	/*  38 */ "External power detected",
	/*  39 */ "External power too high",

	/*  40 */ "Hardware self test error",
	/*  41 */ "Fast flash routine experienced a timeout",
	/*  42 */ "Could not create thread for polling",
	/*  43 */ "Could not initialize Enhanced Emulation Module",
	/*  44 */ "Insufficent resources",
	/*  45 */ "No clock control emulation on connected device",
	/*  46 */ "No state storage buffer implemented on connected device",
	/*  47 */ "Could not read trace buffer",
	/*  48 */ "Enable the variable watch function",
	/*  49 */ "No trigger sequencer implemented on connected device",

	/*  50 */ "Could not read sequencer state - sequencer is disabled",
	/*  51 */ "Could not remove trigger - used in sequencer",
	/*  52 */ "Could not set combination - trigger is used in sequencer",
	/*  53 */ "System Protection Module A is enabled - device locked",
	/*  54 */ "Invalid SPMA key was passed to the target device - device locked",
	/*  55 */ "Device does not accept any further SPMA keys - device locked",
	/*  56 */ "MSP-FET430UIF Firmware erased - bootloader active",
	/*  57 */ "Could not find MSP-FET430UIF on specified COM port",
	/*  58 */ "MSP-FET430UIF is already in use",
	/*  59 */ "EEM polling thread is already active",

	/*  60 */ "Could not terminate EEM polling thread",
	/*  61 */ "Could not unlock BSL memory segments",
	/*  62 */ "Could not perform access, BSL memory segments are protected",
	/*  63 */ "Another device as selected was found",
	/*  64 */ "Could not enable JTAG wrong password",
	/*  65 */ "Only one UIF must be connected during update to v3",
	/*  66 */ "CDC-USB-FET driver was not installed, please install the driver",
	/*  67 */ "Manual reboot of USB-FET needed! PLEASE unplug and reconnect your USB-FET!",
	/*  68 */ "Internal error",
	/*  69 */ "One of the connected eZ-FET debuggers needs recovery", /* Yes, this is actually repeated */

	/*  70 */ "One of the connected eZ-FET debuggers needs recovery", /* twice in SLAC460f MSP430.h */
	/*  71 */ "Feature not supported",
	/*  72 */ "Only one eZ-FET must be connected during recovery",
	/*  73 */ "eZ-FET recovery failed",
	/*  74 */ "eZ-FET core(communication layer) update failed",
	/*  75 */ "eZ-FET legacy module update failed",
	/*  76 */ "Energy Trace is not supported by the selected hardware",
	/*  77 */ "Hardware State is unknown",
	/*  78 */ "Device configuration data inconsistent. "
		  "Please discontinue using/replace target device.",
	/*  79 */ "EEM module not accessible while running in Ultra Low Power Debug Mode - "
		  "Deactivate Ultra Low Power Debug mode to enable this feature",

	/*  80 */ "Failed to remove software breakpoints, please reprogram target device",
	/*  81 */ "Trigger configuration conflicts with existing triggers",
	/*  82 */ "Operation not possible while device is running",
	/*  83 */ "This function can not be used when software breakpoints are enabled",
	/*  84 */ "JTAG/SBW speed configuration failed",
	/*  85 */ "Software breakpoint can't be set (followed by critical value)",
	/*  86 */ "EnergyTrace is not supported by selected MSP430 device",
	/*  87 */ "EnergyTrace requires Ultra-Low Power debug / LPMx.5 enabled",
	/*  88 */ "Legacy version of silicon used, which is no longer supported. "
		  "Please contact TI to obtain a newer version.",
	/*  89 */ "Secure device via the IDE is not supported. See Device User Guide "
		  "for further information.",

	/*  90 */ "Cycle counter is in basic mode. Set to advanced mode to use this function.",
	/*  91 */ "Parallel port FET (MSP-FETP430IF) is no longer supported.",
	/*  92 */ "Wrong target architecture was selected. "
		  "Valid architectures are MSP430 or MSP432_M4.",
	/*  93 */ "Mass erase executed. Please power-cycle your device and restart the debug session.",
	/*  94 */ "Your connected hardware might drain too much power from the debugger. "
		  "This results in an overcurrent.",
	/*  95 */ "MSP Tool firmware update failed. Please ensure the USB or Backchannel "
		  "UART connection is not in use.",
	/*  96 */ "MSP432 devices are not supported using the MSPFET430-UIF",
	/*  97 */ "DAP is locked or wrong debug protocol selected.",
	/*  98 */ "Device database not loaded.",

	/*  99 */ "Invalid error number",
};

const char *fet_error(int code)
{
	if (code < 0 || code >= ARRAY_LEN(error_strings))
		return "Unknown error";

	return error_strings[code];
}