<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>NCS 2.5.0: CMake Error ... version.cmake:74 (math): math cannot parse the expression</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105497/ncs-2-5-0-cmake-error-version-cmake-74-math-math-cannot-parse-the-expression</link><description>After updating the NCS from 2.4.2 to 2.5.0 my project cannot be created. 
 The following error occurs: 
 
 -- CMake version: 3.20.5 -- Found Python3: D:/Nordic/toolchains/c57af46cb7/opt/bin/python.exe (found suitable version &amp;quot;3.8.2&amp;quot;, minimum required</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Mar 2024 09:35:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105497/ncs-2-5-0-cmake-error-version-cmake-74-math-math-cannot-parse-the-expression" /><item><title>RE: NCS 2.5.0: CMake Error ... version.cmake:74 (math): math cannot parse the expression</title><link>https://devzone.nordicsemi.com/thread/475581?ContentTypeID=1</link><pubDate>Mon, 25 Mar 2024 09:35:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03826e2b-3412-4ff9-bba6-37eac5c0f665</guid><dc:creator>frax84</dc:creator><description>&lt;p&gt;Unfortunately, this does not apply to my case &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f61e.svg" title="Disappointed"&gt;&amp;#x1f61e;&lt;/span&gt;. I opened a &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/109058/cmake-error-math-cannot-parse-the-expression-with-ncs-2-4-2"&gt;specific ticket &lt;/a&gt;for this so i&amp;#39;m giving details and tests there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.5.0: CMake Error ... version.cmake:74 (math): math cannot parse the expression</title><link>https://devzone.nordicsemi.com/thread/473814?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2024 09:53:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af248288-4df3-4a13-86d2-bf6520309dfb</guid><dc:creator>frax84</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/jonathanll"&gt;JONATHAN LL&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i would like to add these spaces, but i&amp;#39;m note sure to have detected the file where i need to do it. Can you provide me a specific path to check? All the VERSION files i found already have spaces before and after &amp;quot;=&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.5.0: CMake Error ... version.cmake:74 (math): math cannot parse the expression</title><link>https://devzone.nordicsemi.com/thread/473509?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2024 17:04:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b92578bf-2a4c-48c4-9cc8-8ffd2b56246d</guid><dc:creator>Voxorin</dc:creator><description>&lt;p&gt;I was able to fix the issue by changing how/when my &lt;span style="background-color:#c4c4c4;"&gt;mcuboot.conf&lt;/span&gt; was included.&lt;/p&gt;
&lt;p&gt;In previous NCS versions I appended my &lt;span style="background-color:#c4c4c4;"&gt;mcuboot.conf&lt;/span&gt; in &lt;span style="background-color:#c4c4c4;"&gt;app/CMakeLists.txt&lt;/span&gt;:&lt;span style="background-color:#c4c4c4;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span style="background-color:#c4c4c4;"&gt;...&lt;br /&gt;list(APPEND mcuboot_OVERLAY_CONFIG &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/mcuboot.conf&amp;quot;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color:#c4c4c4;"&gt; SET(mcuboot_CONFIG_BOOT_SIGNATURE_KEY_FILE &amp;quot;\&amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/keys/private/boot-ecdsa-p256.pem\&amp;quot;&amp;quot;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blob-code-inner blob-code-marker js-code-nav-pass " style="background-color:#c4c4c4;" data-code-marker=" "&gt;&lt;span class="pl-c1"&gt;find_package&lt;/span&gt;(Zephyr &lt;span class="pl-k"&gt;REQUIRED&lt;/span&gt; &lt;span class="pl-k"&gt;HINTS&lt;/span&gt; &lt;span class="pl-smi"&gt;$ENV{ZEPHYR_BASE}&lt;/span&gt;)&lt;br /&gt;...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;It think appending the conf file before finding the Zephyr package was causing the issue. I changed my &lt;span style="background-color:#c4c4c4;"&gt;app/CMakeLists.txt&lt;/span&gt; to this:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span style="background-color:#c4c4c4;"&gt;...&lt;br /&gt;SET(mcuboot_CONFIG_BOOT_SIGNATURE_KEY_FILE &amp;quot;\&amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/keys/private/boot-ecdsa-p256.pem\&amp;quot;&amp;quot;)&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#c4c4c4;"&gt;SET(mcuboot_CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256 &amp;quot;y&amp;quot;)&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span style="background-color:#c4c4c4;"&gt;find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})&lt;br /&gt;...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;and I moved my &lt;span style="background-color:#c4c4c4;"&gt;mcuboot.conf&lt;/span&gt; file to &lt;span style="background-color:#c4c4c4;"&gt;app/child_image/mcuboot.conf&lt;/span&gt; so West knows it belongs to the MCUBoot child image.&lt;br /&gt;&lt;br /&gt;Now MCUBoot builds without issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.5.0: CMake Error ... version.cmake:74 (math): math cannot parse the expression</title><link>https://devzone.nordicsemi.com/thread/473491?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2024 15:25:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f32509a-dd55-4a79-8a10-ac1187d9a3c0</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;did you add the spaces like Marko W did ?&lt;br /&gt;&lt;br /&gt;I am not able to replicate the issue as you describe here in this post.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.5.0: CMake Error ... version.cmake:74 (math): math cannot parse the expression</title><link>https://devzone.nordicsemi.com/thread/471922?ContentTypeID=1</link><pubDate>Sun, 03 Mar 2024 18:45:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2175d35f-b2fe-477f-948f-80e89cd536e6</guid><dc:creator>frax84</dc:creator><description>&lt;p&gt;Hi Jonathan,&lt;/p&gt;
&lt;p&gt;any news about this issue? I read the posts following this one, but i am not able to come out of this error, even with the last 2.5.2 (2.4.2 working).&lt;/p&gt;
&lt;p&gt;I tried to fix this error adding the VERSION file (filled as docs says) to the same folder of prj.conf together with&amp;nbsp;&lt;span&gt;#include&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;app_version.h&amp;gt; but absolutely nothing changed.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.5.0: CMake Error ... version.cmake:74 (math): math cannot parse the expression</title><link>https://devzone.nordicsemi.com/thread/455551?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2023 14:05:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4436362-c416-4aa7-919a-b4cb89d6de02</guid><dc:creator>Marko W</dc:creator><description>&lt;p&gt;&lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;I have now found the cause.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;Contrary to the example in the documentation &lt;a href="https://docs.zephyrproject.org/latest/build/version/index.html" rel="noopener noreferrer" target="_blank"&gt;Application version management&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;I had no spaces before and after the &amp;quot;=&amp;quot;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;If I insert spaces, then I can compile even if the VERSION file exists.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="HwtZe" lang="en"&gt;&lt;span class="jCAhz ChMk0b"&gt;&lt;span class="ryNqvb"&gt;Can anyone confirm this...?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.5.0: CMake Error ... version.cmake:74 (math): math cannot parse the expression</title><link>https://devzone.nordicsemi.com/thread/455549?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2023 14:03:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee18e92c-f3bd-444d-8b1a-f6542c1bf669</guid><dc:creator>frax84</dc:creator><description>&lt;p&gt;If you track the error to the file (version.cmake) you will notice that the error happens because the compiler can&amp;#39;t find the definitions you&amp;#39;re speaking about. I think that is the connection if it is what are you&amp;#39;re trying to understand&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.5.0: CMake Error ... version.cmake:74 (math): math cannot parse the expression</title><link>https://devzone.nordicsemi.com/thread/455541?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2023 13:46:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:657879b9-ff56-45c1-9c39-584d09258662</guid><dc:creator>Marko W</dc:creator><description>&lt;p&gt;Sorry for the late reply...&lt;/p&gt;
&lt;p&gt;I have now tested several projects and this error only occurs in one project. Two other projects can be updated from 2.4.0 and 2.4.2 to 2.5.0. There are more warnings here, but the build process is running through (firmware not yet tested).&lt;/p&gt;
&lt;p&gt;When comparing the projects, I noticed that I have a &amp;quot;VERSION&amp;quot; file in the project folder. I had already prepared this based on the documentation (&lt;a href="https://docs.zephyrproject.org/latest/build/version/index.html" rel="noopener noreferrer" target="_blank"&gt;Application version management&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;~~~&lt;br /&gt;VERSION_MAJOR=0&lt;br /&gt;VERSION_MINOR=5&lt;br /&gt;PATCH LEVEL=0&lt;br /&gt;VERSION_TWEAK=0&lt;br /&gt;EXTRAVERSION=unstable&lt;br /&gt;~~~&lt;/p&gt;
&lt;p&gt;If I remove this file I can successfully run a build with 2.5.0 (firmware not tested yet).&lt;/p&gt;
&lt;p&gt;However, I can&amp;#39;t really understand the connection to the error message...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.5.0: CMake Error ... version.cmake:74 (math): math cannot parse the expression</title><link>https://devzone.nordicsemi.com/thread/455503?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2023 11:57:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffbdb94b-0f79-4ec3-a83c-30328091b4c3</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Thanks Frax, will test and report interlay.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.5.0: CMake Error ... version.cmake:74 (math): math cannot parse the expression</title><link>https://devzone.nordicsemi.com/thread/455316?ContentTypeID=1</link><pubDate>Mon, 13 Nov 2023 13:59:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11398aa2-2a33-4ebe-a5cc-e49cce3a6897</guid><dc:creator>frax84</dc:creator><description>&lt;p&gt;Hi Jonathan,&lt;/p&gt;
&lt;p&gt;i&amp;#39;m not able to recall all the samples tested because a lot of experiments, but i spent a bit of time to&amp;nbsp;prepare something you can test on:&lt;/p&gt;
&lt;p&gt;Here the samples/configurations i tested:&lt;/p&gt;
&lt;p&gt;- &amp;quot;hello world&amp;quot; for both nrf5340dk_cpuapp and&amp;nbsp;&lt;span&gt;nrf5340dk_cpuapp_ns target --&amp;gt; ERROR on version.cmake (the same Marko W made the post for)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- &amp;quot;peripheral_hr&amp;quot;&amp;nbsp;for both nrf5340dk_cpuapp and&amp;nbsp;nrf5340dk_cpuapp_ns target --&amp;gt; WORKING&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Toolchain: 2.5.0&lt;/p&gt;
&lt;p&gt;SDK: 2.5.0&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I hope this helps,&lt;/p&gt;
&lt;p&gt;Frax&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.5.0: CMake Error ... version.cmake:74 (math): math cannot parse the expression</title><link>https://devzone.nordicsemi.com/thread/455192?ContentTypeID=1</link><pubDate>Sat, 11 Nov 2023 14:43:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8287292e-e779-497e-8e1c-dadc1adfcc67</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Can you give me a list of what samples you have tested.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.5.0: CMake Error ... version.cmake:74 (math): math cannot parse the expression</title><link>https://devzone.nordicsemi.com/thread/455163?ContentTypeID=1</link><pubDate>Fri, 10 Nov 2023 16:22:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cad823b9-f72d-4e16-ade7-5868dcccdd64</guid><dc:creator>frax84</dc:creator><description>&lt;p&gt;I have the very same error for my project. The code compile and works correctly with SDK 2.4.2 and throw this error in 2.5.0. I get the same error for all the 3 different sample projects i tried compiling for both my custom board (nrf5340 based) and nrf5340DK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.5.0: CMake Error ... version.cmake:74 (math): math cannot parse the expression</title><link>https://devzone.nordicsemi.com/thread/454728?ContentTypeID=1</link><pubDate>Wed, 08 Nov 2023 14:51:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9827ca11-a184-4e5a-817e-43a0c8f15b8a</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Does this happen with only one application or are you able to reproduce the error on other samples?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>