Commit Graph

209 Commits

Author SHA1 Message Date
Tamas TEVESZ b24703923f Add FET error codes from MSP430DLL v3.8.1.0000 (SLAC460r) 2016-08-31 15:16:51 +02:00
David Siroky 1d54d8e3f5 flash_bsl_destroy: use GPIO if requested 2016-07-27 10:17:13 +02:00
David Siroky 3eefaaf3e7 don't unexport GPIO DTR/RTS if exported before 2016-07-27 10:17:08 +02:00
David Siroky 88b37e5007 flash-bsl RTS/DTR via GPIO 2016-07-18 16:05:16 +02:00
zcsahok 7cbc37c633 drivers/goodfet.c: initialize driver struct 2016-04-20 23:09:56 +02:00
Daniel Beer 045c299b31 fet_db: fix incorrect FUSES for MSP430F2274. 2016-01-29 08:19:01 +13:00
Daniel Beer 561118dd21 device: always probe, and fix FRAM detection. 2016-01-01 12:02:28 +13:00
Daniel Beer 89e6174b9f Show triggered breakpoints (and watchpoints in sim).
The "regs" command indicates when the PC is sitting on an enabled
breakpoint. The simulator emits debug output when a watchpoint is
triggered by a simulated instruction.
2015-12-11 08:38:42 +13:00
zcsahok 38ea6143cd added common readmem/writemem implementation with alignment and memory range checking
changed pif and goodfet to use common readmem/writemem
2015-10-24 15:48:21 +02:00
zcsahok 70a5480c15 device.c: added tlv_read and tlv_find 2015-10-22 21:03:02 +02:00
zcsahok f5f881bc33 added optional common chip identification 2015-10-21 08:20:15 +02:00
zcsahok be92e35742 goodfet.c: fix flash start address 2015-10-16 21:45:43 +02:00
Daniel Beer cb765f639d fet_core: reset after erase.
Some versions of the Olimex MSP-JTAG-TINY v2 require this for correct
JTAG function following an erase.
2015-06-11 09:24:27 +12:00
Daniel Beer f1f513e013 tilib_api: add support for SLAC460L API. 2015-06-10 12:31:08 +12:00
Daniel Beer 7869fb7f6a tilib: don't use clientHandle.
On 64-bit Windows systems, this callback argument isn't big enough to
hold a pointer. Use a global static variable instead.
2015-06-08 11:40:06 +12:00
Daniel Beer 4ea3856202 tilib_api: indirection layer for TI library dynamic loading. 2015-06-08 11:37:25 +12:00
Daniel Beer 56318beed1 drivers/fet_proto.c: deal with spurious 0xff from Olimex adapter.
The Olimex JTAG adapter occasionally emits an extra 0xff before sending
its reply to the C_INITIALIZE message. A small change to the FET packet
parser works around this.

Problem and original solution reported by Yingwei Li <ysulyw@gmail.com>.
2015-05-11 13:01:49 +12:00
Eric Price 76de9f7439 Added MSP430F5255 device description to fet_db
Entry added for chip ID 0x0382 (MSP430F5255)

Flash/RAM Memory layout and EEM debugging facilities have been set
according to device data-sheet.  (msg28_data, msg29_data,
MSP430_STORED_INFO entries)

Flags and Parameters in msg2b_data copied from MSP430F5437A - couldn't
find any documentation on those.  msg29_params copied from MSP430F5437A
- couldn't find any documentation on those

Chip detection, flashing and single step debugging with gdb tested with
MSP430F5255 using olimex-v1 hw-debugger

Signed-off-by: Jan Willeke <willeke@smartmote.de>
2015-04-14 09:14:10 +12:00
Peter Bägel (DF5EQ) fdaad416b2 jtaglib: implement breakpoints. 2015-02-24 11:58:40 +13:00
Peter Bägel (DF5EQ) 320e560b99 jtaglib: implement single-stepping. 2015-02-24 11:37:29 +13:00
Jan Willeke 1be4ed0679 gpio driver Add gpio driver interface.
Signed-off-by: Jan Willeke <willeke@smartmote.de>
2015-02-04 12:48:30 +13:00
Jan Willeke 9497265e72 gpio driver prepare patch
moves jtdev functions to pointers, to exchange late on.

