stm32f103轉(zhuǎn)到ch32f203的時候,是不是所有的系統(tǒng)的.h文件,所有的系統(tǒng)的.c文件,都要替換掉?從代碼到目錄?
include paths也得重新定義?
hardware\Base.c(473): error:? #20: identifier "SysTick_CTRL_CLKSOURCE" is undefined
? ? ? SysTick->CTRL &= ~SysTick_CTRL_CLKSOURCE;? ? ? ? ? ?//CLK come from HCLK/8
hardware\Base.c(474): error:? #20: identifier "SysTick_CTRL_ENABLE" is undefined
? ? ? SysTick->CTRL |= SysTick_CTRL_ENABLE;
hardware\Base.c(491): error:? #20: identifier "SysTick_CTRL_CLKSOURCE" is undefined
? ? ? SysTick-> CTRL &= ~SysTick_CTRL_CLKSOURCE;
hardware\Base.c(492): error:? #20: identifier "SysTick_CTRL_ENABLE" is undefined
? ? ? SysTick->CTRL |= SysTick_CTRL_ENABLE;
hardware\Base.c(509): error:? #20: identifier "SysTick_CTRL_CLKSOURCE" is undefined
? ? ? SysTick-> CTRL &= ~SysTick_CTRL_CLKSOURCE;
hardware\Base.c(510): error:? #20: identifier "SysTick_CTRL_ENABLE" is undefined
? ? ? SysTick->CTRL |= SysTick_CTRL_ENABLE;
hardware\Base.c(540): error:? #136: struct ""? has no field "SR"
? ? ? do{} while ((IWDG->SR & 0x0003) != 0);
hardware\Base.c(541): error:? #136: struct ""? has no field "KR"
? IWDG->KR = IWDG_WriteAccess_Enable;? ? ?//0x5555;//使能對IWDG->PR和IWDG->RLR的寫 ??
hardware\Base.c(542): error:? #136: struct ""? has no field "PR"
? ? IWDG->PR = prer;? ? ? ? ? ? ? ? ? ? ? ? //LSI/32=(40Khz/(4*2^pre))*PLR? ??
hardware\Base.c(543): error:? #136: struct ""? has no field "RLR"
? ? IWDG->RLR = rlr;? ? ? ? ? ? ? ? ? ? ? ? //從加載寄存器 IWDG->RLR??
hardware\Base.c(544): error:? #136: struct ""? has no field "KR"
? IWDG->KR = 0xAAAA;? ? ? ? ? ? ? ? ? ? ? //reload? ?
hardware\Base.c: 0 warnings, 11 errors
compiling main.c...
.\LIB\inc\usbinc\usb_type.h(13): error:? #5: cannot open source input file "debug.h": No such file or directory
? #include "debug.h"
user\main.c: 0 warnings, 1 error
compiling usb_desc.c...
.\LIB\inc\usbinc\usb_type.h(13): error:? #5: cannot open source input file "debug.h": No such file or directory
? #include "debug.h"
hardware\hid\usb_desc.c: 0 warnings, 1 error
compiling usb_endp.c...
.\LIB\inc\usbinc\usb_type.h(13): error:? #5: cannot open source input file "debug.h": No such file or directory
? #include "debug.h"
hardware\hid\usb_endp.c: 0 warnings, 1 error
compiling usb_prop.c...
.\LIB\inc\usbinc\usb_type.h(13): error:? #5: cannot open source input file "debug.h": No such file or directory
? #include "debug.h"
hardware\hid\usb_prop.c: 0 warnings, 1 error
compiling usb_pwr.c...
.\LIB\inc\usbinc\usb_type.h(13): error:? #5: cannot open source input file "debug.h": No such file or directory
? #include "debug.h"
hardware\hid\usb_pwr.c: 0 warnings, 1 error
compiling usb_istr.c...
.\LIB\inc\usbinc\usb_type.h(13): error:? #5: cannot open source input file "debug.h": No such file or directory
? #include "debug.h"
hardware\hid\usb_istr.c: 0 warnings, 1 error
compiling hw_config.c...
.\LIB\inc\usbinc\usb_type.h(13): error:? #5: cannot open source input file "debug.h": No such file or directory
? #include "debug.h"
hardware\hid\hw_config.c: 0 warnings, 1 error
compiling usb_core.c...
.\LIB\inc\usbinc\usb_type.h(13): error:? #5: cannot open source input file "debug.h": No such file or directory
? #include "debug.h"
LIB\src\usbsrc\usb_core.c: 0 warnings, 1 error
compiling usb_init.c...
.\LIB\inc\usbinc\usb_type.h(13): error:? #5: cannot open source input file "debug.h": No such file or directory
? #include "debug.h"
LIB\src\usbsrc\usb_init.c: 0 warnings, 1 error
compiling usb_int.c...
.\LIB\inc\usbinc\usb_type.h(13): error:? #5: cannot open source input file "debug.h": No such file or directory
? #include "debug.h"
LIB\src\usbsrc\usb_int.c: 0 warnings, 1 error
compiling usb_mem.c...
.\LIB\inc\usbinc\usb_type.h(13): error:? #5: cannot open source input file "debug.h": No such file or directory
? #include "debug.h"
LIB\src\usbsrc\usb_mem.c: 0 warnings, 1 error
compiling usb_regs.c...
.\LIB\inc\usbinc\usb_type.h(13): error:? #5: cannot open source input file "debug.h": No such file or directory
? #include "debug.h"
LIB\src\usbsrc\usb_regs.c: 0 warnings, 1 error
".\output\stm32.axf" - 24 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed:? 00:00:06
您好,具體需要根據(jù)你用到的外設(shè)來看。若你是新開發(fā)一個項目,建議你在我們EVT例程的基礎(chǔ)上進行開發(fā),若你打算用之前的工程,具體需要根據(jù)你用到外設(shè)來做改動,某些外設(shè)一致,可以不用修改,可直接下載使用;有些外設(shè)存在差異,需要你對標準庫進行一些移植修改,具體可參考附件FAQ手冊,若改動較多,建議你直接在我們EVT工程的基礎(chǔ)上進行一個移植,移植改動時需要注意我們寄存器的名稱和ST有所不同,我看你的報錯可能就是寄存器名稱不同以及路徑不正確導(dǎo)致的,關(guān)于寄存器的寫法,具體可參考CH32F203應(yīng)用手冊的寄存器介紹。后面若有問題,可通過郵箱和我溝通(lzs@wch.cn)
CH32F203 應(yīng)用手冊:http://www.findthetime.net/downloads/CH32FV2x_V3xRM_PDF.html?
CH32F203 EVT:http://www.findthetime.net/downloads/CH32F20xEVT_ZIP.html?