我正在尝试为 nRF51422 芯片编译一个“blinky”程序,并且我一直在 Cygwin 中使用 CMake 来创建 makefile。(请记住,我是新手。)
这是我的 CMakeLists:
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
project("nRF51422 Blinky" C)
add_executable(nRF51 main.c)
target_include_directories(nRF51 PUBLIC "X:/Documents/TestCompilation/RTE")
target_include_directories(nRF51 PUBLIC "X:/Programs/Keil_v5/ARM/Pack/ARM/CMSIS/4.2.0/CMSIS/Include")
target_include_directories(nRF51 PUBLIC "X:/Programs/Keil_v5/ARM/Pack/NordicSemiconductor/nRF_DeviceFamilyPack/1.1.4/Device/Include")
target_include_directories(nRF51 PUBLIC "X:/Programs/Keil_v5/ARM/Pack/NordicSemiconductor/nRF_Drivers/1.2.1/hal")
target_include_directories(nRF51 PUBLIC "X:/Programs/Keil_v5/ARM/Pack/NordicSemiconductor/nRF_Examples/7.2.0/bsp")
运行 cmake -G"Unix Makefiles" && make 时出现此错误:
~/blinky/main.c:24:23: fatal error: nrf_delay.h: No such file or directory
#include "nrf_delay.h"
^
compilation terminated
我知道 nrf_delay 位于 /nRF_Drivers/1.2.1/hal 文件夹中,那我做错了什么?