stm32duino / Arduino_Tools

Contains upload tools for STM32 based boards
Other
87 stars 63 forks source link

feat: unified maple_upload and dfu_util scripts (remove maple_loader.jar usage) #89

Closed fpistm closed 1 year ago

fpistm commented 1 year ago

Fixes #67

On windows, maple_loader.jar is replaced by small binary based on http://sigrok.org/wiki/Libserialport. Then dfu-utils is used. This unified all host OS maple upload management as same scripts used for all.

Some fix made to scripts.

Tested:

Host \ IDE 1.8.19 2.0.3
windows :heavy_check_mark: :heavy_check_mark:
Linux :heavy_check_mark: :heavy_check_mark:
Mac :heavy_check_mark: :heavy_check_mark:
STMicroelectronics\tools\STM32Tools\2.1.1/win/busybox.exe sh STMicroelectronics\tools\STM32Tools\2.1.1/maple_upload.sh COM35 2 1EAF:0003 arduino_build_624395/Blink.ino.bin 
Looking for port COM35.
Port name: COM35
Description: USB Serial Device (COM35)
Opening port.
dfu-util - (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

Opening USB Device 0x1eaf:0x0003...
Found Runtime: [0x1eaf:0x0003] devnum=1, cfg=0, intf=0, alt=2, name="STM32duino bootloader v1.0  Upload to Flash 0x8002000"
Setting Configuration 1...
Claiming USB DFU Interface...
Setting Alternate Setting ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0400
bytes_per_hash=474
Starting download: [#################################################error resetting after download: usb_reset: could not reset device, win error: A device which does not exist was specified.

#] finished!
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode
Waiting for COM35 serial..... Done.

image