Commit Graph

209 Commits

Author SHA1 Message Date
Triss cf8b986772 jtaglib: properly handle USB ram (cannot use quick memory access routines here) 2022-07-31 20:21:51 +02:00
Triss c801faeb80 jtaglib: test previous commit on 0x89 device, properly write the wdt password 2022-07-31 20:09:13 +02:00
Triss 2373d33bbb jtaglib: use context save/restore mechanism to keep track of registers etc. 2022-07-31 19:24:54 +02:00
Triss 8ddf3cb68c mehfet, v3hil: more detailed debugging (optional) 2022-07-31 19:24:54 +02:00
Triss 37aacaca2d jtaglib: Xv2 read/write reg now (finally) working, PC gets reset every so often due to other routines 2022-07-31 19:24:51 +02:00
Triss 649d82b695 jtaglib xv2: memory accesses start to work now 2022-07-31 19:24:31 +02:00
Triss 98c434555f jtaglib cpu16: single step issue fixed 2022-07-31 19:24:31 +02:00
Triss aed67748b1 jtaglib: misc fixes 2022-07-31 19:24:27 +02:00
Triss 2170693f2f jtaglib: getting cpuxv2 stuff to work, very slowly... 2022-07-31 19:24:08 +02:00
Triss 9809da335e jtaglib: proper device identification 2022-07-31 19:24:08 +02:00
Triss ddfffa06fb jtagdev, pif, mehfet: refactor device_class ops to be unified under jtagdev instead of using separate implementations 2022-07-31 19:24:08 +02:00
Triss 0a8ebf4a66 jtaglib: read JTAG ID early enough to know which procedures to use for JTAG access 2022-07-31 19:24:04 +02:00
Triss 5f30c8c217 jtaglib: refactor
In order to support CPUX and Xv2 devices, some refactoring is needed:

* split jtaglib into files concerning low-level JTAG/SBW physical layer
  stuff, and a file containing the actual debug routines. the latter is
  implemented in a separate file per CPU type (CPUX and Xv2 currently empty)
* use a lookup table dependig on the JTAG ID or CPU type to select which
  function to use
* move the 'struct device' dependency in pif and mehfet to jtdev, as it
  is needed everywhere, especially for device identification

In a next step, the following actions can be performed:

* Unify the read and write callbacks in pif and mehfet (used in readmem
  and writemem of struct device) to remove the redundancy
* Unify the init_device function in pif and mehfet to properly detect
  the device type, as done in v3hil. The device base type does query
  this data independenly, however, which feels unwanted.
