Skip to content
ghoang edited this page May 10, 2016 · 19 revisions
Requirements

Linux udev rules

SUBSYSTEM=="usb", ACTION!="add", GOTO="objdev_rules_end"
#stmbl
ATTR{idVendor}=="0483", ATTR{idProduct}=="5740", ENV{ID_MM_DEVICE_IGNORE}="1", GROUP="users", MODE="0666"
#ST USB bootloader
ATTR{idVendor}=="0483", ATTR{idProduct}=="df11", GROUP="users", MODE="0666"
LABEL="objdev_rules_end"

##flashing STMBL stmbl has an USB bootloader to flash the f4. This requires dfu-util to be installed. to enter the bootloader type bootloader in Servoterm.

dfu util can be invoked by make btburn.

to enter the bootloader automatically by the makefile, adjust the printf statement in the btburn target to your device.

When the firmware is corrupted, or to flash the f1 you need to flash via SWD (serial wire debug). In the future it will be possible to flash both MCUs with the bootloader, and it will work with corrupted images, this is work in progress.

The bootloader can also entered by shorting DIO to GND.

###Using SWD SWD requires an st-link programmer which can be found on ebay, or on any STM Discovery board, and stlink to be installed https://github.com/texane/stlink

to flash via SWD:

stm32f405 bootloader make boot_flash
stm32f103 main app make hv_flash

JP1 and JP7 are the SWD headers for the f1 and f4 respectively.

To use a stm32f4 discovery as stlink programmer:

  • remove both jumpers from CN3 on discovery
  • connect pin 2,3,4,5 of the SWD connector to CLK,GND,DIO,RST on stmbl
  • make burn

##Branches ###master Mostly new stuff, should always work. ###motsim Simulation and PID stuff, may be broken at any time. ###new_hal new hal component format ###new_scope New terminal software using wxMathPlot. experimental. ###troller f1 firmware development for the troller.

Clone this wiki locally