Skip to content

Is there a preferred way to flash STM32 Nucleo board with stlink? #1546

Discussion options

You must be logged in to vote

I finally went with flashscript.

On the Exporter machine I've installed the st-link from github . My config for the Exporter goes something along these lines:

{% for idx, sysfs in [
  ('1', 'pci-0000:00:14.0-usb-0:2.1.1:1.2'),
...
  ('7', 'pci-0000:00:14.0-usb-0:2.4:1.2')
] %}

usbhub-port{{idx}}:
  location: 'Desk @ Home'
  nucleo_uart:
    cls: USBSerialPort
    match:
      ID_PATH: '{{sysfs}}'
  nucleo_flashable:
    cls: USBFlashableDevice
    match:
      SUBSYSTEM: 'usb'
      ID_PATH: '{{sysfs}}'
 
{% endfor %}

Now on the Client side it's a bit more complicated:

I prepared a directory with firmware to flash ans simple flash script:

#! /bin/bash

echo "Erasing ..."
st-flash --freq …

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@MarekSzczypinski
Comment options

@Bastian-Krause
Comment options

@MarekSzczypinski
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by MarekSzczypinski
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants