概述
这是我发现
我发现这个问题[ 1 ]其中设备管理器将STM读为 disk drives drives/stm32 。我的PC将其识别为质量存储和便携式设备上的nofollow noreferrer”>。在DFU模式下时,我可以将其视为通用串行总线设备/stm32 bootloader 。
教程[ 2 ]使用 >和这个较旧的教程[ 3 ]驾驶员在ST网站上被标记为已过时。改为指示STM32CuberProgrammermer,但我想直接从IDE闪烁和调试。另一个论坛回复[ 4 ]说“ 您需要一个ST-Link V2程序员来编程全新的芯片”。
总而言之,
我可以看到解决方案是以下选项之一:
- 正确答案 :我需要使用st-link-v2从IDE和 唯一方法
- 这是我需要通过STM32CubRogrammer刷新引导程序以使其通过IDE工作的
- (是否有标准代码?)我必须为
我可能会缺少另一个驱动程序或想法吗?
更新
我继续使用ST-Link V2。我通过 jtag /请参阅示意图),我还尝试直接与引脚连接:
st-link |
jtag/swd |
pins |
swclk |
9 |
pa14 |
swdio |
7 |
pa13 pa13 |
gnd gnd |
10 |
gnd 10 gnd |
3.3v |
1 3.3v 1 3.3v 1 |
3.3v |
rst |
3 |
pb4 |
未识别ST-Link。 ST-Link眨眼,板上电源了,仅此而已。设备管理器 和和
因此,我继续检查是否缺少任何新驱动程序/程序。我安装了基于这些说明,但没有运气,实用程序也找不到。每个驱动程序安装后,我都重置计算机。如果我通过DFU模式通过USB连接板,则仍然将其识别为 stm32 bootloader
,但是如果我使用st-link进行操作,则不会改变。
更新的解决方案
事实证明,ST-Link是错误的,因此没有连接。找到另一个ST-Link V2后,计算机可以在通用串行总线设备/STM32 stlink 下识别板。
Overview
-
I need to program a recently purchased STM32F407ZGT6 board
-
In 'normal mode', my computer doesn't recognize the board as a Ports (COM & LPT)/STMElectronics Virtual COM Port when connected via USB (I'm using a Windows 10 Pro). The LEDs turn on, and I can get it into 'DFU mode'. When I try to debug the code, I get the "No ST-LINK detected!" message in either mode.
-
This is my first time connecting the board and also my first time dealing with STM32
-
Despite the instructions, I want to program the board using C directly from the STM32CubeIDE.
Here is what I found
I found this question [1] where Device Manager reads the STM as Disk drives/STM32. My PC identifies it as mass storage and portable devices on Windows 10 Pro. When in DFU mode, I can see it as Universal Serial Bus Device/STM32 BOOTLOADER in Device Manager.
The tutorial [2] uses the Flash Loader Demo, and this older tutorial [3] uses STSW-STM32080, but both of the drivers are tagged as obsolete on the ST website. STM32CuberProgrammer is indicated instead, but I would like to flash and debug directly from the IDE. Another forum reply [4] says that "you need a ST-LINK V2 programmer to program the brand new chip".
In summary
I can see the solution being one of the following options:
- correct answer: I need to use the ST-LINK-V2 to program from the IDE and that's the only way
- I need to flash a bootloader via STM32CubeProgrammer to get it to work via IDE (is there a standard code for this?)
- I have to build the cross-compiler for MicroPython [5] before I get to program it in C
Is there a solution? Are there another driver or idea that I might be missing?
Update
I went on and got my hands on a ST-LINK V2. I made the connection via the JTAG/SWD connector (see schematic), and I also tried connecting directly with the pins:
ST-Link |
JTAG/SWD |
Pins |
SWCLK |
9 |
PA14 |
SWDIO |
7 |
PA13 |
GND |
10 |
GND |
3.3V |
1 |
3.3V |
RST |
3 |
PB4 |
The ST-Link is not recognized. The ST-LINK blinks and the board is powered up, but that's it. Device Manager before and after) shows the same.
So I went on checking if I was missing any new driver/program. I installed the STSW-LINK004 (STM32 ST-LINK Utility v4.6.0.0) based on these instructions, but without any luck, and Utility cannot find it either. I've reset the computer after each driver installation. If I connect my board via USB in DFU mode, it is still recognized as STM32 BOOTLOADER
, but if I do it with the ST-Link, nothing changes.
Updated solution
It turned out the ST-LINK was faulty and therefore not connecting. After finding another ST-LINK V2, the computer can recognize the board under Universal Serial Bus devices/STM32 STLink.
发布评论
评论(1)
使用STM32Cubeide进行调试将始终需要ST-Link或其他JTAG或SWD调试探针。
Bootloader允许您使用二进制图像对微控制器进行编程,就是。 IDE会很乐意产生这样的二进制图像,甚至可能有一个通过DFU转移它的向导。但这只是编程,没有调试。仅在引导加载程序运行时。如果您确实像读取RAM内容(例如阅读RAM内容)一样,您将在运行时获得启动加载程序在那里的商店,而不是您自己的程序使用的变量。
ROM引导加载程序支持接收新代码以闪存的几种方法-USB(DFU), spi 和。最后一个不是USB虚拟COM端口;它是使用MicroController和RX/TX引脚中的USART外围设备的诚实的uart。
如果您想要一个虚拟COM端口,用于自定义固件将数据发送到PC,则必须对USB外围设备进行编程。
Debugging with STM32CubeIDE will always need an ST-LINK or other JTAG or SWD debug probe.
The bootloader allows you to program the microcontroller with a binary image, and that's it. The IDE will happily produce such a binary image, and possibly even have a wizard for transferring it via DFU. But that's only programming, no debugging. And only be when the bootloader is running. If you did debug-like things like reading RAM contents, you'd get what the bootloader stores there while it is running, not the variables that your own program uses.
The ROM bootloader supports several ways of receiving new code to flash—USB (DFU), CAN, I²C, SPI, and UART. That last is not a USB virtual COM port; it is an honest-to-God UART using the USART peripheral in the microcontroller and RX/TX pins.
If you want a virtual COM port for your custom firmware to use to send data to the PC, you have to program the USB peripheral.