Commit Graph

95 Commits

Author SHA1 Message Date
Triss 63e2077d5b expr: allow '0X' hex prefix 2022-05-19 01:48:22 +02:00
Daniel Beer 6740d7d98b simx: MSP430X simulator by Bruce Burns <bgb@alum.mit.edu> 2020-09-05 14:56:37 +12:00
Daniel Beer 4f6a845fb4 Fix operation size error in instruction decoding. 2019-03-28 14:26:28 +13:00
William D. Jones 66dc9057e2 Improve compiling experience on MinGW platform (use pkg-config, *nix rm). 2018-11-18 14:49:08 -05:00
Tadashi G. Takaoka 25959448ab Fix repeated disassemble
- An odd disassemble length is rounded up to the next even length.
- A repeated disassemble starts from the next possible instrunction address.
2018-07-16 21:31:35 -07:00
Tadashi G. Takaoka e5e3dd13eb Print immediate byte data in 2-digits hex 2018-04-06 00:17:56 +09:00
Daniel Beer b294df8cc0
Merge pull request #50 from tgtakaoka/opt-lowercase-dis
Add lowercase_dis option
2018-04-04 12:28:27 +12:00
Tadashi G. Takaoka c9c7cf546b FYI: Update chipinfo.db with slac460x
This also modifies struct chipinfo.mclk_control to uint32_t, since it
contains 32 timers' information.

The updated chipinfo.db has been extracted from slac460x.
  http://www.ti.com/lit/sw/slac460x/slac460x.zip

To extract chipinfo.db, the following patches are necessary to make
msp-ds-dumpdb command from slac460x, and corresponding Homebrew
formula, msp-ds.rb may help.
  https://raw.githubusercontent.com/tgtakaoka/homebrew-tinyos-msp430/master/patches/msp-ds-slac460x-2-patches.tar.xz
  https://github.com/tgtakaoka/homebrew-tinyos-msp430/blob/master/msp-ds.rb

The msp-ds-dumpdb command also can dump device database with XML
format as MSP430_DumpDeviceDb() do.
2018-04-03 22:22:10 +09:00
Tadashi G. Takaoka 5549f35977 Move lowercase conversion to output_util.c 2018-04-03 22:07:07 +09:00
Tadashi G. Takaoka 5b9bdbc2aa Add lowercase_dis option
The lowercase_dis option, if set to true, changes instruction and
register names of disassembler command to lower case. This can be
matched with hexadecimal dump of raw instruction and address.  It also
matches with GNU debugger and assembler.
2018-04-02 23:28:11 +09:00
Bruno Pena 3c19304af3 Fix MinGW compilation under Windows.
Added missing header.

Signed-off-by: Bruno Pena <brunompena@gmail.com>
2018-03-01 18:31:17 +01:00
Bruno Pena 4401f60d91 Escape single quotes inside double quote.
Signed-off-by: Bruno Pena <brunompena@gmail.com>
2018-02-27 23:18:57 +01:00
Bruno Pena ad8063166e Added logic for single quote arguments (verbatim).
This can then be used to quote Windows paths that are passed to mspdebug
by Energia:

> mspdebug ... "prog 'C:\Users\Path with Spaces\...\file.hex'"

