Skip to content

Instantly share code, notes, and snippets.

@HoriLiu
Last active May 21, 2017 09:23
Show Gist options
  • Save HoriLiu/afb0e6d8ddb0bbe372dc1de0bb118ad0 to your computer and use it in GitHub Desktop.
Save HoriLiu/afb0e6d8ddb0bbe372dc1de0bb118ad0 to your computer and use it in GitHub Desktop.
Build Board PYB NANO V11 for micropython in Debian (Archlinux is the same)
screen /dev/ttyACM0
pyb.bootloader() #As short BOOT0 to VDD, then MCU Reset change to bootloader (DFU mode)
# Refer to https://github.com/micropython/micropython/wiki/Board-STM32F407-Discovery
sudo apt-get install dfu-util
sudo vi /etc/udev/rules.d/49-stmdiscovery.rules and put the following contents:
# f055:9800 - STM32F4 Discovery running MicroPython in USB Serial Mode (CN5)
ATTRS{idVendor}=="f055", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="f055", ENV{MTP_NO_PROBE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="f055", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="f055", MODE:="0666"
# 0483:df11 - STM32F4 Discovery in DFU mode (CN5)
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666"
Tell udev to reload its rules:
sudo udevadm control --reload-rules
sudo make BOARD=PYBNANOV11 deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment