完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
STM32f103转到ch32f203的时候,是不是所有的系统的.h文件,所有的系统的.c文件,都要替换掉?从代码到目录?
include paths也得重新定义? hardwareBase.c(473): error: #20: identifier "SysTick_CTRL_CLKSOURCE" is undefined SysTick->CTRL &= ~SysTick_CTRL_CLKSOURCE; //CLK come from HCLK/8 hardwareBase.c(474): error: #20: identifier "SysTick_CTRL_ENABLE" is undefined SysTick->CTRL |= SysTick_CTRL_ENABLE; hardwareBase.c(491): error: #20: identifier "SysTick_CTRL_CLKSOURCE" is undefined SysTick-> CTRL &= ~SysTick_CTRL_CLKSOURCE; hardwareBase.c(492): error: #20: identifier "SysTick_CTRL_ENABLE" is undefined SysTick->CTRL |= SysTick_CTRL_ENABLE; hardwareBase.c(509): error: #20: identifier "SysTick_CTRL_CLKSOURCE" is undefined SysTick-> CTRL &= ~SysTick_CTRL_CLKSOURCE; hardwareBase.c(510): error: #20: identifier "SysTick_CTRL_ENABLE" is undefined SysTick->CTRL |= SysTick_CTRL_ENABLE; hardwareBase.c(540): error: #136: struct "" has no field "SR" do{} while ((IWDG->SR & 0x0003) != 0); hardwareBase.c(541): error: #136: struct "" has no field "KR" IWDG->KR = IWDG_WriteAccess_Enable; //0x5555;//使能对IWDG->PR和IWDG->RLR的写 hardwareBase.c(542): error: #136: struct "" has no field "PR" IWDG->PR = prer; //LSI/32=(40Khz/(4*2^pre))*PLR hardwareBase.c(543): error: #136: struct "" has no field "RLR" IWDG->RLR = rlr; //从加载寄存器 IWDG->RLR hardwareBase.c(544): error: #136: struct "" has no field "KR" IWDG->KR = 0xAAAA; //reload hardwareBase.c: 0 warnings, 11 errors compiling main.c... .LIBincusbincusb_type.h(13): error: #5: cannot open source input file "debug.h": No such file or directory #include "debug.h" usermain.c: 0 warnings, 1 error compiling usb_desc.c... .LIBincusbincusb_type.h(13): error: #5: cannot open source input file "debug.h": No such file or directory #include "debug.h" hardwarehidusb_desc.c: 0 warnings, 1 error compiling usb_endp.c... .LIBincusbincusb_type.h(13): error: #5: cannot open source input file "debug.h": No such file or directory #include "debug.h" hardwarehidusb_endp.c: 0 warnings, 1 error compiling usb_prop.c... .LIBincusbincusb_type.h(13): error: #5: cannot open source input file "debug.h": No such file or directory #include "debug.h" hardwarehidusb_prop.c: 0 warnings, 1 error compiling usb_pwr.c... .LIBincusbincusb_type.h(13): error: #5: cannot open source input file "debug.h": No such file or directory #include "debug.h" hardwarehidusb_pwr.c: 0 warnings, 1 error compiling usb_istr.c... .LIBincusbincusb_type.h(13): error: #5: cannot open source input file "debug.h": No such file or directory #include "debug.h" hardwarehidusb_istr.c: 0 warnings, 1 error compiling hw_config.c... .LIBincusbincusb_type.h(13): error: #5: cannot open source input file "debug.h": No such file or directory #include "debug.h" hardwarehidhw_config.c: 0 warnings, 1 error compiling usb_core.c... .LIBincusbincusb_type.h(13): error: #5: cannot open source input file "debug.h": No such file or directory #include "debug.h" LIBsrcusbsrcusb_core.c: 0 warnings, 1 error compiling usb_init.c... .LIBincusbincusb_type.h(13): error: #5: cannot open source input file "debug.h": No such file or directory #include "debug.h" LIBsrcusbsrcusb_init.c: 0 warnings, 1 error compiling usb_int.c... .LIBincusbincusb_type.h(13): error: #5: cannot open source input file "debug.h": No such file or directory #include "debug.h" LIBsrcusbsrcusb_int.c: 0 warnings, 1 error compiling usb_mem.c... .LIBincusbincusb_type.h(13): error: #5: cannot open source input file "debug.h": No such file or directory #include "debug.h" LIBsrcusbsrcusb_mem.c: 0 warnings, 1 error compiling usb_regs.c... .LIBincusbincusb_type.h(13): error: #5: cannot open source input file "debug.h": No such file or directory #include "debug.h" LIBsrcusbsrcusb_regs.c: 0 warnings, 1 error ".outputstm32.axf" - 24 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:06 |
|
相关推荐
1个回答
|
|
您好,具体需要根据你用到的外设来看。若你是新开发一个项目,建议你在我们EVT例程的基础上进行开发,若你打算用之前的工程,具体需要根据你用到外设来做改动,某些外设一致,可以不用修改,可直接下载使用;有些外设存在差异,需要你对标准库进行一些移植修改,具体可参考附件FAQ手册,若改动较多,建议你直接在我们EVT工程的基础上进行一个移植,移植改动时需要注意我们寄存器的名称和ST有所不同,我看你的报错可能就是寄存器名称不同以及路径不正确导致的,关于寄存器的写法,具体可参考CH32F203应用手册的寄存器介绍。
|
|
|
|
只有小组成员才能发言,加入小组>>
522 浏览 1 评论
CH579M+RT-Thread,RTC从Sleep模式唤醒失败是什么原因?
2903 浏览 2 评论
2399 浏览 1 评论
868浏览 2评论
688浏览 1评论
riscv-none-embed-objcopy: \'PWM_Output.elf\': No such file这个咋解决,
418浏览 1评论
523浏览 1评论
请教一下,Mounriver 编译不成功:找不到库文件,怎么整
814浏览 1评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 12:11 , Processed in 0.866187 second(s), Total 45, Slave 39 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号