Signed-off-by: Bruno Pena <brunompena@gmail.com>
2018-02-27 22:55:05 +01: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
Daniel Beer 1f77d74803 Windows compatibility fixes.
Supplied and tested by Patrick Dussud <phdussud@hotmail.com>.
2016-12-21 09:57:23 +13:00
Daniel Beer 1669f758de Merge branch 'master' of https://github.com/dsiroky/mspdebug into dsiroky-master 2016-07-27 20:41:21 +12:00
David Siroky 3eefaaf3e7 don't unexport GPIO DTR/RTS if exported before 2016-07-27 10:17:08 +02:00
Daniel Beer ffbb3eaadc Windows build fix-ups. 2016-05-14 11:47:28 +12:00
Ingo van Lil 0b52f40933 Fix memleak in vector_realloc. 2016-01-24 11:38:31 +01:00
Ingo van Lil e4644f70aa Allow register names in address expressions. 2016-01-21 18:35:52 +01:00
Daniel Beer e6a0f0ac95 util/gpio: add Windows stubs. 2015-03-02 09:39:08 +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
Paolo Zebelloni c0d3fbe21a BSL entry via GPIO toggling. 2014-12-15 09:06:30 +13:00
Daniel Beer 9472dd46a9 Add support for OpenIndiana.
Based on changes suggested by Reginald Beardsley <pulaskite@yahoo.com>.
2014-07-05 10:35:07 +12:00
Daniel Beer 89d81377fd demangle: fix prototype mismatch.
We declared the function to take size_t, but it really expected int. The
implementation is changed to use size_t throughout.

Debian bug report:

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749434
2014-05-28 10:40:58 +12:00
Daniel Beer 057ad4e5e5 dis: fix extension word decoding for PC-relative operands.
We need to make sure that we perform the offset addition as a 20-bit
operation when an extension word is present.
2014-05-05 09:39:39 +12:00
Tamas TEVESZ 89b5d2d3da sys/select.h for select(2)
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2013-12-13 06:36:29 +13:00
Tamas TEVESZ a8922dcc0e Add MSP430.dll version as macros to chipinfo.db
Report the version of MSP430.dll that was used to generate
chipinfo.db in info texts.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2013-12-12 13:10:44 +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 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
Tamas TEVESZ 5909c6d60b Use sig_atomic_t for ctrlc_flag
Semantic change only.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2013-12-07 10:16:37 +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 8ec807fe20 chipinfo: chip database extracted from MSP430.DLL. 2013-09-08 12:51:14 +12:00
Daniel Beer 83f0d66597 bytes.h: byte-order utilities. 2013-08-27 14:56:54 +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
Daniel Beer d54cf16a13 util: add ADDRESS_NONE definition. 2013-07-18 13:56:04 +12:00
Daniel Beer 9c913ee1f6 dis: fix source symbolic mode decoding. 2013-05-27 09:10:51 +12:00
Daniel Beer 1c0bdccc74 opdb: add option for setting default GDB port. 2013-04-22 10:29:30 +12:00
Daniel Beer da3b7e31a2 Partial revert of ce2e0a94f4.
Jump instruction offsets are relative to start of instruction.
2013-03-13 10:40:43 +13:00
Daniel Beer ce2e0a94f4 dis: correct offset for symbolic single-operand and jumps. 2013-02-25 15:40:03 +13:00
Daniel Beer fa75aa0854 Fix Win32 event use.
Incorrect use of the Ctrl+C event can lead to busy-waiting in socket and
serial port IO.
2013-02-11 12:49:56 +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 7113fd2e50 disassemble: look only for exact symbol matches for operands. 2013-01-31 15:31:42 +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 65b2e94a2e dis: fix constant generation for single-operand.
Indexed mode with R3 shouldn't consume an index word, because this is
the combination used for generating the constant #1.
2013-01-15 11:47:50 +13:00
Daniel Beer 611574cc86 sport: fix build on Windows. 2012-12-18 13:59:26 +12:00
Rob Spanton f94383d839 Add two missing includes to util.c
util.c was missing sys/select.h and sys/time.h.  On some platforms,
this lead to warnings.
2012-11-30 08:50:04 +13:00
Priit Laes c118a684b4 util: Fix memleaks in error paths 2012-10-27 13:00:31 +13:00
Daniel Beer 277a795f01 Add power sample output. 2012-10-24 09:37:46 +13:00
Daniel Beer 8334f55418 Win32 fix-ups.
Fixed missing includes in low-level IO functions. Changed
implementation of condition variables to use kernel event objects, in
order to preserve compatibility with NT 5.1.
2012-10-09 16:34:33 +12:00