pc-stlinkv2: StlinkV3 seems only to work with STM devices,
This commit is contained in:
parent
0599d2161c
commit
12a2659671
|
@ -5,11 +5,13 @@ functionality that BMP needs. This branch implements blackmagic debug probe
|
||||||
for the STM Stlink as a proof of concept.
|
for the STM Stlink as a proof of concept.
|
||||||
Use at your own risk, but report or better fix problems.
|
Use at your own risk, but report or better fix problems.
|
||||||
|
|
||||||
Run the resulting blackmagic_stlinkv2 executabel to start the gdb server
|
Run the resulting blackmagic_stlinkv2 executable to start the gdb server
|
||||||
|
|
||||||
CrosscCompling for windows with mingw succeeds.
|
Crosscompling for windows with mingw succeeds.
|
||||||
|
|
||||||
Drawback: JTAG does not work for chains with multiple devices.
|
Drawback:
|
||||||
|
- JTAG does not work for chains with multiple devices.
|
||||||
|
- STLinkV3 does only work on STM32 devices.
|
||||||
|
|
||||||
This branch may get forced push. In case of problems:
|
This branch may get forced push. In case of problems:
|
||||||
- git reset --hard master
|
- git reset --hard master
|
||||||
|
|
|
@ -535,7 +535,7 @@ static int send_recv_retry(uint8_t *txbuf, size_t txsize,
|
||||||
gettimeofday(&now, NULL);
|
gettimeofday(&now, NULL);
|
||||||
timersub(&now, &start, &diff);
|
timersub(&now, &start, &diff);
|
||||||
if ((diff.tv_sec >= 1) || (res != STLINK_ERROR_WAIT)) {
|
if ((diff.tv_sec >= 1) || (res != STLINK_ERROR_WAIT)) {
|
||||||
DEBUG("write_retry failed");
|
DEBUG("write_retry failed. ");
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -558,7 +558,7 @@ static int read_retry(uint8_t *txbuf, size_t txsize,
|
||||||
gettimeofday(&now, NULL);
|
gettimeofday(&now, NULL);
|
||||||
timersub(&now, &start, &diff);
|
timersub(&now, &start, &diff);
|
||||||
if ((diff.tv_sec >= 1) || (res != STLINK_ERROR_WAIT)) {
|
if ((diff.tv_sec >= 1) || (res != STLINK_ERROR_WAIT)) {
|
||||||
DEBUG("read_retry failed");
|
DEBUG("read_retry failed. ");
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1172,7 +1172,14 @@ bool adiv5_ap_setup(int ap)
|
||||||
uint8_t data[2];
|
uint8_t data[2];
|
||||||
send_recv_retry(cmd, 16, data, 2);
|
send_recv_retry(cmd, 16, data, 2);
|
||||||
DEBUG_STLINK("Open AP %d\n", ap);
|
DEBUG_STLINK("Open AP %d\n", ap);
|
||||||
return (stlink_usb_error_check(data, true))? false: true;
|
int res = stlink_usb_error_check(data, true);
|
||||||
|
if (res) {
|
||||||
|
if (Stlink.ver_hw == 30) {
|
||||||
|
DEBUG("STLINKV3 only connects to STM8/32!\n");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void adiv5_ap_cleanup(int ap)
|
void adiv5_ap_cleanup(int ap)
|
||||||
|
|
Loading…
Reference in New Issue