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

STM32F103RC移植报错 #39

Open
Star-Date opened this issue Jun 15, 2023 · 9 comments
Open

STM32F103RC移植报错 #39

Star-Date opened this issue Jun 15, 2023 · 9 comments

Comments

@Star-Date
Copy link

大佬们,我在STM32F10X的工程中更换了芯片STM32F103RC,这是为了能够在proteus中进行仿真。但是直接这样报错了,我参考野火的例程,应该要更换启动文件为ld.s,但是我直接添加进去还是有错,然后我又想着把ArduinoAPI和内核移植到野火的例程中,还是错误。想知道怎么更换芯片能够不报错啊!

@FASTSHIFT
Copy link
Owner

报什么错?完整错误日志发一下。

@Star-Date
Copy link
Author

你好,因为我文件夹中原先配置的不是103R6,然后我修改了。我把原有的启动文件屏蔽掉然后加上了野火的启动文件。我刚刚从新找到的错误的原因,是因为找不到stm32f10x_conf.h文件,现在我把它加入就没有报错了,但是在proteus中仿真(一个灯闪烁程序)还是不正确。是因为这样修改有问题吗?
QQ截图20230615231157
QQ截图20230615231208

@FASTSHIFT
Copy link
Owner

看着没问题,大概率是时钟配置和晶振问题。上真实硬件测试呢?

@Star-Date
Copy link
Author

大佬,我试了试例程里面GPIO,发现可以运行

@Star-Date
Copy link
Author

// ADCx_Init(ADC1);
需要注释这一句,这样就可以运行

@FASTSHIFT
Copy link
Owner

可能是ADC仿真的有问题,初始化失败了。

@Star-Date
Copy link
Author

嗯嗯,毕竟没有实物。请问如果要修改晶振和主频,有什么简单的方法吗?

@FASTSHIFT
Copy link
Owner

自己重新配一下时钟。

@Star-Date
Copy link
Author

好的,感谢大佬的帮助!

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

2 participants