stlink-org / stlink

Open source STM32 MCU programming toolset
BSD 3-Clause "New" or "Revised" License
4.44k stars 1.24k forks source link

[STM32L471RG]: STLINKV3 : can't flash the device. Programmer not supported ? #1388

Closed Sazerac4 closed 6 months ago

Sazerac4 commented 6 months ago

I can't flash the microcontroller. It works with my stlink-v2.

Command line output:

st-flash 1.8.0
libusb: error [submit_bulk_transfer] submiturb failed, errno=2
2024-04-22T17:35:50 ERROR usb.c: GET_VERSION send request failed: LIBUSB_ERROR_IO
libusb: error [submit_bulk_transfer] submiturb failed, errno=2
2024-04-22T17:35:50 ERROR usb.c: GET_CURRENT_MODE send request failed: LIBUSB_ERROR_IO
libusb: error [submit_bulk_transfer] submiturb failed, errno=2
2024-04-22T17:35:50 ERROR usb.c: GET_CURRENT_MODE send request failed: LIBUSB_ERROR_IO
libusb: error [submit_bulk_transfer] submiturb failed, errno=2
2024-04-22T17:35:50 ERROR usb.c: ENTER_SWD send request failed: LIBUSB_ERROR_IO
Failed to enter SWD mode
Failed to connect to target
Failed to parse flash type or unrecognized flash type
libusb: error [submit_bulk_transfer] submiturb failed, errno=2
2024-04-22T17:35:50 ERROR usb.c: DEBUG_EXIT send request failed: LIBUSB_ERROR_IO

Notes:

ii  libusb-1.0-0:amd64     2:1.0.25-1ubuntu2 amd64

Expected/description:

Uploading the firmware is done without any problems

Nightwalker-87 commented 6 months ago

@florrant Thanks for putting this up. As to my knowledge this model is not yet supported by this toolset. Could you make it work based on the changes above? If so, please submit a PR to the testing branch.

Sazerac4 commented 6 months ago

Sorry for the misunderstanding. Adding the udev rules wasn't enough to get the device working. I also tried on a Debian 12 without success (same error message).

Edit: Debugging with openocd/st-link work well with this programmer