简体   繁体   English

STM32cubeIDE 忽略我的代码并使用 MX 配置

[英]STM32cubeIDE ignore my code and using MX config

I have a question.我有个问题。 Is there any option to disable CubeMx in STM32cubeIDE? STM32cubeIDE中是否有禁用CubeMx的选项?

I just want use UART.我只想使用UART。 So I write PINs and UART configuration in my main.c file.所以我在 main.c 文件中编写了 PIN 和 UART 配置。 However CubeMX already had UART's pins configured and completely ignored my pins configuration.但是 CubeMX 已经配置了 UART 的引脚,完全忽略了我的引脚配置。

It is very annoying when I dont know if i have to configure something in code or CubeMx.当我不知道是否必须在代码或 CubeMx 中配置某些内容时,这非常烦人。

Thank in advance for your answer.提前感谢您的回答。

I just create new project, wrote UART configuration and it didn't work.我刚刚创建了新项目,编写了 UART 配置,但它没有用。 So then I check cube and saw pins with description UART pin TX and RX.然后我检查了立方体并看到了带有 UART 引脚 TX 和 RX 描述的引脚。

Now i comment my pin config code and it still work.现在我评论了我的 pin 配置代码,它仍然有效。 UART send and receive data. UART 发送和接收数据。 For me its strange.对我来说很奇怪。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM