VS Code中的设置平台IO IDE,用于在Windows 10中对STM32进行编程

时间:2018-10-23 12:43:46

标签: embedded stm32 stm32f4discovery stm32f4 platformio

为完成此任务,我使用了全新的Windows10。在此之后,我安装了VS Code和PlatformIO,以及MSYS。我以为我可以构建固件并将其上传到STM32F4Discovery,但我遇到了一个问题。

作为参考,我使用了示例项目blink-hal-stm32cubemx。它的构建没有错误,但是当我尝试将其上传到板上时,我遇到了错误:

> Executing task: C:\Users\gosto\.platformio\penv\Scripts\platformio.exe run --target upload <

Processing genericSTM32F407VGT6 (platform: ststm32; board: genericSTM32F407VGT6; framework: stm32cube)-------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: ST STM32 > STM32F407VG (192k RAM. 1024k Flash)SYSTEM: STM32F407VGT6 168MHz 192KB RAM (1MB Flash)
COMPATIBILITY(soft)Collected 0 compatible libraries
Scanning dependencies...
No dependenciesChecking size .pioenvs\genericSTM32F407VGT6\firmware.elf
Memory Usage -> pio-memory-usageDATA:    [          ]   0.0% (used 44 bytes from 196608 bytes)
PROGRAM: [          ]   0.1% (used 1268 bytes from 1048576 bytes)
Configuring upload protocol...
AVAILABLE: dfu, stlink
CURRENT: upload_protocol = stlink
Uploading .pioenvs\genericSTM32F407VGT6\firmware.elf
GNU MCU Eclipse 64-bits Open On-Chip Debugger 0.10.0+dev-00392-gbe9ef0b0 (2018-01-12-15:03)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
hla_swd
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
none separate
none separate
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : STLINK v2 JTAG v25 API v2 SWIM v14 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 2.908185
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3333 for gdb connections
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
adapter speed: 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080005c4 msp: 0x20020000
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
adapter speed: 4000 kHz
** Programming Started **
auto erase enabled
Info : device id = 0x100f6413
Info : flash size = 1024kbytes
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x20000046 msp: 0x20020000
wrote 16384 bytes from file .pioenvs\genericSTM32F407VGT6\firmware.elf in 0.589002s (27.165 KiB/s)
** Programming Finished **
** Verify Started **
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20020000
verified 1668 bytes in 0.110720s (14.712 KiB/s)
** Verified OK **
** Resetting Target **
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
adapter speed: 1800 kHz
shutdown command invoked
================================ [SUCCESS] Took 4.61 seconds ================================

Terminal will be reuse

此外,主板在上传固件后不会重新启动。 ST-link LED指示灯不闪烁,并保持绿色状态。

0 个答案:

没有答案