stlink: handle error bad-AP
authorAntonio Borneo <borneo.antonio@gmail.com>
Sun, 3 Feb 2019 20:07:31 +0000 (21:07 +0100)
committerTomas Vanek <vanekt@fbl.cz>
Thu, 7 Mar 2019 21:00:41 +0000 (21:00 +0000)
commit5c55fbb065a829beafa233e5c0c0be56d9664934
tree9b50bbb8620bb18b49084c770fadbd76ac90f1e6
parente243075962fc11f0b217db72d68819355c1be7dc
stlink: handle error bad-AP

The new firmwares for ST-Link support handling multiple AP, but
are (actually) limited to the AP number in range [0..8].
Any tentative to operate on AP number higher than 8 returns an
error "bad AP".
Add the error code and the related message.

Change-Id: I78a98b2612d10e580d03fc43ed9f2b09619d39d8
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4981
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
src/jtag/drivers/stlink_usb.c