Guillaume Revaillot
3aaec273da
common.c: fix define - use Gx Base for Gx defines
...
avoid some potential issues later.
2020-04-16 15:57:39 +02:00
Guillaume Revaillot
e146a28a67
st-flash: add sanity check to option flash.
...
current opt parse code can make bad cmdline parameter attempt to flash bad
flash option.
ie: calling st-flash write --area=option a_file.bin
will make parser attempt to translate "a_file.bon" to an uint32 and will return 0..,
2020-04-16 15:57:39 +02:00
Guillaume Revaillot
72cfd5ee20
option: refactor option flash code.
...
unify option bytes read/write, interface, use chipid db to store size and base
to provide some write sanity check and generic option read code.
2020-04-16 15:57:39 +02:00
Guillaume Revaillot
6f0795d931
chipid: add some l0 and l4 option info to allow option byte read
2020-04-16 15:57:39 +02:00
Guillaume Revaillot
92ceb7f35a
chipid: insert data for supported chips, from common.c
2020-04-16 15:57:39 +02:00
Guillaume Revaillot
2aeae8d85f
chipid: add option bytes info to chip db
2020-04-16 15:57:39 +02:00
Guillaume Revaillot
1801fb1f00
flash.c: move device specific read option stuff to common.c
2020-04-16 15:57:39 +02:00
Guillaume Revaillot
8430a6e6fa
add read, write option byte for g4 and g0
...
use g0 code, same logic with different base address.
also cleanup some duplicate lock/unlock code.
2020-04-16 15:57:39 +02:00
Guillaume Revaillot
ee4a52288a
st-flash: print proper error in case of option byte read error.
...
User could get a wrong "stlink_fread()" error in case of bad stlink_read_option_foo..
2020-04-16 15:57:39 +02:00
nightwalker-87
6f934a396e
Whitespace cleanup
2020-04-15 16:20:17 +02:00
nightwalker-87
308fccb048
General Project Update
...
- Updated CHANGELOG.md
- Updated links to project repository
- Improved project description
- Minor revision for tutorial.md
- Formatting fixes
2020-04-14 21:01:52 +02:00
nightwalker-87
b5be03a9cc
Merge pull request #922 from grevaillot/to_merge/st-flash_v1v2
...
flash.c: stlink_open_usb is actually able to open v1 and v2 (and v3)
2020-04-14 12:13:11 +02:00
Guillaume Revaillot
fc507fd484
flash.c: stlink_open_usb is actually able to open v1 and v2 (and v3 ..) devices.
...
no need to check that _not used_ o.devname ..
no need to specify devname in commandline
get rid of the devname cmdline stuff, and update comments
2020-04-14 11:36:28 +02:00
nightwalker-87
1d00424dfd
Merge pull request #924 from chenguokai/develop
...
Added md5 checksum for binary file
2020-04-13 16:30:00 +02:00
Chen Guokai
1047fdd440
Add documentation about the checksum
2020-04-13 21:36:36 +08:00
Chen Guokai
6515e57b9e
Adjust output format for better formating
2020-04-13 21:20:20 +08:00
nightwalker-87
99466bf4fa
Merge pull request #925 from sderr/betterargs_redev
...
st-flash: minor usage fix, and make cmdline parsing more user friendly
2020-04-13 14:38:47 +02:00
Chen Guokai
35cbe57f4f
Add st official checksum for binary file
2020-04-13 18:30:44 +08:00
Simon Derr
eb24304433
src/tools/flash_opts.c: fix style issues
2020-04-13 11:55:39 +02:00
Simon Derr
42c5fd7e69
st-flash: minor usage fix, and make cmdline parsing more user friendly
...
Somewhat fix the help message that showed some parameters as mandatory,
when in reality they depend on the operation type and file format.
Try to show explicit error messages for the most common mistakes.
2020-04-13 11:35:39 +02:00
Chen Guokai
608314b1e0
Merge branch 'develop' of https://github.com/texane/stlink into develop
2020-04-13 17:15:37 +08:00
Chen Guokai
79676cdf79
Add md5 checksum for binary file
2020-04-13 17:12:58 +08:00
nightwalker-87
cadfa94162
General Project Update
...
- Updated travis CI build configuration
- Updated project references
- Minor formatting fixes
2020-04-12 18:26:46 +02:00
nightwalker-87
82543df141
Merge pull request #921 from chenguokai/develop
...
Enhanced error log with file path for map_file()
2020-04-12 15:24:13 +02:00
Chen Guokai
067639ff8c
Enhance error log with file path for map_file()
2020-04-12 21:02:42 +08:00
nightwalker-87
f7565d0bb4
Merge pull request #920 from chenguokai/develop
...
Fixed broken build on 32-bit systems
2020-04-12 11:37:52 +02:00
Chen Guokai
2979df4048
Fix 32 bit build on develop branch
2020-04-12 11:01:57 +08:00
nightwalker-87
ecbbd6db7a
Merge pull request #917 from chenguokai/develop
...
Fixed st-flash write 0xff ignored issue
2020-04-11 14:29:18 +02:00
Chen Guokai
734bfdaa47
Remove .travis-lin-mingw.sh in travis.yml
2020-04-11 20:24:08 +08:00
Chen Guokai
11156bc66b
Add TODO tag in source code
2020-04-11 20:02:03 +08:00
Chen Guokai
12637a47f5
Indent with four spaces
2020-04-11 16:46:42 +08:00
Chen Guokai
e97eaa329a
Add man documentation about --opt
2020-04-11 14:06:38 +08:00
Chen Guokai
cc27e61e9d
Fix 0xFF optimization bug
2020-04-11 13:46:59 +08:00
Chen Guokai
7e4540aa7d
Fix code style alignment
2020-04-11 12:11:08 +08:00
nightwalker-87
99a8aaab25
General Project Update
...
- Updated CHANGELOG.md
- README.md: Edited note on licensing.
- Formatting in tutorial.md
Temporarily removed travis-lin-mingw script for clean travis builds.
2020-04-10 23:38:17 +02:00
nightwalker-87
bf39a19d39
Merge pull request #918 from grevaillot/to_merge/fixed_probe
...
Fixed st-info --probe mechanism
2020-04-10 18:46:46 +02:00
Guillaume Revaillot
cec61aaea3
stlink_open_usb: remove wrong comment, we do handle protocoll (?) v1 for stlinkv1
2020-04-10 17:33:57 +02:00
Guillaume Revaillot
395eee53df
stlink_open_usb: fix serial lookup mecanism when a v1 device is connected.
...
serial match was not done for v1 device, resulting in attempting to open it systematically,
leading to some libusb device claim call failure.
Lookup device serial for all chips, compare it if needed, and continue.
2020-04-10 17:33:57 +02:00
Guillaume Revaillot
512999da56
stlink_open_usb: use macros for stlink pid filtering
2020-04-10 17:33:57 +02:00
Guillaume Revaillot
aff1df29ad
stlink_probe_usb_devs: return number of successfully opened devices, not number of probed devices.
2020-04-10 17:33:57 +02:00
Guillaume Revaillot
6b03c7f9ed
usb.c: rework probe loop to _not_ free all stuff without closing if _one_ probe failed.
...
we return count and list of successfully probed devices, no need to free
everything if some libusb call of the last probe attempt failed.
2020-04-10 17:33:57 +02:00
Guillaume Revaillot
8fba7ab9fe
usb.c: align probe code.
...
actually open all counted devices - the two vid check need to be aligned.
also now display if some st device has been skipped.
2020-04-10 17:33:57 +02:00
Guillaume Revaillot
90081dd1f3
usb.h: define some stlink usb pid macros, stop copypasting.
...
ease v1/v2/v2.1/v3 identification and supported devices filtering
2020-04-10 17:33:57 +02:00
Chen Guokai
12faa5332c
Fix memory overlap
2020-04-10 22:07:52 +08:00
nightwalker-87
38c8b8b499
Cleanup
...
- Whitespace fixes
- Removed old appveyor-mingw script
- travis-lin-mingw.sh -> .gitignore
2020-04-08 23:44:51 +02:00
nightwalker-87
abebc9a166
Merge pull request #913 from chenguokai/develop
...
Fix dead loop after an unexpected unplug
2020-04-08 16:56:23 +02:00
nightwalker-87
946b7f3b04
Merge pull request #912 from texane/ext_pkg_versions
...
ext_pkg_versions
2020-04-08 15:37:22 +02:00
nightwalker-87
6f941b22eb
Fixed compilation errors (Regression)
...
-> error: ‘O_BINARY’ undeclared
-> tabspaces in Makefile
2020-04-08 15:34:10 +02:00
nightwalker-87
c6753e3bdb
Fixed compilation errors (Regression)
...
-> error: ‘O_BINARY’ undeclared
-> tabspaces in Makefile
2020-04-08 15:29:01 +02:00
Chen Guokai
34c0a31204
Fix dead loop after an unexpected unplug
...
* Fix by adding error handler in gdb-server
* Enhance logs for functions with return values
2020-04-08 20:33:23 +08:00