platformio-core: STM32F0 upload failing
Solution
Please add to platformio.ini
[env:myenv]
board = ...
upload_protocol = stlink
$ pio run --target upload
[Fri May 20 12:05:58 2016] Processing disco_f051r8 (platform: ststm32, board: disco_f051r8, framework: mbed)
------------------------------------------------------------------------------------------------------------------------
MethodWrapper(["upload"], [".pioenvs/disco_f051r8/firmware.bin"])
scons: *** [upload] Explicit exit, status Error: Please specify `upload_port` for environment or use global `--upload-port` option.
For some development platforms this can be a USB flash drive (i.e. /media/<user>/<device name>)
Error: Please specify `upload_port` for environment or use global `--upload-port` option.
For some development platforms this can be a USB flash drive (i.e. /media/<user>/<device name>)
Port is /dev/stlinkv2_6 so let’s follow advice in another approach:
$ pio run --target upload --upload-port /dev/stlinkv2_6
.clang_complete .gitignore .pioenvs/ src/
.gcc-flags.json lib/ platformio.ini .travis.yml
jazg@JAZG-LENOVO:~/work/stm32_test $ pio run --target upload --upload-port /dev/stlinkv2_6
[Fri May 20 12:06:22 2016] Processing disco_f051r8 (platform: ststm32, board: disco_f051r8, framework: mbed)
------------------------------------------------------------------------------------------------------------------------
MethodWrapper(["upload"], [".pioenvs/disco_f051r8/firmware.bin"])
scons: *** [upload] /dev/stlinkv2_6/firmware.bin: Not a directory
Port is accessible, of course:
$ ls -la /dev/stlinkv2_6
lrwxrwxrwx 1 root root 15 maj 20 11:53 /dev/stlinkv2_6 -> bus/usb/003/003
Code builds without problems:
$ pio run
[Fri May 20 12:13:34 2016] Processing disco_f051r8 (platform: ststm32, board: disco_f051r8, framework: mbed)
------------------------------------------------------------------------------------------------------------------------
arm-none-eabi-g++ -o .pioenvs/disco_f051r8/src/main.o
[ ... skipped for brevity ... ]
"arm-none-eabi-size" -B -d .pioenvs/disco_f051r8/firmware.elf
arm-none-eabi-objcopy -O binary .pioenvs/disco_f051r8/firmware.elf .pioenvs/disco_f051r8/firmware.bin
text data bss dec hex filename
12988 124 548 13660 355c .pioenvs/disco_f051r8/firmware.elf
============================================= [SUCCESS] Took 0.91 seconds =============================================
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (7 by maintainers)
Commits related to this issue
- Add stlink as the default uploader for disco boards // Issue #665 — committed to platformio/platformio-core by valeros 8 years ago
- Merge branch 'develop' into feature/platformio-30 * develop: Install tox manually Simplified documentation for Continuous integration with AppVeyor // Resolve #671 Fix broken links to project e... — committed to platformio/platformio-core by ivankravets 8 years ago
- Version bump to 2.9.2 (issues #641, #645, #648, #652, #664, #665, #666, #671, #674) — committed to platformio/platformio-core by ivankravets 8 years ago
- Merge branch 'develop' into feature/platformio-30 * develop: Version bump to 2.9.2 (issues #641, #645, #648, #652, #664, #665, #666, #671, #674) Fix issue with ARM mbed framework when abstract cl... — committed to platformio/platformio-core by ivankravets 8 years ago
Hi @zgoda Looks like your kit only supports uploading over
STlink. Could you tryupload_protocol = stlinkoption in yourplatformio.ini?@bfarayev Thanks, I got you now. The
stlinkprotocol is set by default only for thedisco_*boards where thembed diskis used fornucleo_*.In this case, you need manually force the
upload_protocolas you do it.@valeros please specify
stlinkupload protocol for the boards without ARM mbed bootloader.