I have a repository that is intended to be used by other repositories via ZEPHYR_EXTRA_MODULES. This seems to be working fine. However, now I'm trying to add some code to my module that uses MBED TLS. If I put that code into my application then it compiles fine. If I move the code into the module then the code does not find the MBED TLS include files and it does not compile. I have a Kconfig in the module that selects MBEDTLS. Anyone know what I'm missing to get the proper include path when the source code in the module is compiled that tries to include the MBED TLS includes?
My repository is [email protected]:denisbohm/firefly-zephyr.git. In applications/boot is a test application that fails to build:
% west build --pristine
WARNING: This looks like a fresh build and BOARD is unknown; so it probably won't work. To fix, use --board=<your-board>.
Note: to silence the above message, run 'west config build.board_warn false'
-- west build: generating a build system
Including boilerplate (Zephyr base): /opt/nordic/ncs/v1.7.1/zephyr/cmake/app/boilerplate.cmake
CMake Deprecation Warning at /opt/nordic/ncs/v1.7.1/zephyr/cmake/app/boilerplate.cmake:37 (cmake_policy):
The OLD behavior for policy CMP0079 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
/opt/nordic/ncs/v1.7.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
/opt/nordic/ncs/v1.7.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:9 (find_package)
-- Application: /Users/denis/sandbox/denisbohm/firefly-zephyr/applications/boot
-- Using NCS Toolchain 1.7.1 for building. (/opt/nordic/ncs/v1.7.1/toolchain/cmake)
-- Zephyr version: 2.6.99 (/opt/nordic/ncs/v1.7.1/zephyr), build: v2.6.99-ncs1-1
-- Found Python3: /opt/nordic/ncs/v1.7.1/toolchain/bin/python3 (found suitable exact version "3.9.6") found components: Interpreter
-- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpuapp
-- Cache files will be written to: /Users/denis/Library/Caches/zephyr
-- Found dtc: /opt/nordic/ncs/v1.7.1/toolchain/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/opt/nordic/ncs/v1.7.1/toolchain)
-- Found BOARD.dts: /opt/nordic/ncs/v1.7.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
nrf5340dk_nrf5340_cpuapp.dts.pre.tmp:15.39-20.5: Warning (interrupt_provider): /soc/interrupt-controller@e000e100: Missing #address-cells in interrupt provider
also defined at nrf5340dk_nrf5340_cpuapp.dts.pre.tmp:467.7-469.3
-- Generated zephyr.dts: /Users/denis/sandbox/denisbohm/firefly-zephyr/applications/boot/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/denis/sandbox/denisbohm/firefly-zephyr/applications/boot/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /Users/denis/sandbox/denisbohm/firefly-zephyr/applications/boot/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /Users/denis/sandbox/denisbohm/firefly-zephyr/applications/boot/build/zephyr/dts.cmake
Parsing /opt/nordic/ncs/v1.7.1/zephyr/Kconfig
Loaded configuration '/opt/nordic/ncs/v1.7.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig'
Merged configuration '/Users/denis/sandbox/denisbohm/firefly-zephyr/applications/boot/prj.conf'
Configuration saved to '/Users/denis/sandbox/denisbohm/firefly-zephyr/applications/boot/build/zephyr/.config'
Kconfig header saved to '/Users/denis/sandbox/denisbohm/firefly-zephyr/applications/boot/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /opt/nordic/ncs/v1.7.1/toolchain/bin/arm-none-eabi-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/denis/sandbox/denisbohm/firefly-zephyr/applications/boot/build
-- west build: building application
[1/297] Preparing syscall dependency handling
[18/297] Building C object zephyr/CMakeFiles/zephyr.dir/Users/denis/sandbox/denisbohm/firefly-zephyr/subsys/boot/src/fd_boot_zephyr.c.obj
FAILED: zephyr/CMakeFiles/zephyr.dir/Users/denis/sandbox/denisbohm/firefly-zephyr/subsys/boot/src/fd_boot_zephyr.c.obj
/opt/nordic/ncs/v1.7.1/toolchain/bin/arm-none-eabi-gcc -DBUILD_VERSION=v2.6.99-ncs1-1 -DKERNEL -DNRF5340_XXAA_APPLICATION -DUSE_PARTITION_MANAGER=0 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/opt/nordic/ncs/v1.7.1/zephyr/kernel/include -I/opt/nordic/ncs/v1.7.1/zephyr/arch/arm/include -I/opt/nordic/ncs/v1.7.1/zephyr/include -I/Users/denis/sandbox/denisbohm/firefly-zephyr/applications/boot/build/zephyr/include/generated -I/opt/nordic/ncs/v1.7.1/zephyr/soc/arm/nordic_nrf/nrf53 -I/opt/nordic/ncs/v1.7.1/zephyr/lib/libc/newlib/include -I/opt/nordic/ncs/v1.7.1/nrf/include -I/opt/nordic/ncs/v1.7.1/modules/hal/cmsis/CMSIS/Core/Include -I/opt/nordic/ncs/v1.7.1/modules/hal/nordic/nrfx -I/opt/nordic/ncs/v1.7.1/modules/hal/nordic/nrfx/drivers/include -I/opt/nordic/ncs/v1.7.1/modules/hal/nordic/nrfx/mdk -I/opt/nordic/ncs/v1.7.1/zephyr/modules/hal_nordic/nrfx/. -I/Users/denis/sandbox/denisbohm/firefly-zephyr/subsys/base/include -I/Users/denis/sandbox/denisbohm/firefly-zephyr/subsys/boot/include -I/Users/denis/sandbox/denisbohm/firefly-zephyr/subsys/graphics/include -I/Users/denis/sandbox/denisbohm/firefly-zephyr/subsys/storage/include -I/Users/denis/sandbox/denisbohm/firefly-zephyr/subsys/usb/include -I/Users/denis/sandbox/denisbohm/firefly-zephyr/subsys/ux/include -isystem /opt/nordic/ncs/v1.7.1/nrfxlib/crypto/nrf_cc312_platform/include -O0 -imacros /Users/denis/sandbox/denisbohm/firefly-zephyr/applications/boot/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -imacros /opt/nordic/ncs/v1.7.1/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/Users/denis/sandbox/denisbohm/firefly-zephyr/applications/boot=CMAKE_SOURCE_DIR -fmacro-prefix-map=/opt/nordic/ncs/v1.7.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/opt/nordic/ncs/v1.7.1=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT zephyr/CMakeFiles/zephyr.dir/Users/denis/sandbox/denisbohm/firefly-zephyr/subsys/boot/src/fd_boot_zephyr.c.obj -MF zephyr/CMakeFiles/zephyr.dir/Users/denis/sandbox/denisbohm/firefly-zephyr/subsys/boot/src/fd_boot_zephyr.c.obj.d -o zephyr/CMakeFiles/zephyr.dir/Users/denis/sandbox/denisbohm/firefly-zephyr/subsys/boot/src/fd_boot_zephyr.c.obj -c /Users/denis/sandbox/denisbohm/firefly-zephyr/subsys/boot/src/fd_boot_zephyr.c
/Users/denis/sandbox/denisbohm/firefly-zephyr/subsys/boot/src/fd_boot_zephyr.c:3:10: fatal error: mbedtls/platform.h: No such file or directory
3 | #include <mbedtls/platform.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
[29/297] Building C object zephyr/CMakeFiles/zephyr.dir/Users/denis/sandbox/denisbohm/firefly-zephyr/subsys/base/src/fd_uart_nrf5.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /opt/homebrew/bin/cmake --build /Users/denis/sandbox/denisbohm/firefly-zephyr/applications/boot/build