Commit Graph

209 Commits

Author SHA1 Message Date
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
Daniel Beer c717eed96d device_probe_id: all output should be debug output. 2012-08-15 08:59:45 +12:00
Daniel Beer 29dfb4da84 Stop using usleep().
Use nanosleep() on Unix-like systems, and Sleep() on Windows.
2012-08-14 15:51:22 +12:00
Daniel Beer 4ab905751c fet: different exit procedure for FRAM devices.
This is a partial revert to 0e5c38231b.
We detect whether the chip is an FRAM device at exit, and use a
different reset type if it is. The referenced commit broke the RST pin
on older chips.
2012-08-10 08:34:35 +12:00
Daniel Beer ae9c212f37 Make device_erase a no-op for FRAM chips. 2012-08-09 15:34:06 +12:00
Daniel Beer 886fbd59c9 Probe chip ID bytes on startup. 2012-08-09 15:33:56 +12:00
Daniel Beer 0e5c38231b rf2500: separate reset and run on exit.
This was causing a problem with the MSP430FR5739. Exiting and restarting
mspdebug would cause the reset vector (0xfffe) to be overwritten with
0xff 0xff. This didn't happen if you repowered the board between the
exit and restart.
2012-08-01 11:32:19 +12:00
Tamas TEVESZ e02567a712 Merge F2012 and G2231 2012-07-23 09:33:44 +12:00
Daniel Beer 1e36394136 Implemented basic GoodFET support. 2012-07-18 12:26:55 +12:00
Daniel Beer eae3026f5a flash_bsl: fix error with large block sizes. 2012-07-16 10:05:46 +12:00
Daniel Beer 69f3a15187 fet_db: updated MSP430G2452.
New data contributed by Marc de Hoop <marc@springuin.nl>.
2012-07-06 08:56:34 +12:00
Daniel Beer 08cd326e66 Fix support for MSP430F2618.
Breakpoint count is stored as a byte, not a 16-bit word.
2012-07-06 08:50:44 +12:00
Daniel Beer 546d716380 fet_db: merge 2553, 2403.
These chips can't be distinguished by their ID data.
2012-06-27 14:46:41 +12:00
Daniel Beer e6cb2dc51d tilib: fix DEVICE_ERASE_MAIN.
The address given to the library must be one inside main memory.
2012-06-19 10:08:48 +12:00
Daniel Beer c243ed04dc Add support for MSP430F6435.
Data contributed by Marc de Hoop <marc@springuin.nl>
2012-06-15 10:13:20 +12:00
Peter A. Bigot dd2c6d997c Avoid truncating breakpoint address
Use of uint16_t caused the stored breakpoint address to be wrong.  However,
breakpoints above 64 kiB don't seem to work even with this, so there may
also be a FET issue.
2012-06-13 09:43:04 +12:00
Daniel Beer d0b0b04cef Add support for MSP430G2403. 2012-06-09 11:50:23 +12:00
Thomas Webel eb7da81c9c Added support for MSP430F2252. 2012-05-15 08:38:25 +12:00
Daniel Beer 6fd161faa7 Add delay_s() for portable sleep() substitute. 2012-05-10 10:00:12 +12:00
Wayne Uroda 2ce7a82657 tilib: automatically detect path to uif when -d is not specified. 2012-04-28 08:45:13 +12:00
Daniel Beer 09ca20c91c Add support for read and write watchpoints. 2012-04-25 14:10:26 +12:00
Daniel Beer 7413531715 gdbc: watchpoint support. 2012-04-25 13:31:56 +12:00
Daniel Beer f1e99c38d3 sim: implement watchpoint support. 2012-04-25 13:31:00 +12:00
Daniel Beer a354116441 Watchpoint support (only implemented for tilib driver). 2012-04-25 12:43:14 +12:00
Daniel Beer a914bc732d Add support for building on Cygwin.
The symbol __Windows__ is defined when building a native (non-Cygwin)
binary.
2012-04-25 11:02:22 +12:00
Daniel Beer 97f8dce833 fet: remove message 0x30.
This apparently isn't necessary after all, and may be the cause of the
high rate of "fuse blown" errors.
2012-03-08 09:20:25 +13:00
Roland Haag 4e2185a408 fet: show more chip information (code/RAM ranges). 2012-03-07 10:08:01 +13:00
Daniel Beer 9f4d327c24 Support for MSP430F6736. 2012-03-07 10:06:01 +13:00
Daniel Beer af30ea095a olimex_iso: fix compilation warnings. 2012-03-03 09:54:11 +13:00
Daniel Beer f5f50d0fea Fix tty driver for Olimex MSP430-JTAG-ISO. 2012-03-02 14:19:39 +13:00
Daniel Beer e79d102937 olimex_iso: fix compiler warnings on non-Linux systems. 2012-03-02 14:13:49 +13:00
Daniel Beer 902c2903c3 Add raw USB driver for Olimex MSP430-JTAG-ISO. 2012-03-02 12:13:11 +13:00
Daniel Beer cf5b7f3399 Handle non-standard baud rates in sport_open().
This should allow the use of the Olimex MSP430-JTAG-ISO on Windows (and
other platforms, if handling is implemented).
2012-02-29 16:59:41 +13:00
Daniel Beer 68f968a637 sport: accept baud rates as a plain integer instead of a B* constant.
Integer baud rates are converted to B* constants in the implementation.
2012-02-29 16:29:00 +13:00
Daniel Beer 25da331e21 olimex: fix usbtr_recv.
Partial sends need to skip the sent portion of the buffer before
retrying.
2012-02-29 16:08:26 +13:00
Daniel Beer bdce08a84a ti3410: bug fixes for USB send/receive.
Send was not skipping buffer position on partial writes. Receive should
not return unless data is available (or a timeout occurs).
2012-02-29 16:04:44 +13:00
Daniel Beer d621ad7050 fet: always reset on startup with olimex driver.
The latest v2 MSP430-JTAG-TINY devices need a reset to be issued on
startup.
2012-02-24 10:41:57 +13:00
Daniel Beer 7bf79f4508 Add support for MSP430F2418.
Data supplied by Márton Miklós <martonmiklosqdev@gmail.com>.
2012-01-07 10:01:52 +13:00
Nick Nobody b21b611962 Add support for MSP430F5329. 2012-01-06 09:20:17 +13:00
Daniel Beer 711ffbfd1a olimex: fix V2 tty access, and introduce olimex-v1 driver.
The olimex-v1 driver must be used when accessing a V1 device via the
tty interface.
2011-12-26 11:22:04 +13:00
Daniel Beer f501ab0843 olimex: fix V2 startup errors.
Configuring modem control lines and baud rate is only required for V1
devices.
2011-12-26 11:09:13 +13:00
Daniel Beer c425c497e8 Added support for MSP430F5342. 2011-12-21 09:20:42 +13:00
Daniel Beer 82ec966d5e tilib: add --require-fw-update option for forced image loading. 2011-12-14 13:11:29 +13:00
Daniel Beer 805b022a68 uif-bsl: attempt BSL access even if FET firmware is non-operational. 2011-12-14 13:11:02 +13:00
Daniel Beer 6060b8d1b0 Fix TI library structure definitions: int32_t -> LONG. 2011-11-16 13:45:27 +13:00
Tamas TEVESZ e014e4c6d5 Modernise decl styles 2011-11-16 08:42:45 +13:00
Tamas TEVESZ d98d990752 Kill unused variables
Mark those that are unused but can't be killed accordingly.
2011-11-15 09:26:35 +13:00
Tamas TEVESZ 033ef33c3f Stramline Olimex error handling
- Make open_interface() fail if any part of the device setup fails
- Make debug messages indicate which control message they belong to
2011-11-14 08:40:01 +13:00
Daniel Beer e724c19a26 tilib: breakpoints are now working. 2011-10-18 12:24:44 +13:00
Daniel Beer 000816adbd tilib: fetch breakpoint counts and device ID via library API. 2011-10-18 11:55:21 +13:00
Daniel Beer d610f6471a tilib: fixed hangs and crashes on startup/exit. 2011-10-18 11:28:53 +13:00
Daniel Beer f18b0c188b Added TI library driver (experimental).
Memory/register read, single-step, run and halt are working.
Breakpoints aren't working, and programming hasn't been tested.
2011-10-14 12:49:04 +13:00
Daniel Beer 90eeb0d23e Added necessary definitions for TI library API. 2011-10-14 12:48:38 +13:00
Daniel Beer 18e3fbac74 Display section names when programming.
The binfile extraction and programming code is now aware of section
names when dealing with ELF32 files. The names are displayed when
programming, and chunks in different sections aren't combined, even if
they're contiguous.
2011-10-12 13:52:56 +13:00
Daniel Beer f230af2ce9 Added support for MSP430F449. 2011-10-09 19:13:18 +13:00
Tamas TEVESZ 70b2c0fc4b Added support for MSP430F2012. 2011-10-04 19:11:30 +13:00
Daniel Beer 9e42c1e6f4 Fix build errors on Win32. 2011-09-19 04:04:08 +12:00
Daniel Beer 92c18f32dc Implemented TI3410 firmware download.
Also added TI3410 firmware image, plus Makefile install rules. Added
notes to manual regarding USB support for FET devices.
2011-09-16 16:09:03 +12:00
Daniel Beer 7de9854661 Implemented TI3410 transport.
This allows direct libusb access to FET430UIF and eZ430 devices. It
doesn't yet implement the initial firmware download required to get
the 3410 working.
2011-09-16 14:40:40 +12:00
Daniel Beer 6ac5c5a618 Restructuring: move drivers into drivers/ 2011-09-14 16:15:37 +12:00