【RISC-V MCU CH32V103测评】- 4:EXTI 开启查错之旅
[复制链接]
本帖最后由 MianQi 于 2021-2-10 10:39 编辑
测试了一下这个文档的内容:《CH32V103应用教程——EXTI》,有两处报错:
../EXTI/main.c:3:30: error: 'NVIC_PriorityGroup_2' undeclared (first use in this function)
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
../EXTI/main.c:7:31: error: 'SystemCoreClock' undeclared (first use in this function)
printf("SystemClk:%d\r\n",SystemCoreClock);
直接从EXAM中将文件粘贴过来,错误更多:
08:43:12 **** Build of configuration obj for project test_EXTI ****
make -j4 all
l:/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./EXTI/ch32v10x_it.o: in function `NMI_Handler':
L:\MounRiver_Studio\workspace\test_EXTI\obj/../EXTI/ch32v10x_it.c:22: multiple definition of `NMI_Handler'; ./User/ch32v10x_it.o:L:\MounRiver_Studio\workspace\test_EXTI\obj/../User/ch32v10x_it.c:21: first defined here
l:/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./EXTI/ch32v10x_it.o: in function `HardFault_Handler':
L:\MounRiver_Studio\workspace\test_EXTI\obj/../EXTI/ch32v10x_it.c:34: multiple definition of `HardFault_Handler'; ./User/ch32v10x_it.o:L:\MounRiver_Studio\workspace\test_EXTI\obj/../User/ch32v10x_it.c:33: first defined here
l:/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./EXTI/main.o: in function `main':
L:\MounRiver_Studio\workspace\test_EXTI\obj/../EXTI/main.c:57: multiple definition of `main'; ./User/main.o:L:\MounRiver_Studio\workspace\test_EXTI\obj/../User/main.c:34: first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:56: test_EXTI.elf] Error 1
08:43:16 Build Failed. 7 errors, 0 warnings. (took 4s.95ms)
|