Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maple_upload dfu_address set to "{runtime.ide.path}" instead of {upload.dfuse_addr} or nothing #854

Closed
tomaskovacik opened this issue May 6, 2021 · 2 comments · Fixed by #855

Comments

@tomaskovacik
Copy link
Contributor

tomaskovacik commented May 6, 2021

hi there,

strange issue on linux:

  • clean install (arduino sw + cortex-m3 support + arduino_Stm32)

upload in ide fail, but when I remove location of arduino installation from upload command line at the end all works fine, any hints how to fix it? I guess I am not only linux user here, so I am only one with this problem

nail@sid:/opt$ /home/nail/Arduino/hardware/Arduino_STM32-master/tools/linux/maple_upload ttyACM0 2 1EAF:0003 /tmp/arduino_build_28369/cdc_stm32duino_ported_k9spud_vwcdpic.ino.bin /opt/arduino-1.8.13 
Can't open /dev/ttyACM0: No such file or directory
Can't open serial /dev/ttyACM0

*** autoreset failed; you need to use RESET button
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

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 1eaf:0003
Run-time device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Setting #2 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 1024
dfu-util: Invalid dfuse address: /opt/arduino-1.8.13

Upload failed :(
nail@sid:/opt$ /home/nail/Arduino/hardware/Arduino_STM32-master/tools/linux/maple_upload ttyACM0 2 1EAF:0003 /tmp/arduino_build_28369/cdc_stm32duino_ported_k9spud_vwcdpic.ino.bin
Can't open /dev/ttyACM0: No such file or directory
Can't open serial /dev/ttyACM0

*** autoreset failed; you need to use RESET button
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

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 1eaf:0003
Run-time device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Setting #2 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 1024
Copying data from PC to DFU device
Download	[=========================] 100%        40660 bytes
Download done.
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode
Waiting for /dev/ttyACM0 serial... DONE :)

@tomaskovacik
Copy link
Contributor Author

this works:

diff --git a/STM32F1/platform.txt b/STM32F1/platform.txt
index cb5c43c..8e1a34c 100644
--- a/STM32F1/platform.txt
+++ b/STM32F1/platform.txt
@@ -118,7 +118,7 @@ tools.maple_upload.path.linux={runtime.hardware.path}/tools/linux
 tools.maple_upload.path.linux64={runtime.hardware.path}/tools/linux64    
 tools.maple_upload.upload.params.verbose=-d
 tools.maple_upload.upload.params.quiet=
-tools.maple_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin" "{runtime.ide.path}"
+tools.maple_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"
 
 #Added tool for generic STM32 upload via serial to Serial Port 1 (pins PA9 and PA10) - note. Boot0 line needs to high on board reset to enable upload via serial
 # at the end up the upload the program is automatically run, without the board being reset

image

@tomaskovacik tomaskovacik changed the title upload works from console not from ide maple_upload dfu_address set to "{runtime.ide.path}" instead of {upload.dfuse_addr} or nothing May 7, 2021
@fpistm
Copy link
Contributor

fpistm commented May 7, 2021

Linked to this PR
#814

The same PR has been submitted on the STM32 core but I do not merge it as this does not cover all cases.

tomaskovacik added a commit to tomaskovacik/Arduino_STM32 that referenced this issue May 7, 2021
stevstrong added a commit to stevstrong/Arduino_STM32 that referenced this issue Feb 28, 2024
* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Increment size of emulated EEPROM

Defines paremeter Pages for use more than one page per bank on emulated EEPROM.

* Create TestCompile.yml

Initial version

* Update TestCompile.yml

* Changed Ethernet.h to Ethernet_STM.h

This was forgotten for this example

* Adding Adafruit Gfx library, excluding errorneous examples

* included libs excluded examples, removed debug

* more exludes

* excluded OLED_I2C examples

* Compatibility with current HEAD versions of Adafruit GFX and Adafruit BusIO.

* Adafruit_GFX_AS: Use a macro to achieve s/textsize/textsize_x/.

* Fix mistaken cast of wrong argument.

* STM32F4 backup domain registers and backup domain sram

STM32F4: update bkp.h, bkp.c add support for backup registers and backup sram.
added example in STM32F4/libraries/RTClock/examples/BkpTest

* STM32F4: RTClock - prevent clobbering if run on LSE and VBAT

updated RTClock.begin()
skip initialization of RTC running on LSE if it is already running
so that the time maintained on VBAT would not be reset