2022-07-31 19:23:24 +02:00
Triss f1d416944c jtaglib: add 20-bit DR shift function 2022-07-31 19:23:19 +02:00
Triss 43f9d7bc54 v3hil: handle new protocol versions 2022-05-19 01:48:19 +02:00
Triss c375f74c51 v3hil: add debug logging 2022-05-19 00:46:45 +02:00
Triss 9484b1cff6 hal_proto, v3hil: add missing command and status IDs 2022-05-19 00:21:45 +02:00
Triss 9d1a2528de hal_proto: handle acknowledgement packets correctly 2022-05-19 00:10:47 +02:00
Triss a1a06e7e65 jtaglib: fix register reading on MSP430G2452 and similar chips 2021-10-11 12:34:59 +02:00
Triss 30af3e9483 mehfet: add driver and transport 2021-10-11 12:34:50 +02:00
Triss ab76a0ef3c jtaglib: refactor: allow driver backends to implement higher-level IR/DR-shifts, TMS-sequence, etc. commands instead of requiring a bit-banging interface 2021-10-10 00:05:50 +02:00
Triss c576441fb7 add -V option to specify/override VID and PID of USB device 2021-10-10 00:05:43 +02:00
Daniel Beer 6740d7d98b simx: MSP430X simulator by Bruce Burns <bgb@alum.mit.edu> 2020-09-05 14:56:37 +12:00
iddq 0c5f33ec42 fix jtag_read_reg and jtag_write_reg functions according to the documentation: SLAU320 MSP430 Programming via JTAG User's Guide
tclk set and clr was in wrong order
2020-06-01 06:56:52 +02:00
Dennis de Lange 713541525c Added the FR5994 and FR5964 chips (based upon the FR5968) 2019-11-04 11:28:26 +01:00
Dennis de Lange 51ef323568 Included missing devices from fet_db into devicelist. See 2b4b409 2019-11-04 10:12:07 +01:00
Daniel Beer d59fb64ac2 Don't issue mass erase if BSL password is specified. 2019-03-12 12:16:35 +13:00
Daniel Beer 5c5fec9acd rom_bsl: fix incorrect use of sizeof(). 2019-03-10 15:19:41 +13:00
Daniel Beer 989038d3b3 Implement --bsl-entry-password option. 2019-03-08 08:46:16 +13:00
Tamas TEVESZ be0f7b4576 Facelift MSPDEBUG_TILIB_PATH handling
Yes, I primarily just want to get rid of strcat (which is checked and
appears to be OK, but still, it's 2018).

Also bring behaviour in line with manual and common expectations:

- In absence of MSPDEBUG_TILIB_PATH, the dynamic linker search
  path is processed
- If MSPDEBUG_TILIB_PATH is specified, that directory is searched
- The original behaviour in case of an error is graceful fall-through
  to letting the dynamic linker do its deed
- The behaviour is changed such that if MSPDEBUG_TILIB_PATH is specified,
  only that path is being considered.

This is in line with both manual and common sense (otherwise one
could have just used LD_LIBRARY_PATH).
2018-09-16 10:36:23 +02:00
Daniel O'Connor 97e5cb63aa Change name of variable to MSPDEBUG_TILIB_PATH to match existing style. 2018-08-24 14:04:52 +09:30
Daniel O'Connor a2c48ed345 Don't use asprintf as it may not be available on all platforms. 2018-08-24 14:02:50 +09:30
Daniel O'Connor 65c0e5a440 Look for an env var to help find the MSP430 library 2018-08-15 13:42:21 +09:30
Tadashi G. Takaoka 00fde4a2f2 Fix sim driver and simio_timer
- Fix sim driver so that it can handle two bytes read/write.
- Add error message regarding odd size write to sim driver.
- Fix simio_timer constructor so that can accept size.
- Fix simio_timer so that we read/write channels' registers.
2018-06-29 14:11:41 +09:00
Tadashi G. Takaoka c325b5e80a Fix linux build caused by pull request #58 2018-06-27 10:40:27 +09:00
Tadashi G. Takaoka c9af50666d Fix MSP Debug Stack dynamic library name on macOS
On macOS, a dynamic loadable library has .dylib suffix.
2018-04-03 23:00:32 +09:00
Andrew Bradford 622ea72431 Trivial spelling fixes found by lintian
Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
2018-02-27 11:50:41 -05:00
Andrew Bradford 1ca3919a1c drivers/jtdev_bus_pirate: Fix GCC 7 misleading indent warning
Indent the jtbp_close() function consistently with tabs in order to fix
for GCC 7's flagging of this warning:

drivers/jtdev_bus_pirate.c: In function ‘jtbp_close’:
drivers/jtdev_bus_pirate.c:189:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
     if(write(p->port, &out_buff, 1));
     ^~
drivers/jtdev_bus_pirate.c:191:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  close(p->port);
  ^~~~~

Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
2018-02-09 13:42:46 -05:00
Daniel Beer 2b4b40938c fet_db: support for more FRAM chips.
Patch contributed by Yuriy Vlasenko <drvlas@gmail.com>.
2017-10-24 11:01:46 +13:00
Alex Orange 682d7ecc9c Add a bus pirate driver.
This is extremely slow at programming things, but is very useful for
unbricking an MSP-FET430UIF if you have a bus pirate and no other
programmers around.
2017-06-14 13:53:03 -06:00
Alex Orange 8a1afe6c91 Add a function to the device struct to handle config fuses.
Also provide a getconfigfuses implementation for the pif based drivers (pif
and gpio).
2017-06-14 13:28:07 -06:00
Jan Pohanka 721a012e81 Support for slac460s (loadDeviceDb) 2017-02-17 08:44:19 +01:00
Jan Pohanka bc57871a2e MSP430 BSL needs even counts and addresses
According to (not very good) documentation and empiric testing
BSL expects sizes of buffers sends to both sides to be even.
The same applies to memory addresses.
2017-02-15 10:29:59 +01:00
Tamas TEVESZ 87af948114 Update last error number (comment only) 2017-01-28 13:26:41 +01:00
Tamas TEVESZ ee08f5ee94 Add FET error codes from MSP430DLL v3.9.1.002 (SLAC460s) 2017-01-28 13:23:46 +01:00
Daniel Beer 9114125216 Merge pull request #23 from yamori813/master
Add Mac OS X native HID transport support.
2016-11-27 11:07:25 +13:00
Hiroki Mori f96b0cb73d Use Mac OS X HID Interface at BSL 2016-11-26 19:03:41 +09:00
John Pitney 916f63ef82 Add toggling the test and reset pins to make gpio 4-wire JTAG work
on SBW-enabled targets
2016-11-23 13:58:12 -06:00
John Pitney ff3af47c34 Fix gpio configuration parsing 2016-11-19 13:46:43 -06:00
John Pitney 1b4fe52ef0 Add RST and TST to gpio driver 2016-11-19 10:18:54 -06:00