我正在努力编写一个“眨眼”的' nRF51422芯片的程序,我一直在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"时出现此错误&安培;&安培;使:
~/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文件夹中,所以我做错了什么?
答案 0 :(得分:2)
如上所述:
make -j1 VERBOSE=1
构建项目-j1
构建一个线程,旨在将编译器输出和错误消息保持在一起