STM32CUBEF4 实现USB 虚拟串口

一、stm32cubemx 生成工程后USB转串口出现黄色感叹号的问题

如下图所示,在stm32cubemx工程中选择usb转串口功能Communication Device Class (Virtual Port Com)

USB配置默认

生成工程之后,插上USB会出现黄色感叹号,如下图所示:

解决办法:

打开工程的启动文件:startup_stm32f401xc.s


Heap_Size      EQU     0x200

修改为

Heap_Size      EQU     0x1000

或者

Heap_Size     EQU       0x1500

二、参考文档

http://www.stmcu.org/module/forum/forum.php?mod=viewthread&tid=612436&extra=page%3D&page=1

http://www.stm32cube.com/question/26

原文地址:https://www.cnblogs.com/yangxuli/p/9438000.html