note that the change only prevents resetting RTC on LSE as only that is assured
when running on VBAT

* STM32F4 RTClock minor fix

in begin()
change:
  if(!lse_ison && RTCSEL_LSE) {
to:
  if(!lse_ison)

that RTCSEL_LSE is redundant. it suffice to test that lse_ison

* F1: fix for rogerclarkmelbourne#852: added function definition into pgmsapce.h

* USBComposite library updates: MIDI sysex support; bug fixes

* fix maple_upload dfu_address set to {runtime.ide.path} instead of {upload.dfuse_addr} or nothing rogerclarkmelbourne#854

* F1: Wire: add wire(const uint8*, int) to WireBase.h

* USB Composite 1.06 merge

* Delete unneeded file

* Update WireBase.h

added return value to write(const uint8* buf, int nr)

* Added blackpill_f411 variant

* added build options for the abilirty to select HSI clock source without a crystal - generic F103C8 only so far.

* Fix incorrect upload method for F411

* fixes rogerclarkmelbourne#883 

 random() without parameter like in standard Arduino API is missing.

* update USBComposite to 1.0.7

* Added workflow_dispatch for manual build check

This is a very handy feature :-)

* Using ln -s instead of cp

* Using ln -s instead of cp

* Fixing error: 'utoa' was not declared in this scope - see rogerclarkmelbourne#884

* Update README.md

removed invalid link to Gitter

* fix HardwareCANexample.ino

* Update wirish_digital.cpp - fix rogerclarkmelbourne#859

* fix boardPWMpins table for generic gdf103c variant

* fix boardPWMpins for generic F103c variant

* fix boardPWMpins table for generic F103C variant

* fix BOARD_NR_PWM_PIN for generic F103C variant

* Update SPI.cpp

remove some obsolete flags

* F1: DMA transfer setup function - changed parameter definition

* F1: SPI rework

* Update Print.cpp

added serial PRINTF and DBG_PRINTF

* F1: fixed generic F103 board PWM pins

* F1: added function to check if spi is in master mode

* Update SPI.cpp

- fixed DMA wait for completion in slave mode
- limited text columns to 120

* F1: SPI dmaTransferRepeat() got 2 optional parmaeters

* Rename hid-flash to hid_flash

rogerclarkmelbourne#895

* systick allows up to 4 callbacks

* F4: added PRINTF

* F4: added soft-reset nvic_sys_reset()

* F4: optimized ring_buffer

* renamed tools/macosx/hid_flash

* F4: fix heap start address for F411 boards

* F4: Wire support of alternative pins

* F4: added I2S library

* Update SPI.h

* F4: removed arduino_uip library (not used)

* F4: added Adafruit_ILI9341_STM library

* Delete AdvancedChatServer.ino

* F4: allow output pin speed selection

* F4: small changes

* F1: small changes in Adafruit_ILI9341_STM

* F1: small changes in Serasidis_VS1003B lib

* F1: removed timer setup from board init

* F1: SPI settings get initialized when creating the instance

* Update wirish.h

* Delete c_cpp_properties.json

* Update .gitignore

* Update rcc_private.h

* small fixes after previous merge

* Update SPI.h

* remove some not needed files

---------

Co-authored-by: Phonog <jeanmarc.delaplace@gmail.com>
Co-authored-by: Roger Clark <roger@rogerclark.net>
Co-authored-by: svmac <svmacx@gmail.com>
Co-authored-by: Armin <armin.arduino@gmail.com>
Co-authored-by: Kiki Lamb <miss.kiki.lamb@gmail.com>
Co-authored-by: ag88 <ag88@github>
Co-authored-by: arpruss <arpruss@gmail.com>
Co-authored-by: Tomas kovacik <nail@nodomain.sk>
Co-authored-by: board707 <ddt@jwee.ru>
Co-authored-by: purewack <54288625+purewack@users.noreply.github.com>
stevstrong added a commit to stevstrong/Arduino_STM32 that referenced this issue Feb 28, 2024
* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Increment size of emulated EEPROM

Defines paremeter Pages for use more than one page per bank on emulated EEPROM.

* Create TestCompile.yml

Initial version

* Update TestCompile.yml

* Changed Ethernet.h to Ethernet_STM.h

This was forgotten for this example

* Adding Adafruit Gfx library, excluding errorneous examples

* included libs excluded examples, removed debug

* more exludes

* excluded OLED_I2C examples

