Skip to main content
Visitor II
March 29, 2021
Solved

I have been following the instructions on the wiki to set up STM32CubeProgrammer on dk2. It appears I am missing port parameters. What is the correct command line?

  • March 29, 2021
  • 7 replies
  • 1736 views

I enter STM32_Programmer_CLI -c port=/dev/bus/usb/010/003 (lsusb reports this is correct) -w flashlayout_st-image-weston/trusted/Flashlayout_sdcard_stm32mp157c-dk2-trusted.tsv

udev drivers installed, Ubuntu 20.04

Warning: Wrong connect parameter:

    This topic has been closed for replies.
    Best answer by PatrickF

    Hi, just see that you mistyped the command, you miss the '-w'

    should be : STM32_Programmer_CLI -c port=USB1 -w flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv

    I agree that the error message is not helping.

    Regards.

    7 replies

    Explorer
    March 29, 2021

    Besides of documentation on the ST website ...

    Did you try runtime help ?

    I wouldn't expect a proper manpage from Windows-centered ST, but you can try with DOS/Windows standard "/?" as parameter.

    SLetterAuthor
    Visitor II
    March 29, 2021

    im On Ubuntu 20.4 command line, as far as I know there is no help?

    Technical Moderator
    March 29, 2021

    Hi,

    your 'port=' value is wrong, you should use first:

    STM32_Programmer_CLI -l

    to list available DFU interfaces.

    Then use the 'Device Index' value in the command line, for instance:

    STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/trusted/Flashlayout_sdcard_stm32mp157c-dk2-trusted.tsv

    You could also use the CobeProgrammer GUI.

    Regards.

    SLetterAuthor
    Visitor II
    March 29, 2021

    I tried that first like the instructions said. I got the very same error.

    Warning: Wrong connect parameter: “flashlayout_st-image-weston/trusted/Flashlayout_sdcard_stm32mp157c-dk2-trusted.tsv�?

    SLetterAuthor
    Visitor II
    March 29, 2021

    letter@steve-T7500:~/work/Starter-Package/stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/images/stm32mp1$ !1955

    STM32_Programmer_CLI -l usb

         -------------------------------------------------------------------

                           STM32CubeProgrammer v2.7.0                 

         -------------------------------------------------------------------

    ===== DFU Interface  =====

    Total number of available STM32 device in DFU mode: 1

     Device Index          : USB1

     USB Bus Number        : 009

     USB Address Number    : 004

     Product ID            : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000

     Serial number         : 0045002A3338510B39303435

     Firmware version      : 0x0110

     Device ID             : 0x0500

    letter@steve-T7500:~/work/Starter-Package/stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/images/stm32mp1$ STM32_Programmer_CLI -c port=USB1 flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv

         -------------------------------------------------------------------

                           STM32CubeProgrammer v2.7.0                 

         -------------------------------------------------------------------

    Warning: Wrong connect parameter: "flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv"

    USB speed  : High Speed (480MBit/s)

    Manuf. ID  : STMicroelectronics

    Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000

    SN         : 0045002A3338510B39303435

    FW version : 0x0110

    Device ID  : 0x0500

    Device name : STM32MP1

    Device type : MPU

    Device CPU : Cortex-A7

    Technical Moderator
    March 29, 2021

    Hi, if "STM32_Programmer_CLI -l" :

    • does not work, please check again your PC prerequisites (Btw, did you use a native Linux PC or a Virtual Machine ?).
    • show "No STM32 device in DFU mode connected", please check board setup and connection.

    Regards.

    SLetterAuthor
    Visitor II
    March 29, 2021

    Native Ubuntu 20.04. All prerequisites met, I can build the images, install them using the sdcard install script and have a working discovery board. I showed my results, I have a dfu mode device

    PatrickFAnswer
    Technical Moderator
    March 29, 2021

    Hi, just see that you mistyped the command, you miss the '-w'

    should be : STM32_Programmer_CLI -c port=USB1 -w flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv

    I agree that the error message is not helping.

    Regards.

    SLetterAuthor
    Visitor II
    March 29, 2021

    Thanks, yes, that is the issue.