Skip to content

Could not find upload tool when using STM32 core #80

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

Closed
evgenykochetkov opened this issue Oct 29, 2018 · 1 comment
Closed

Could not find upload tool when using STM32 core #80

evgenykochetkov opened this issue Oct 29, 2018 · 1 comment

Comments

@evgenykochetkov
Copy link

evgenykochetkov commented Oct 29, 2018

Summary

Trying to use https://github.com/stm32duino/Arduino_Core_STM32 with arduino-cli, but get Upload tool 'stlink_upload' not found. error during upload process. With Arduino IDE everything works fine.

Steps to reproduce

arduino-cli 0.3.1-alpha.preview on macOS

/Users/user/arduino_cli_stm_bugreport with folders sketchbook, arduino_data and a .cli-config.yml file which looks like this:

proxy_type: auto
sketchbook_path: /Users/user/arduino_cli_stm_bugreport/sketchbook
arduino_data: /Users/user/arduino_cli_stm_bugreport/arduino_data
board_manager:
  additional_urls:
    - https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json

It installs and compiles fine:

arduino-cli --config-file .cli-config.yml core update-index
arduino-cli --config-file .cli-config.yml core install STM32:stm32
arduino-cli --config-file .cli-config.yml sketch new helloStm
arduino-cli --config-file .cli-config.yml compile --fqbn STM32:stm32:Nucleo_64:opt=o3std,pnum=NUCLEO_F401RE,upload_method=STLink ./sketchbook/helloStm

but upload fails:

arduino-cli --config-file .cli-config.yml upload --fqbn STM32:stm32:Nucleo_64:opt=o3std,pnum=NUCLEO_F401RE,upload_method=STLink --port /dev/tty.usbmodem14103 -t ./sketchbook/helloStm
Upload tool 'stlink_upload' not found.

Here are the relevant sections from boards.txt

# Upload menu
Nucleo_64.menu.upload_method.MassStorage=Mass Storage
Nucleo_64.menu.upload_method.MassStorage.upload.protocol=
Nucleo_64.menu.upload_method.MassStorage.upload.tool=massStorageCopy

Nucleo_64.menu.upload_method.STLink=STLink
Nucleo_64.menu.upload_method.STLink.upload.protocol=STLink
Nucleo_64.menu.upload_method.STLink.upload.tool=stlink_upload

and from platform.txt

# ST-Link upload
tools.stlink_upload.cmd=stlink_upload
tools.stlink_upload.cmd.windows=stlink_upload.bat
tools.stlink_upload.path.windows={runtime.tools.STM32Tools.path}/tools/win
tools.stlink_upload.path.macosx={runtime.tools.STM32Tools.path}/tools/macosx
tools.stlink_upload.path.linux={runtime.tools.STM32Tools.path}/tools/linux
tools.stlink_upload.path.linux64={runtime.tools.STM32Tools.path}/tools/linux64
tools.stlink_upload.upload.params.verbose=-d
tools.stlink_upload.upload.params.quiet=
tools.stlink_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"

The tool itself seems to be right where it needs to:

ls ./arduino_data/packages/STM32/tools/STM32Tools/1.1.0/tools/macosx
dfu-util              massStorageCopyMacOsX src                   stlink_upload         upload-reset
maple_upload          serial_upload         stlink                stm32flash            upload_router
@cmaglie cmaglie added the bug label Oct 30, 2018
@masci
Copy link
Contributor

masci commented Aug 28, 2019

This seems fixed on master but we have other problems with the STM32 upload, see #355. Let's follow up on that issue, I'm closing this.

@masci masci closed this as completed Aug 28, 2019
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

No branches or pull requests

3 participants