Build error using VERSION file with Zephyr

I’m trying to use the application version management included in the Zephyr toolchain. I am placing the VERSION file in the zephyr subdirectory, which contains my CMakeLists.txt file and prj.conf file.

When I perform this action, I encounter the following build error.

  • The project builds and runs successfully when the VERSION file is removed.
  • There is no other useful information in the CMakeOutput.log or the CMakeError.log.
  • This seems to be the offender: Looking for xtensa/config/core-isa.h - not found

Has anyone been successful using this method with PlatformIO and Zephyr?

Build Messages
Processing release (platform: ststm32; board: disco_f429zi; framework: zephyr)
---------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/disco_f429zi.html
PLATFORM: ST STM32 (19.2.0) > ST 32F429IDISCOVERY
HARDWARE: STM32F429ZIT6 180MHz, 256KB RAM, 2MB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, cmsis-dap, jlink)
PACKAGES: 
 - framework-zephyr @ 3.40100.0 (4.1.0) 
 - tool-cmake @ 3.21.3 
 - tool-dtc @ 1.4.7 
 - tool-gperf @ 3.0.4 
 - tool-ninja @ 1.7.1 
 - toolchain-gccarmnoneeabi @ 1.120301.0 (12.3.1)
Reading CMake configuration
-- Application: /home/smfelsher/sandboxes/oven-diagnostics/zephyr
-- CMake version: 3.21.3
-- Found Python3: /home/smfelsher/.platformio/penv/.zephyr-4.1.0/bin/python (found suitable version "3.13.5", minimum required is "3.10") found components: Interpreter 
-- Cache files will be written to: /home/smfelsher/.cache/zephyr
-- Zephyr version: 4.1.0 (/home/smfelsher/.platformio/packages/framework-zephyr), build: zephyr-v40100
-- Board: stm32f429i_disc1, qualifiers: stm32f429xx
-- Found toolchain: gnuarmemb (/home/smfelsher/.platformio/packages/toolchain-gccarmnoneeabi)
-- Found Dtc: /home/smfelsher/.platformio/packages/tool-dtc/dtc (found suitable version "1.4.7", minimum required is "1.4.6") 
-- Found BOARD.dts: /home/smfelsher/.platformio/packages/framework-zephyr/boards/st/stm32f429i_disc1/stm32f429i_disc1.dts
-- Generated zephyr.dts: /home/smfelsher/sandboxes/oven-diagnostics/.pio/build/release/zephyr/zephyr.dts
-- Generated pickled edt: /home/smfelsher/sandboxes/oven-diagnostics/.pio/build/release/zephyr/edt.pickle
-- Generated devicetree_generated.h: /home/smfelsher/sandboxes/oven-diagnostics/.pio/build/release/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /home/smfelsher/sandboxes/oven-diagnostics/.pio/build/release/zephyr/dts.cmake
Parsing /home/smfelsher/.platformio/packages/framework-zephyr/Kconfig
Loaded configuration '/home/smfelsher/.platformio/packages/framework-zephyr/boards/st/stm32f429i_disc1/stm32f429i_disc1_defconfig'
Merged configuration '/home/smfelsher/sandboxes/oven-diagnostics/zephyr/prj.conf'
Configuration saved to '/home/smfelsher/sandboxes/oven-diagnostics/.pio/build/release/zephyr/.config'
Kconfig header saved to '/home/smfelsher/sandboxes/oven-diagnostics/.pio/build/release/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /home/smfelsher/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/bin/ld.bfd (found version "2.40.0") 
-- The C compiler identification is GNU 12.3.1
-- The CXX compiler identification is GNU 12.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /home/smfelsher/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc
-- Using ccache: /bin/ccache
-- Looking for xtensa/config/core-isa.h
-- Looking for xtensa/config/core-isa.h - not found
-- Configuring incomplete, errors occurred!
See also "/home/smfelsher/sandboxes/oven-diagnostics/.pio/build/release/CMakeFiles/CMakeOutput.log".
See also "/home/smfelsher/sandboxes/oven-diagnostics/.pio/build/release/CMakeFiles/CMakeError.log".

CMake Warning at /home/smfelsher/.platformio/packages/framework-zephyr/cmake/app/boilerplate.cmake:20 (message):
  Loading of Zephyr boilerplate.cmake directly is deprecated, please use
  'find_package(Zephyr)'
Call Stack (most recent call first):
  CMakeLists.txt:2 (include)


Loading Zephyr default modules (Zephyr base).
CMake Error at /home/smfelsher/.platformio/packages/framework-zephyr/cmake/modules/version.cmake:93 (math):
  math cannot parse the expression: "(0 << 24) + (2 << 16) + (0 << 8) + ()":
  syntax error, unexpected exp_CLOSEPARENT (37).
Call Stack (most recent call first):
  /home/smfelsher/.platformio/packages/framework-zephyr/cmake/modules/zephyr_default.cmake:133 (include)
  /home/smfelsher/.platformio/packages/framework-zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /home/smfelsher/.platformio/packages/framework-zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  /home/smfelsher/.platformio/packages/framework-zephyr/cmake/app/boilerplate.cmake:25 (find_package)
  CMakeLists.txt:2 (include)


CMake Error at /home/smfelsher/.platformio/packages/framework-zephyr/cmake/modules/version.cmake:96 (math):
  math cannot parse the expression: "ERROR": syntax error, unexpected end of
  file (5).
Call Stack (most recent call first):
  /home/smfelsher/.platformio/packages/framework-zephyr/cmake/modules/zephyr_default.cmake:133 (include)
  /home/smfelsher/.platformio/packages/framework-zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /home/smfelsher/.platformio/packages/framework-zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  /home/smfelsher/.platformio/packages/framework-zephyr/cmake/app/boilerplate.cmake:25 (find_package)
  CMakeLists.txt:2 (include)