ich versuche mit dem platformio einen ST-Nucleo zu programmieren.
Es scheitert derzeit am Upload. Auf dem Nucleo ist ein ST-Link fest dran, also Verdrahtungsfehler fällt aus.
Ein Fehler ist auch: Error: 81 1 command.c:1027 run_usage(): invalid subcommand "driver hla"
Was ist das denn?
platformio.ini
Code: Alles auswählen
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:nucleo_f302r8]
platform = ststm32
board = nucleo_f302r8
framework = stm32cube
Code: Alles auswählen
> Executing task: platformio run --verbose --target upload --environment nucleo_f302r8 <
Processing nucleo_f302r8 (platform: ststm32; board: nucleo_f302r8; framework: stm32cube)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/nucleo_f302r8.html
PLATFORM: ST STM32 (14.1.0) > ST Nucleo F302R8
HARDWARE: STM32F302R8T6 72MHz, 16KB RAM, 64KB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, cmsis-dap, jlink)
PACKAGES:
- framework-stm32cubef3 1.11.1
- tool-dfuutil 1.9.200310
- tool-ldscripts-ststm32 0.1.0
- tool-openocd 2.1100.0 (11.0)
- tool-stm32duino 1.0.1
- toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 26 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
MethodWrapper(["checkprogsize"], [".pio/build/nucleo_f302r8/firmware.elf"])
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 0.3% (used 44 bytes from 16384 bytes)
Flash: [ ] 1.7% (used 1140 bytes from 65536 bytes)
.pio/build/nucleo_f302r8/firmware.elf :
section size addr
.isr_vector 392 134217728
.text 1128 134218120
.rodata 0 134219248
.ARM.extab 0 134219248
.ARM 0 134219248
.preinit_array 0 134219248
.init_array 4 134219248
.fini_array 4 134219252
.data 12 536870912
.bss 32 536870924
._user_heap_stack 1540 536870956
.ARM.attributes 42 0
.comment 126 0
.debug_frame 44 0
Total 3324
<lambda>(["upload"], [".pio/build/nucleo_f302r8/firmware.elf"])
AVAILABLE: blackmagic, cmsis-dap, jlink, mbed, stlink
CURRENT: upload_protocol = stlink
openocd -d2 -s /home/boris/.platformio/packages/tool-openocd/scripts -f board/st_nucleo_f3.cfg -c "program {.pio/build/nucleo_f302r8/firmware.elf} verify reset; shutdown;"
xPack OpenOCD, x86_64 Open On-Chip Debugger 0.11.0-00155-ge392e485e (2021-03-15-16:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : clock speed 1000 kHz
Info : STLINK V2J28M17 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.278473
Error: init mode failed (unable to connect to the target)
in procedure 'program'
** OpenOCD init failed **
shutdown command invoked
*** [upload] Error 1
=============================================================================== [FAILED] Took 1.46 seconds ===============================================================================
The terminal process "platformio 'run', '--verbose', '--target', 'upload', '--environment', 'nucleo_f302r8'" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.