Signed-off-by: Jan Willeke <willeke@smartmote.de>
2015-02-04 12:48:30 +13:00
Ingo Donasch 7e04b31e65 pif: fix flash address range. 2015-01-03 10:01:13 +13:00
Tamas TEVESZ 4cb44ffc72 Add FET error codes from MSP430DLL v3.4.3.4 (SLAC460k) 2014-12-29 11:17:23 +13:00
Jason K. Smith 7abeef34c3 sim: correct cycle count when using constant generators
When the source register is R2 (SR) or R3 the cycle counts match
register mode for any value of the source-register addressing mode (As).
2014-12-16 10:04:20 +13:00
Paolo Zebelloni c0d3fbe21a BSL entry via GPIO toggling. 2014-12-15 09:06:30 +13:00
Daniel Beer e07ea5bae6 fet_olimex_db: use a terminator record instead of a fixed array size. 2014-12-15 09:04:38 +13:00
Daniel Beer bac7d08653 fet_olimex_db: remove duplicated records. 2014-12-09 08:17:34 +13:00
Daniel Beer 166a99f2ab fet_olimex_db: add support for MSP430G2955.
Adapted from an older patch from Paul Haddad <paul@pth.com>.
2014-11-18 12:53:26 +13:00
Daniel Beer d2f8592124 rom_bsl: ROM bootstrap loader driver. 2014-04-17 15:58:16 +12:00
Daniel Beer 651d18e121 bsllib: separate modem control line sequencing. 2014-04-02 14:48:42 +13:00
Daniel Beer 4417bf82a7 flash_bsl: allow specification of custom entry/exit sequences. 2014-04-02 12:39:01 +13:00
Daniel Beer 2c7df22f4a Fix build errors on Windows. 2014-03-08 17:55:07 +13:00
Tamas TEVESZ a69609a7d1 Add FET error codes from MSP430DLL v3.4.0.20 (SLAC460h)
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2014-02-16 09:38:00 +13:00
Caso Caso b23f0a4afb fet_db: updated and improved database. 2014-02-09 20:37:22 +13:00
Daniel Beer 912aad2f44 v3hil: fix DCO/FLL calibration.
Reply was being truncated and then we were sending the wrong buffer in
the memory write call.

Pointed out by Eric Decker <cire831@gmail.com>.
2014-02-09 20:34:23 +13:00
Jose Angel Caso Sanchez 78f26b5a5e New FET v2 database extracted from MSP430.DLL. 2014-02-07 10:43:42 +13:00
Daniel Beer ad4e27c1a2 sim: bug fix: @SP+ always increments by 2.
The same rules for PC apply to the stack pointer. Even when byte-mode
instructions are executed, the stack pointer is incremented by a whole
word when using the indirect increment addressing mode.
2013-12-26 16:34:09 +13:00
Tamas TEVESZ 55671036a6 Re-style drivers/jtaglib.{c,h} to match the rest of the code
Strictly style changes only.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2013-12-13 06:37:04 +13:00
Tamas TEVESZ 91289a24a7 Fixes for DragonFly BSD
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2013-12-13 06:36:31 +13:00
Tamas TEVESZ 6501828e2d DragonFly BSD bits in serial port and pif stuff
These bits should work the same as on FreeBSD.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2013-12-12 09:05:02 +13:00
Tamas TEVESZ cc4a35bb12 Make pif driver work in FreeBSD.
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2013-12-11 15:15:51 +13:00
Tamas TEVESZ 16a25f206a Rework Unix delay_s()/delay_ms()
Make delay_ms() sleep through the entire specified interval unless
Ctrl-C is pressed;

