Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我用STM32CubeMX生成了工程,但其实很难编译通过 #66

Closed
idnewfeel opened this issue Mar 16, 2022 · 6 comments
Closed

我用STM32CubeMX生成了工程,但其实很难编译通过 #66

idnewfeel opened this issue Mar 16, 2022 · 6 comments

Comments

@idnewfeel
Copy link

我用STM32Cubemx生成了MDK的工程,加上了C++编译,以及C99模式,生成的代码中,main.cpp和mian.c 以及usb_cdc_if.cpp和usb_cdc_if.c相互重叠,FreeRTOS源码和C++部分代码报了大量错误。看来需要尝试clion 来编译了。

@Mars-Geek
Copy link

求一份编译好的hex,平时keil用的多,其他编译器不会用

@peng-zhihui
Copy link
Owner

peng-zhihui commented Mar 16, 2022

仔细看README写的编译说明,USB相关文件是要替换的,STM32CubeMX只适合第一次生成代码,后续修改了用户代码很多都会被覆盖。而且估计你Keil里也没有添加我自己的代码,工程里根本不完整。

@jinyi7016
Copy link

可以把clion的工程转换成stm32cubeide的工程,可以参考点这里

@idnewfeel
Copy link
Author

可以把clion的工程转换成stm32cubeide的工程,可以参考点这里

写的很详细,晚上回去看看

@idnewfeel
Copy link
Author

仔细看README写的编译说明,USB相关文件是要替换的,STM32CubeMX只适合第一次生成代码,后续修改了用户代码很多都会被覆盖。而且估计你Keil里也没有添加我自己的代码,工程里根本不完整。

嗯,UP的代码我确实是添加了。我想大概和你说的一样,可能是生成的文件被替换掉了,

@VOIDDEFINE
Copy link

楼主KEIL的解决了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants