常见问题
编译报错
现象
编译时报以下错误
bsp/artinchip/include/hal/hal_cap.h:27: error: "AIC_CAP_CH_NUM" redefined [-Werror]
27 | #define AIC_CAP_CH_NUM AIC_CAPS_CH_NUM
|
bsp/artinchip/include/hal/hal_cap.h:23: note: this is the location of the previous definition
23 | #define AIC_CAP_CH_NUM AIC_HRTIMER_CH_NUM
|
1
2
3
4
5
6
7
2
3
4
5
6
7
原因分析
Capture 和 Hrtimer 共用 PWMCS 中的 CAP 子模块,故会产生冲突,两者不能同时使用。
menuconfig 的功能配置界面应将HRTimerx关闭。
Board options --->
[ ] Using HRTimer0
[ ] Using HRTimer1
[ ] Using HRTimer2
[ ] Using HRTimer3
[ ] Using HRTimer4
[ ] Using HRTimer5
[*] Using CAP0
[ ] Using CAP1
[ ] Using CAP2
[ ] Using CAP3
[ ] Using CAP4
[ ] Using CAP5
```
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14