Using this feature, simplify Ctrl-C checking in places.
2013-12-07 10:16:41 +13:00
Daniel Beer 74d01ff269 bsl: add missing address increment. 2013-12-05 11:13:52 +13:00
Daniel Beer 5c1805ff2b JTAG fuse blow: add "blow_jtag_fuse" command.
Support exists for this command on FET-like devices (including Olimex)
and the tilib driver.
2013-12-03 07:27:32 +13:00
Daniel Beer b2185061b7 Supress debug chatter in quiet mode. 2013-10-26 09:59:48 +13:00
Tamas TEVESZ d8ff487e20 Typo: it's SLAC460, not SLAC060. 2013-09-30 08:58:53 +13:00
Daniel Beer 04b09dbbd7 v3hil: don't configure ASSERT_BSL_VALID_BIT.
This option is not implemented by all firmware versions.
2013-09-28 11:44:35 +12:00
Tamas TEVESZ 349c96faa8 Add FET error codes from MSP430.dll v3.3.01.003
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2013-09-26 08:03:08 +12:00
Daniel Beer 520b9cd071 flash_bsl: correct entry sequence.
Contributed by Micle Chebotarev <mcheb@yandex.ru>.
2013-09-16 16:28:29 +12:00
Daniel Beer fb3617e486 fet_olimex_db: fix support for MSP430FR5739.
Changes made and tested by Sanne Ausma <sanneausma@gmail.com>.
2013-09-10 12:17:34 +12:00
Daniel Beer 0e58358bb1 fet3: driver for eZ-FET debuggers.
This driver is experimental. It supports flash/memory access and basic
CPU control. It doesn't support breakpoints.
2013-09-08 13:41:55 +12:00
Daniel Beer a64c940a20 loadbsl: trigger PUC on exit. 2013-07-23 10:28:52 +12:00
Daniel Beer 0c5751275d loadbsl: retry password if first attempt fails. 2013-07-22 11:04:19 +12:00
Daniel Beer d3b57a5cd7 New driver: load-bsl.
This driver supports the USB bootstrap loader. An initial version query
is performed on startup. If the running loader is not sufficiently
featureful, a software image for an upgraded BSL is loaded into the
chip's RAM and executed.
2013-07-18 14:03:29 +12:00
Mario Werner 47c0349de2 Fixed DADD implementation.
Implemented DADD as addition of BCD numbers like it is supposed to be.
2013-05-27 09:05:36 +12:00
Mario Werner ef41b1cbab Fixed cycle counts in disassembly.
Fixed the cycle count for single op indirect and autoincrement
addressing.
2013-05-27 09:05:36 +12:00
Mario Werner c141f5e5e1 Fixed symbolic addressing mode
Due to a too early increment of the program counter all symbolic
addressed x(PC) memory accesses have offseted by 2.
2013-05-27 09:05:36 +12:00
Daniel Beer df6f0ec3bc Add --fet-skip-close option.
Supplying this option causes the JTAG close procedure to be skipped
when closing the FET driver.
2013-05-21 15:59:17 +12:00
Daniel Beer 9226cbf566 Add support for MSP430FR5729. 2013-05-14 21:42:02 +12:00
Daniel Beer cb4091f121 fet_core: fall-back on Olimex identification database. 2013-04-23 08:32:11 +12:00
Paul Haddad a0499ab6f0 Add support for MSP430G2955. 2013-04-05 09:43:24 +13:00
Daniel Beer eacf4b8be4 sim: fix PC-relative operand fetch.
Index should be relative to the value of PC after fetching the index
word.
2013-03-26 09:25:33 +13:00
Daniel Beer 9bbe525776 Add support for MSP430FR5728. 2013-03-10 16:25:58 +13:00
Daniel Beer 5ccf2e35d2 fet_core: fix segment erase.
A non-zero length must be supplied to the firmware.
2013-03-10 15:28:36 +13:00
Daniel Beer a304b60dc9 fet_core: fix missing newline in debug message. 2013-02-22 10:45:05 +13:00
Daniel Beer e9b6a77414 dis/sim: fix handling of opcodes with two indexed operands.
If the source operand is indexed, and the destination is symbolic (PC +
index), then the base for the destination index is the program counter
*after* having fetched the source index.

Also, the addition of the index is done modulo 2^16 if the base points
within the lower 64 kB of memory.
2013-02-11 11:08:43 +13:00
Daniel Beer 72e781d0eb fet_core: Add workaround for CC5137 replug problem.
This chip needs to be replugged if the the shutdown procedure (reset and
close) runs. We look for the chip's ID and skip the procedure if it
matches.
2013-02-01 08:09:38 +13:00
Daniel Beer 2924dee3a2 fet: experimental support for Info A/BSL flash access. 2013-01-31 14:29:14 +13:00
Daniel Beer fd0199901c tilib: support for Info A/BSL flash access.
Two new boolean options have been added: "enable_locked_flash_access"
and "enable_bsl_access".
2013-01-31 13:54:19 +13:00
Daniel Beer 46ac7a75a9 tilib: fix segment erase.
A non-zero length is required to erase segments.
2013-01-31 13:22:05 +13:00
Wolfgang Schwotzer 85c023d758 Support for MSP430FG4616. 2013-01-27 10:40:37 +13:00
Bruce G. Burns db94eab4b2 Simulator bug fixes.
Fix handling of V flag, and ensure that high byte is discarded for byte
operations.
2013-01-14 16:47:59 +13:00
Pavel Vymetálek e491e14c3d fet_db: add support for MSP430G2352 2012-12-03 12:04:58 +13:00
Daniel Beer 21fc0d904f fet_db: add support for MSP430F2416
Based on ID data from Pawel Jewstafjew <pawel.jewstafjew@gmail.com>.
2012-11-23 11:41:45 +13:00
Daniel Beer 277a795f01 Add power sample output. 2012-10-24 09:37:46 +13:00
Daniel Beer 43735da212 fet: fix support for MSP430F2418/2618. 2012-10-22 16:43:07 +13:00
Daniel Beer e14a578555 Parallel JTAG driver (Linux only for now).
Based on a patch submitted by Peter Bägel <peter@baegel.de>.
2012-10-12 11:33:20 +13:00
Daniel Beer 61fdfd22ff Better threading functions.
Change prefix to "thread_" and add functions for thread creation and
condition variables.
2012-10-09 15:28:49 +13:00
Daniel Beer 18cf2a561f Separate and clean up break handling.
Ctrl+C handling is done in ctrlc.c, and a break condition now persists
until the interactive reader begins to process the next command. The
condition is cleared by calling ctrlc_clear().
2012-10-09 09:55:48 +13:00
Daniel Beer e4f582b0d7 Fix Ctrl+C handling under Cygwin. 2012-10-04 14:45:57 +12:00
Daniel Beer 3da52fe100 fet: fix unused variable warning. 2012-10-04 14:24:44 +12:00
Daniel Beer cc5aed4c6d Power history support.
This adds a "power" command which can be used to dump power history
samples gathered by the device driver.
2012-10-03 16:29:55 +13:00
Daniel Beer 1973746d33 New chip identification database for Olimex debuggers.
The devicelist table maps chip ID bytes to an enum of devicetype_t. A
separate table provides configuration data for each value of
devicetype_t.

