STM32duino bootloader Linux confusion.

Bootloader for boards that don't have the addition hardware found on the Maple mini, which resets the USB
ag123
Posts: 298
Joined: Thu Jul 21, 2016 4:24 pm

Re: STM32duino bootloader Linux confusion.

Postby ag123 » Tue Mar 28, 2017 8:00 pm

i'm re-posting my entire post from olimex forum here as it may actually be helpful to those using the leaflabs maple style boards

source:
https://www.olimex.com/forum/index.php?topic=5416.msg22436#msg22436
----------------------------------- original post ------------------
yes i did it! the culprit - my finger errors, thanks for all that help :D


https://www.olimex.com/Products/Duino/STM32/OLIMEXINO-STM32/resources/Olimexino-STM32_Installation.pdf
Hit the reset button on your Maple (it’s the small button at the bottom left, labeled
RESET). Notice that it blinks quickly 6 times, then blinks slowly a few more times.
Hit reset again, and this time push and hold the other button **during** the 6 fast blinks
(the button is on the top right; it is labeled BUT). You can release it once the slow
blinks start.
Your Maple is now in perpetual bootloader mode.


other finger mistakes may put the device in serial update (serial flash update) mode, the led stops blinking
http://embedded-lab.com/blog/stm32-programming-tips-and-tricks/

----
when the board is in DFU boot loader mode, in linux, it uses device 1eaf:0003 instead of 1eaf:0004

> sudo lsusb -v -d 1eaf:0003

Bus 003 Device 044: ID 1eaf:0003
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1eaf
idProduct 0x0003
bcdDevice 2.00
iManufacturer 1 LeafLabs
iProduct 2 Maple 003
iSerial 3 LLM 003
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 36
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 254 Application Specific Interface
bInterfaceSubClass 1 Device Firmware Update
bInterfaceProtocol 2
iInterface 4 DFU Program RAM 0x20000C00
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 0
bInterfaceClass 254 Application Specific Interface
bInterfaceSubClass 1 Device Firmware Update
bInterfaceProtocol 2
iInterface 5 DFU Program FLASH 0x08005000
Device Firmware Upgrade Interface Descriptor:
bLength 9
bDescriptorType 33
bmAttributes 1
Will Not Detach
Manifestation Intolerant
Upload Unsupported
Download Supported
wDetachTimeout 65535 milliseconds
wTransferSize 1024 bytes
bcdDFUVersion 0.01
Device Status: 0x0001
Self Powered


> dfu-util -l
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Found DFU: [1eaf:0003] ver=0200, devnum=44, cfg=1, intf=0, alt=1, name="DFU Program FLASH 0x08005000", serial="LLM 003"
Found DFU: [1eaf:0003] ver=0200, devnum=44, cfg=1, intf=0, alt=0, name="DFU Program RAM 0x20000C00", serial="LLM 003"


sketch install from maple ide:
Going to build using 'armcompiler' (ARM)
Compiling core...
No libraries to compile.
Compiling the sketch...
Linking...
Computing sketch size...

/tmp/build8700154956568391079.tmp/sketch_jul21a.cpp.bin :
section size addr
.data 12992 0
Total 12992


Binary sketch size is reported above. Check it against a 108000 byte maximum.
Loading via dfu-util
Resetting to bootloader via DTR pulse

Reset via USB Serial Failed! Did you select the serial right serial port?
Assuming the board is in perpetual bootloader mode and continuing to attempt dfu programming...


Searching for DFU device [1EAF:0003]...
Found it!

Opening USB Device 0x1eaf:0x0003...
Found Runtime: [0x1eaf:0x0003] devnum=44, cfg=0, intf=0, alt=1, name="DFU Program FLASH 0x08005000"
Claiming USB DFU Interface...
Setting Alternate Setting ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0400
bytes_per_hash=259
Starting download: [##################################################] finished!
error resetting after download: No such file or directory
state( 8 ) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode


Return to “Generic bootloader”

Who is online

Users browsing this forum: No registered users and 2 guests