请问在CH582的蓝牙初始化过程中,打开HAL_LED和或HAL_KEY会出现编译错误

首选原始情况可以编译成功:

image.png

接着打开宏定义:

image.png

最后编译出错:

image.png

22:40:57 **** 构建 of configuration obj for project Peripheral ****

make -j16 all 

Memory region         Used Size  Region Size  %age Used

c:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./HAL/MCU.o: in function `HAL_ProcessEvent':

           FLASH:      151032 B       448 KB     32.92%

D:/MineProj/MCUProj/CH/BLE/HAL/MCU.c:209: undefined reference to `HalLedUpdate'

             RAM:       17540 B        32 KB     53.53%

c:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:/MineProj/MCUProj/CH/BLE/HAL/MCU.c:212: undefined reference to `HAL_KeyPoll'

c:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./HAL/MCU.o: in function `HAL_Init':

D:/MineProj/MCUProj/CH/BLE/HAL/MCU.c:225: undefined reference to `HAL_LedInit'

c:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: D:/MineProj/MCUProj/CH/BLE/HAL/MCU.c:226: undefined reference to `HAL_KeyInit'

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:57: Peripheral.elf] Error 1


22:40:58 Build Failed. 7 errors, 0 warnings. (took 1s.55ms)


你好,需要将工程的文件包含一下,鼠标放在文件上面include。

image.png


只有登录才能回复,可以选择微信账号登录