Getting zephyr.h file error in sample git code given in AWS IOT document

Hi,
    Im working in nrf9160dk, I'm referring aws iot document    there they given a code 6278.aws_iot_tutorial.rar there im getting this error .what i  need to do?

Executing task: nRF Connect: Build [clean]: aws_iot_tutorial/build (active)

Building aws_iot_tutorial
C:\Windows\system32\cmd.exe /d /s /c "west build -t clean --build-dir c:/Users/pmariyappan/Downloads/aws_iot_tutorial/build"

-- west build: running target clean
[2/2] Cleaning all built files...
Cleaning... 140 files.
* Terminal will be reused by tasks, press any key to close it.

* Executing task: nRF Connect: Generate config [email protected] for c:\Users\pmariyappan\Downloads\aws_iot_tutorial

Building aws_iot_tutorial
C:\Windows\system32\cmd.exe /d /s /c "west build --build-dir c:/Users/pmariyappan/Downloads/aws_iot_tutorial/build c:/Users/pmariyappan/Downloads/aws_iot_tutorial --pristine --board [email protected] --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=c:/Users/pmariyappan/Downloads/aws_iot_tutorial/prj.conf"

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/Users/pmariyappan/Downloads/aws_iot_tutorial
-- CMake version: 3.20.5
-- Found Python3: C:/ncs/toolchains/c57af46cb7/opt/bin/python.exe (found suitable version "3.8.2", minimum required is "3.8") found components: Interpreter
-- Cache files will be written to: C:/Users/pmariyappan/ncs/v2.5.1/zephyr/.cache
-- Zephyr version: 3.4.99 (C:/Users/pmariyappan/ncs/v2.5.1/zephyr)
-- Found west (found suitable version "1.1.0", minimum required is "0.14.0")
-- Board: nrf9160dk_nrf9160_ns, Revision: 1.1.0 (Active: 0.14.0)
-- Found host-tools: zephyr 0.16.1 (C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.1 (C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/c57af46cb7/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found BOARD.dts: C:/Users/pmariyappan/ncs/v2.5.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns.dts
-- Found devicetree overlay: C:/Users/pmariyappan/ncs/v2.5.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns_0_14_0.overlay
-- Generated zephyr.dts: C:/Users/pmariyappan/Downloads/aws_iot_tutorial/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/Users/pmariyappan/Downloads/aws_iot_tutorial/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/Users/pmariyappan/Downloads/aws_iot_tutorial/build/zephyr/dts.cmake
Parsing C:/Users/pmariyappan/Downloads/aws_iot_tutorial/Kconfig
Loaded configuration 'C:/Users/pmariyappan/ncs/v2.5.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns_defconfig'
Merged configuration 'c:/Users/pmariyappan/Downloads/aws_iot_tutorial/prj.conf'
Configuration saved to 'C:/Users/pmariyappan/Downloads/aws_iot_tutorial/build/zephyr/.config'
Kconfig header saved to 'C:/Users/pmariyappan/Downloads/aws_iot_tutorial/build/zephyr/include/generated/autoconf.h'
-- Found GnuLd: c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
CMake Warning at C:/Users/pmariyappan/ncs/v2.5.1/zephyr/CMakeLists.txt:1958 (message):
__ASSERT() statements are globally ENABLED


Dropping partition 'nrf_modem_lib_trace' since its size is 0.
Dropping partition 'nonsecure_storage' since it is empty.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/pmariyappan/Downloads/aws_iot_tutorial/build
-- west build: building application
[2/281] Generating include/generated/version.h
-- Zephyr version: 3.4.99 (C:/Users/pmariyappan/ncs/v2.5.1/zephyr), build: 83980fe16794
[7/281] Generating ../../tfm/CMakeCache.txt
CMake Warning at cmake/version.cmake:22 (message):
Actual TF-M version is not available from Git repository. Settled to
v1.8.0
Call Stack (most recent call first):
CMakeLists.txt:22 (include)


-- Found Git: C:/ncs/toolchains/c57af46cb7/mingw64/bin/git.exe (found version "2.37.3.windows.1")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
-- Found Python3: C:/ncs/toolchains/c57af46cb7/opt/bin/python.exe (found version "3.8.2") found components: Interpreter
CMake Deprecation Warning at C:/Users/pmariyappan/ncs/v2.5.1/zephyr/cmake/modules/FindDeprecated.cmake:121 (message):
'PYTHON_PREFER' variable is deprecated. Please use Python3_EXECUTABLE
instead.
Call Stack (most recent call first):
C:/Users/pmariyappan/ncs/v2.5.1/zephyr/cmake/modules/python.cmake:16 (find_package)
C:/Users/pmariyappan/ncs/v2.5.1/zephyr/cmake/modules/user_cache.cmake:30 (include)
C:/Users/pmariyappan/ncs/v2.5.1/zephyr/cmake/modules/extensions.cmake:5 (include)
C:/Users/pmariyappan/ncs/v2.5.1/nrf/subsys/nrf_security/tfm/CMakeLists.txt:36 (include)


-- Found Python3: C:/ncs/toolchains/c57af46cb7/opt/bin/python.exe (found suitable version "3.8.2", minimum required is "3.8") found components: Interpreter
-- Cache files will be written to: C:/Users/pmariyappan/ncs/v2.5.1/zephyr/.cache
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/pmariyappan/Downloads/aws_iot_tutorial/build/tfm
[152/156] Linking C executable bin\tfm_s.axf
Memory region Used Size Region Size %age Used
FLASH: 32056 B 32 KB 97.83%
RAM: 14736 B 32 KB 44.97%
[15/281] Performing install step for 'tfm'
-- Install configuration: "MinSizeRel"
[111/281] Building C object CMakeFiles/app.dir/src/main.c.obj
FAILED: CMakeFiles/app.dir/src/main.c.obj
C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DAPP_VERSION=v2.5.1 -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_USER_CONFIG_FILE=\"nrf-config-user.h\" -DNRF9160_XXAA -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DNRF_TRUSTZONE_NONSECURE -DTFM_PSA_API -DUSE_PARTITION_MANAGER=1 -D_ANSI_SOURCE -D_FORTIFY_SOURCE=1 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/Users/pmariyappan/ncs/v2.5.1/zephyr/include -Izephyr/include/generated -IC:/Users/pmariyappan/ncs/v2.5.1/zephyr/soc/arm/nordic_nrf/nrf91 -IC:/Users/pmariyappan/ncs/v2.5.1/zephyr/lib/libc/newlib/include -IC:/Users/pmariyappan/ncs/v2.5.1/zephyr/soc/arm/nordic_nrf/common/. -IC:/Users/pmariyappan/ncs/v2.5.1/zephyr/subsys/net/lib/sockets/. -IC:/Users/pmariyappan/ncs/v2.5.1/nrf/include -IC:/Users/pmariyappan/ncs/v2.5.1/nrf/lib/at_cmd_parser/include -Itfm/install/interface/include -IC:/Users/pmariyappan/ncs/v2.5.1/nrf/include/tfm -IC:/Users/pmariyappan/ncs/v2.5.1/nrf/tests/include -Itfm/generated/interface/include -IC:/Users/pmariyappan/ncs/v2.5.1/modules/lib/cjson -IC:/Users/pmariyappan/ncs/v2.5.1/nrf/modules/cjson/include -IC:/Users/pmariyappan/ncs/v2.5.1/modules/hal/cmsis/CMSIS/Core/Include -IC:/Users/pmariyappan/ncs/v2.5.1/zephyr/modules/cmsis/. -IC:/Users/pmariyappan/ncs/v2.5.1/modules/hal/nordic/nrfx -IC:/Users/pmariyappan/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/include -IC:/Users/pmariyappan/ncs/v2.5.1/modules/hal/nordic/nrfx/mdk -IC:/Users/pmariyappan/ncs/v2.5.1/zephyr/modules/hal_nordic/nrfx/. -IC:/Users/pmariyappan/ncs/v2.5.1/nrfxlib/nrf_modem/include -I../src -Imodules/nrf/subsys/nrf_security/src/include/generated -IC:/Users/pmariyappan/ncs/v2.5.1/nrf/subsys/nrf_security/include -IC:/Users/pmariyappan/ncs/v2.5.1/nrf/ext/oberon/psa/core/include -IC:/Users/pmariyappan/ncs/v2.5.1/nrf/ext/oberon/psa/core/library -IC:/Users/pmariyappan/ncs/v2.5.1/modules/crypto/mbedtls/include -IC:/Users/pmariyappan/ncs/v2.5.1/modules/crypto/mbedtls/library -IC:/Users/pmariyappan/ncs/v2.5.1/nrfxlib/crypto/nrf_oberon/include/mbedtls -IC:/Users/pmariyappan/ncs/v2.5.1/nrfxlib/crypto/nrf_oberon/include -fno-strict-aliasing -Os -imacros C:/Users/pmariyappan/Downloads/aws_iot_tutorial/build/zephyr/include/generated/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/Users/pmariyappan/ncs/v2.5.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/Users/pmariyappan/Downloads/aws_iot_tutorial=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Users/pmariyappan/ncs/v2.5.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Users/pmariyappan/ncs/v2.5.1=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -D_POSIX_THREADS -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c ../src/main.c
../src/main.c:7:10: fatal error: zephyr.h: No such file or directory
7 | #include <zephyr.h>
| ^~~~~~~~~~
compilation terminated.
[124/281] Building C object modules/cjson/CMakeFiles/cjson.dir/C_/Users/pmariyappan/ncs/v2.5.1/modules/lib/cjson/cJSON.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' --build 'c:\Users\pmariyappan\Downloads\aws_iot_tutorial\build'

* The terminal process terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.

Related