* Compatibility with current HEAD versions of Adafruit GFX and Adafruit BusIO.

* Adafruit_GFX_AS: Use a macro to achieve s/textsize/textsize_x/.

* Fix mistaken cast of wrong argument.

* STM32F4 backup domain registers and backup domain sram

STM32F4: update bkp.h, bkp.c add support for backup registers and backup sram.
added example in STM32F4/libraries/RTClock/examples/BkpTest

* STM32F4: RTClock - prevent clobbering if run on LSE and VBAT

updated RTClock.begin()
skip initialization of RTC running on LSE if it is already running
so that the time maintained on VBAT would not be reset

note that the change only prevents resetting RTC on LSE as only that is assured
when running on VBAT

* STM32F4 RTClock minor fix

in begin()
change:
  if(!lse_ison && RTCSEL_LSE) {
to:
  if(!lse_ison)

that RTCSEL_LSE is redundant. it suffice to test that lse_ison

* F1: fix for rogerclarkmelbourne#852: added function definition into pgmsapce.h

* USBComposite library updates: MIDI sysex support; bug fixes

* fix maple_upload dfu_address set to {runtime.ide.path} instead of {upload.dfuse_addr} or nothing rogerclarkmelbourne#854

* F1: Wire: add wire(const uint8*, int) to WireBase.h

* USB Composite 1.06 merge

* Delete unneeded file

* Update WireBase.h

added return value to write(const uint8* buf, int nr)

* Added blackpill_f411 variant

* added build options for the abilirty to select HSI clock source without a crystal - generic F103C8 only so far.

* Fix incorrect upload method for F411

* fixes rogerclarkmelbourne#883 

 random() without parameter like in standard Arduino API is missing.

* update USBComposite to 1.0.7

* Added workflow_dispatch for manual build check

This is a very handy feature :-)

* Using ln -s instead of cp

* Using ln -s instead of cp

* Fixing error: 'utoa' was not declared in this scope - see rogerclarkmelbourne#884

* Update README.md

removed invalid link to Gitter

* fix HardwareCANexample.ino

* Update wirish_digital.cpp - fix rogerclarkmelbourne#859

* fix boardPWMpins table for generic gdf103c variant

* fix boardPWMpins for generic F103c variant

* fix boardPWMpins table for generic F103C variant

* fix BOARD_NR_PWM_PIN for generic F103C variant

* Update SPI.cpp

remove some obsolete flags

* F1: DMA transfer setup function - changed parameter definition

* F1: SPI rework

* Update Print.cpp

added serial PRINTF and DBG_PRINTF

* F1: fixed generic F103 board PWM pins

* F1: added function to check if spi is in master mode

* Update SPI.cpp

- fixed DMA wait for completion in slave mode
- limited text columns to 120

* F1: SPI dmaTransferRepeat() got 2 optional parmaeters

* Rename hid-flash to hid_flash

rogerclarkmelbourne#895

* systick allows up to 4 callbacks

* F4: added PRINTF

* F4: added soft-reset nvic_sys_reset()

* F4: optimized ring_buffer

* renamed tools/macosx/hid_flash

* F4: fix heap start address for F411 boards

* F4: Wire support of alternative pins

* F4: added I2S library

* Update SPI.h

* F4: removed arduino_uip library (not used)

* F4: added Adafruit_ILI9341_STM library

* Delete AdvancedChatServer.ino

* F4: allow output pin speed selection

* F4: small changes

* F1: small changes in Adafruit_ILI9341_STM

* F1: small changes in Serasidis_VS1003B lib

* F1: removed timer setup from board init

* F1: SPI settings get initialized when creating the instance

* Update wirish.h

* Delete c_cpp_properties.json

* Update .gitignore

* Update rcc_private.h

* small fixes after previous merge

* Update SPI.h

* remove some not needed files

---------

Co-authored-by: Phonog <jeanmarc.delaplace@gmail.com>
Co-authored-by: Roger Clark <roger@rogerclark.net>
Co-authored-by: svmac <svmacx@gmail.com>
Co-authored-by: Armin <armin.arduino@gmail.com>
Co-authored-by: Kiki Lamb <miss.kiki.lamb@gmail.com>
Co-authored-by: ag88 <ag88@github>
Co-authored-by: arpruss <arpruss@gmail.com>
Co-authored-by: Tomas kovacik <nail@nodomain.sk>
Co-authored-by: board707 <ddt@jwee.ru>
Co-authored-by: purewack <54288625+purewack@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants