45 Commits

Author SHA1 Message Date
Uwe Bonnes
f4eed249eb hosted/ftdi: Allow to list supported cables. 2020-09-04 11:49:13 +02:00
Uwe Bonnes
aff624b6e0 libftfdi: Allow to specify external resistor SWD connection.
More explanations in src/platforms/hosted/Readme.md
2020-09-04 11:49:13 +02:00
Matthew Skolaut
5908fc2da1 Add serial auto-connection to darwin target 2020-08-21 11:28:17 +02:00
Uwe Bonnes
805cfbdcb5 Build hosted for widows with hidapi static linked. 2020-08-03 18:59:50 +02:00
Uwe Bonnes
fca8593d92 serial_win: Find BMP comport by serial number. 2020-08-03 18:59:50 +02:00
Uwe Bonnes
3eb51ce94f serial_win.c: Copy the enough of the device name. 2020-08-01 14:00:17 +02:00
Uwe Bonnes
11217f8a45 serial_win: GDB needs to handle DTR. 2020-08-01 14:00:17 +02:00
Uwe Bonnes
aabd07738e cl_utils: Use start of flash in memory map as default flash start. 2020-06-05 14:59:30 +02:00
Uwe Bonnes
425002a38f hosted: Add -l argument to list only available debuggers and exit. 2020-06-05 14:59:30 +02:00
Uwe Bonnes
dc3fd2eb06 Classify debug messages
Firmware BMP with ENABLE_DEBUG=1 will print WARN and INFO as before.
PC-Hosted BMPwill alway print to stderr. Warn is printed unconditional,
INFO, GDB, TARGET, DONGLE and WIRE will print if their appropriate bit in
cl_debuglevel is set via the -v verbose command line argument.
INFO will go to stdout with -t or -l.
2020-06-05 14:59:30 +02:00
Uwe Bonnes
64f3dff8a8 PC-Hosted: Better debug output. 2020-06-05 14:59:30 +02:00
Uwe Bonnes
921c23eb74 serial_unix: Return instead of exit in case of error. 2020-06-05 14:59:30 +02:00
Uwe Bonnes
ef558eebb8 CMSIS-DAP support.
Thanks to edbg, pyocd and openocd for code and ideas.
2020-06-05 14:59:30 +02:00
Uwe Bonnes
da45281696 GetTargetVoltage: Print info about voltage only when info is relevant. 2020-06-05 14:59:30 +02:00
Uwe Bonnes
13c3c934d2 Hosted: Add Stlink, remove old pc-stlinkv2 platform 2020-06-05 14:59:30 +02:00
Uwe Bonnes
09602a9e74 serial_unix: Simplify timeout setting. 2020-06-05 14:59:30 +02:00
Uwe Bonnes
8fea3f6baa pc/serial_xx: Change arguments for the open call. 2020-06-05 14:59:30 +02:00
Uwe Bonnes
dd022fcb44 platforms/pc: Add common usb utilities. 2020-06-05 14:59:30 +02:00
Uwe Bonnes
1e10b96b03 Allow multiple scan routines. 2020-06-05 14:59:30 +02:00
Uwe Bonnes
7956fbc361 cl-utils: Print memory map when test is specified. 2020-06-05 14:59:30 +02:00
Uwe Bonnes
b5182e09d0 cl_utils: When reading from flash to file, truncate the file. 2020-06-05 14:59:30 +02:00
Uwe Bonnes
8db979798c cl_utils.c: Report read/write speed. 2020-06-05 14:59:30 +02:00
Uwe Bonnes
c5d0902d4c cl_utils: Fix memory leak. 2020-06-05 14:59:30 +02:00
Uwe Bonnes
815e09bb1b cl-utils: Add more arguments 2020-06-05 14:59:30 +02:00
Uwe Bonnes
58a8571d5b stlink: Print Target voltage
This adds about 600 bytes.
2020-04-03 16:19:20 +02:00
Francesco Valla
8a9980cd06 pc/serial_unix: bump device path buffer size to 4096 bytes
Since dp->d_name can be up to 255 bytes long and the 'name' buffer variable is
is a superset of it, bump the size of the latter to 4096 bytes (correspoding
to PATH_MAX on Linux systems).
2020-04-03 11:05:11 +02:00
Uwe Bonnes
b4ab9f328e pc-hosted: Put serial handling in own files for unix and implement for windows.
- If host provided /dev/serial/by-id, device must not be given and
  multiple devices may be selected with -s <(partial) serial number>
