<?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>Build failing with sysbuild enabled (math cannot parse the expression: &amp;quot; * 1024&amp;quot;)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123968/build-failing-with-sysbuild-enabled-math-cannot-parse-the-expression-1024</link><description>Hello, 
 I&amp;#39;m trying to add MCUBoot with sysbuild to my application (nRF Connect SDK 2.9.1). I have added sysbuild.conf (in the project&amp;#39;s root directory), with single line to enable mcuboot: 
 
 SB_CONFIG_BOOTLOADER_MCUBOOT =y 
 
 but I have noticed, that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 Sep 2025 06:42:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123968/build-failing-with-sysbuild-enabled-math-cannot-parse-the-expression-1024" /><item><title>RE: Build failing with sysbuild enabled (math cannot parse the expression: " * 1024")</title><link>https://devzone.nordicsemi.com/thread/550089?ContentTypeID=1</link><pubDate>Tue, 30 Sep 2025 06:42:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93125e19-db09-467f-9fe7-91eb9095ddaf</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for getting back to you a bit late on this. I had to finish some other tasks last week and only worked limited hours, which caused the delay in responding. Have you been able to make any progress on this issue?&lt;/p&gt;
[quote user="Jacob W"]CONFIG_FLASH_SIZE in the partition or&amp;nbsp;&lt;span&gt;${${image_name}_CONFIG_FLASH_SIZE}, it seems to be empty. When I&amp;#39;m building with --no-sysbuild parameter, in the build/zephyr/.config file there is a parameter CONFIG_FLASH_SIZE=1024. I&amp;#39;m not changing this value anywhere in my config files as it should not be changed in the project .conf file, right? Where is it taken from?&lt;/span&gt;[/quote]
&lt;p&gt;It’s not recommended to modify this config value. It’s not taken from prj.conf; instead, it is derived from the devicetree. The property zephyr,flash in the /chosen node refers to the flash device node, and its reg property is used to set the defaults for both CONFIG_FLASH_BASE_ADDRESS and &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#CONFIG_FLASH_SIZE"&gt;CONFIG_FLASH_SIZE &lt;/a&gt;Kconfig options. &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/build/dts/api/api.html#zephyr-specific_chosen_nodes"&gt;See the Zephyr-specific /chosen node&lt;/a&gt;. Do you have any overlay which touches the flash? Check the overlays for both the application and MCUboot.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build failing with sysbuild enabled (math cannot parse the expression: " * 1024")</title><link>https://devzone.nordicsemi.com/thread/549214?ContentTypeID=1</link><pubDate>Thu, 18 Sep 2025 15:57:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69791f52-52a3-4322-b180-fbff4d28ae87</guid><dc:creator>Jacob W</dc:creator><description>&lt;p&gt;Hi, just an additional note to clear that out - in case of failed build (with partition_manager error) the .config file in the build/zephyr directory is not created at all, therefore to check it&amp;#39;s value I had to print it in the partition_manager CMake script.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Jacob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build failing with sysbuild enabled (math cannot parse the expression: " * 1024")</title><link>https://devzone.nordicsemi.com/thread/549182?ContentTypeID=1</link><pubDate>Thu, 18 Sep 2025 12:58:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ac54e38-4474-4f6f-8201-9397a83c0b9a</guid><dc:creator>Jacob W</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;I have checked this and this could be (probably indirect) reason for this issue, when I&amp;#39;m adding the log to print the CONFIG_FLASH_SIZE in the partition or&amp;nbsp;&lt;span&gt;${${image_name}_CONFIG_FLASH_SIZE}, it seems to be empty. When I&amp;#39;m building with --no-sysbuild parameter, in the build/zephyr/.config file there is a parameter CONFIG_FLASH_SIZE=1024. I&amp;#39;m not changing this value anywhere in my config files as it should not be changed in the project .conf file, right? Where is it taken from? &lt;br /&gt;&lt;br /&gt;I&amp;#39;m using the nRF9151 DK board, but I could not find this config parameter anywhere in the config files for this board in the SDK files (there is FLASH_LOAD_SIZE, but not FLASH_SIZE)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build failing with sysbuild enabled (math cannot parse the expression: " * 1024")</title><link>https://devzone.nordicsemi.com/thread/549159?ContentTypeID=1</link><pubDate>Thu, 18 Sep 2025 11:25:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33473b02-5f4a-44e4-8b08-da9c7c2d84b5</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I was &lt;a href="https://cmake.org/cmake/help/latest/command/math.html"&gt;checking the &lt;code&gt;math()&lt;/code&gt; function &lt;/a&gt;inside the CMake documentation to get a clearer picture. Could this be due to the value assigned to &lt;code&gt;CONFIG_FLASH_SIZE&lt;/code&gt;?&lt;br /&gt; Could you check the build directory to see what value is being assigned?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt; Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build failing with sysbuild enabled (math cannot parse the expression: " * 1024")</title><link>https://devzone.nordicsemi.com/thread/548777?ContentTypeID=1</link><pubDate>Mon, 15 Sep 2025 14:58:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdd723b8-ebbd-40c5-821e-385d251fd895</guid><dc:creator>Jacob W</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I&amp;#39;m sorry for a late reply. I was trying both ways, also without defining static partition file (and expecting to have one generated in the build directory), but it&amp;#39;s failing on the same step. Based on reading the logs it seems to be failing on this line from the partition_manager.cmake in this line:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;pre class="ui-code" data-mode="text"&gt;math(EXPR flash_size &amp;quot;${${image_name}_CONFIG_FLASH_SIZE} * 1024&amp;quot; OUTPUT_FORMAT HEXADECIMAL)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;(the&amp;nbsp;error: &amp;#39;math cannot parse the expression: &amp;quot; * 1024&amp;quot;: syntax error, unexpected&amp;#39;). So it seems as if it cannot evaluate variable: &amp;#39;${${image_name}_CONFIG_FLASH_SIZE}&amp;#39;, but I don&amp;#39;t know why.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;I have noticed that in case of Blinky sample (which I am able to build using sysbuild) the build starts with running the CMake for mcuboot, and later with CMake for the project (Blinky). In my case (in which I&amp;#39;m getting the partition_manager issue) it starts at once with running the CMake for the project. I&amp;#39;m pointing this out since I&amp;#39;m not sure if this might not be something that makes the difference.&lt;br /&gt;&lt;br /&gt;Could you advise what&amp;nbsp;could&amp;nbsp;be the possible reason for this issue?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Jacob&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build failing with sysbuild enabled (math cannot parse the expression: " * 1024")</title><link>https://devzone.nordicsemi.com/thread/547425?ContentTypeID=1</link><pubDate>Tue, 02 Sep 2025 09:12:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ec29ac8-71d4-4a57-a656-c8134ca982fa</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I’m not sure what the cause of the issue you’re seeing is. The files you’ve shared look fine to me, and I don’t think they would be the source of the problem. What I would recommend is to try building the application without defining a pm_static file. This will generate a dynamic partition file inside the build folder. You can use that as a reference and, based on it, create a static partition file to see if that resolves the issue.&lt;/p&gt;
&lt;p&gt;If you can share the generated partition file, I would be happy to take a look.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt; Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build failing with sysbuild enabled (math cannot parse the expression: " * 1024")</title><link>https://devzone.nordicsemi.com/thread/547053?ContentTypeID=1</link><pubDate>Thu, 28 Aug 2025 09:49:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c49b4ae-d6c0-4d49-8110-6713968235bc</guid><dc:creator>Jacob W</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;thank you for your reply. I&amp;#39;m building for nRF9151 DK. In the attachment I have added the config files and overlay. Please please let me know if you would need anything else.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I have checked the Academy course, but based on that it seemed that the steps I have made should be enough (at least to compile), but in case of my project for some reason enabling the sysbuild triggers this problem with partition manager&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jacob&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/07350.prj.conf"&gt;devzone.nordicsemi.com/.../07350.prj.conf&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1411.app.overlay"&gt;devzone.nordicsemi.com/.../1411.app.overlay&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7367.sysbuild.conf"&gt;devzone.nordicsemi.com/.../7367.sysbuild.conf&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build failing with sysbuild enabled (math cannot parse the expression: " * 1024")</title><link>https://devzone.nordicsemi.com/thread/547042?ContentTypeID=1</link><pubDate>Thu, 28 Aug 2025 08:55:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c2028cc-0151-4d86-b0c4-7555582f7bc2</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Could you share some more information, such as the build configuration you are using? Are you building for a DK or for your custom board? I don’t think this issue is related to MCUboot.&lt;/p&gt;
&lt;p&gt;You can also take a &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-9-bootloaders-and-dfu-fota/"&gt;look at this Academy course&lt;/a&gt;, which shows how to add DFU support to the application.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt; Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>