最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Nucleo-F303RE cannot connect via USB on PlatformIO - Stack Overflow

programmeradmin5浏览0评论

I'm working on a project for uni and I would like to use PlatformIO for the project development, since it seems more practical than the Arduino IDE. However, I keep getting this error when trying to upload any file to my Nucleo F303RE.

Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: .html
PLATFORM: ST STM32 (19.0.0) > ST Nucleo F303RE
HARDWARE: STM32F303RET6 72MHz, 64KB RAM, 512KB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, cmsis-dap, jlink)
PACKAGES:
 - framework-arduinoststm32 @ 4.20900.0 (2.9.0)
 - framework-cmsis @ 2.50900.0 (5.9.0)
 - tool-dfuutil @ 1.11.0
 - tool-dfuutil-arduino @ 1.11.0
 - tool-openocd @ 3.1200.0 (12.0)
 - tool-stm32duino @ 1.0.2
 - toolchain-gccarmnoneeabi @ 1.120301.0 (12.3.1)
LDF: Library Dependency Finder -> [bitly link that I had to remove]
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 14 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Checking size .pio\build\nucleo_f303re\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   1.8% (used 1204 bytes from 65536 bytes)
Flash: [          ]   1.8% (used 9336 bytes from 524288 bytes)
Configuring upload protocol...
AVAILABLE: blackmagic, cmsis-dap, jlink, mbed, stlink
CURRENT: upload_protocol = stlink
Uploading .pio\build\nucleo_f303re\firmware.elf
xPack Open On-Chip Debugger 0.12.0-01004-g9ea7f3d64-dirty (2023-01-30-15:04)
Licensed under GNU GPL v2
For bug reports, read
        .html
debug_level: 1

srst_only separate srst_nogate srst_open_drain connect_deassert_srst

Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: open failed
in procedure 'program'
** OpenOCD init failed **
shutdown command invoked

*** [upload] Error 1

This is the whole upload log when I try to upload the project (after already compiling it).

I've read through some other topics and the errors others seem to have with other boards was that they're improperly connected/missing a channel/etc. but the Nucleo should only need the one usb cable.

The Nucleo works fine with the Arduino IDE and I was able to upload to it many times, so I don't understand why it gives a LIBUSB_ERROR_NOT_FOUND. I also tried setting the exact upload_port to com7, which is the usb port I use, but it didn't change anything.

Does anyone have any insights? Cause I'm not experienced enough to fix this...

ETA: My platformio.ini is this:

[env:nucleo_f303re]
platform = ststm32
board = nucleo_f303re
framework = arduino
发布评论

评论列表(0)

  1. 暂无评论