- On windows, device must by specifies with -d
2020-03-31 17:02:56 +02:00
Uwe Bonnes
18ae2bb50d cl_utils.c: Include <windows.h> for windows builds that work on files. 2020-03-31 17:02:56 +02:00
Uwe Bonnes
bd73adf9c7 bmp/pc platforms: Deduplicate code. 2020-03-31 17:02:56 +02:00
Uwe Bonnes
2e185ba578 BMP/PC: Allow to compile with mingw64 (#615)
__USE_MINGW_ANSI_STDIO 1 must be set befor any windows specific included.
2020-03-24 17:59:13 +01:00
Uwe Bonnes
a7efe7cc14 cl-utils: Display targets found.
+ other small changes in DEBUG output.
2020-03-10 17:34:30 +01:00
Uwe Bonnes
65cb886bb6 Export connect_under_reset. 2020-03-10 11:44:53 +01:00
Uwe Bonnes
e48d9ebc92 cl_utils: Allow to connect under reset. 2020-03-06 23:15:56 +01:00
Uwe Bonnes
13b9fe1efc cl_utils: There is no need for a (dummy) target controller.
Fix for #593.
2020-03-04 16:57:05 +01:00
Uwe Bonnes
03d84d0d5c command line tools: Allow to set power. 2020-02-20 12:12:26 +01:00
Uwe Bonnes
45fb12f9b6 cl-utils: Care for -j (JTAG) argument in test mode. 2020-01-21 11:49:45 +01:00
Sid Price
ee553c9a50 Corrected error checking for socket functions (#577) 2020-01-11 16:47:02 +01:00
Uwe Bonnes
c3a3f7737f Hosted: Allow command line interaction. 2019-12-13 14:59:42 +01:00
Uwe Bonnes
470c8e8cf1 target_flash_erase: Do not crash when requesting erase of unavailable flash.
Allow to erase from command line.
2019-12-13 14:59:42 +01:00
Uwe Bonnes
b9eb467ecf Command line: Restrict verify to length of binary file. 2019-12-13 14:59:42 +01:00
Uwe Bonnes
269d38ce65 cl_utils: Allow to issue reset.
Issue reset only when flashing or when reset was requested.
2019-12-13 14:59:42 +01:00
Uwe Bonnes
da5a0cd3f5 Infrastructure for command line interface to target
- Program, read and verify flash
- Test mode: Probe and attach to device and exit
2019-12-08 16:43:19 +01:00
Daniel O'Connor
0aedff6623 Set the accepted to socket to be blocking as that is what the code expects.
This is necessary on OSX (and probably BSDs) where they default to non blocking which causes recv() to return -1 with errno set to EAGAIN.
2019-10-14 12:45:10 +02:00
Uwe Bonnes
1d868bfffb pc-stlinkv2: Detect stlink detach.
As libusb has no real async callback, we need to call libusb_handle_events()
in different places. While waiting for the gdb connection, we set the
socket to non-blocking and check additional for usb events in that loop. That
way, detach is also detected while waiting for connection. With debugger
attached, SET_IDLE_STATE ist missused for checking for usb events.
2019-09-01 12:19:14 +02:00
Uwe Bonnes
3b75cb9a5a gdb-server: Allow multiple instance. 2019-07-17 17:26:00 +02:00