Original patch submitted by Stanimir Bonev <bonev_st@abv.bg>.
2012-10-03 13:41:59 +13:00
Daniel Beer c5e93345a0 fet_proto: capture FET error code. 2012-10-03 13:36:09 +13:00
Daniel Beer 1de9e43187 Better Olimex compatibility.
Timeouts have been increased to 30 seconds. Reset is not sent until
after enabling power.
2012-09-28 06:37:32 +12:00
Daniel Beer ce64ff10b5 bsl: add support for raw USB access. 2012-09-19 09:02:35 +12:00
Daniel Beer 15bfda5b6d Split FET constructors from core methods.
Constructors and device class definitions are now contained in fet.c.
The methods which implement the device interface are in fet_core.c, and
these are independent of how the device object is constructed.
2012-09-18 11:17:55 +12:00
Daniel Beer 1ac9f30024 Separate FET packet parser from driver. 2012-09-13 15:49:19 +12:00
Daniel Beer 837e1d8e00 Replace "olimex_iso" transport with generic "ftdi".
Constructor now takes arguments for vendor/product IDs and baud rate.
2012-09-13 14:53:30 +12:00
Daniel Beer 1392cea7e1 Replace "uif" transport with generic "comport".
The new transport accepts an arbitrary baud rate instead of a
device-type enum.
2012-09-13 14:33:04 +12:00
Daniel Beer 162d1bc951 Separate Olimex transports and drivers.
The "olimex" transport has been divided into "cp210x" and "cdc_acm",
each of which take a specific vendor/product combination in their
constructor. Support for the MSP430-JTAG-ISO-MK2 has been moved into its
own driver instance.
2012-09-13 14:14:59 +12:00
Daniel Beer 6037c12291 Add support for Olimex firmware updates. 2012-09-11 14:35:31 +12:00
Daniel Beer d844adf828 Separate transports from drivers.
The transport/ subdirectory now contains implementations of the
transport_t interface, which has been expanded to include flush and
set_modem operations.
2012-09-10 14:22:00 +12:00
Daniel Beer 239fbb7f94 fet: don't send code memory start address with erase request.
Instead, use 0xfffe. This address is always within the range of main
memory, and should allow the request to work even if the chip has been
misidentified.
2012-08-23 16:14:07 +12:00
Daniel Beer 9f4bb5f303 tilib: fix breakpoint refresh.
If a breakpoint is set and then removed, with no refresh in between,
then no handle is ever assigned and so a request to remove the
breakpoint will fail.
2012-08-23 15:00:44 +12:00
Daniel Beer f9d271cd64 tilib: fix calling convention for Cygwin.
WINAPI wasn't getting defined with gcc-3.
2012-08-23 14:27:27 +12:00
Daniel Beer ff42788071 printc: add printf attribute. 2012-08-17 07:37:56 +12:00
Daniel Beer 53dd7f8188 Add support for MSP430F5521. 2012-08-16 08:55:13 +12:00
Tamas TEVESZ 84866b78cc fet: Error messages from MSP430DLLv3 version 3.2.4.5. 2012-08-15 11:34:28 +12:00