<?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 fail using MCUBOOT and SPI on ncs 1.7.1</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82757/build-fail-using-mcuboot-and-spi-on-ncs-1-7-1</link><description>Hi! 
 I&amp;#39;m working with the nrf52840 custom board, porting working project (tested on the ncs 1.4.1) to the ncs 1.7.1. As we are using several board variations for the same project, each board has a separate board_name_defconfig file, containing configs</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Dec 2021 13:20:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82757/build-fail-using-mcuboot-and-spi-on-ncs-1-7-1" /><item><title>RE: Build fail using MCUBOOT and SPI on ncs 1.7.1</title><link>https://devzone.nordicsemi.com/thread/343929?ContentTypeID=1</link><pubDate>Thu, 16 Dec 2021 13:20:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e661321-6a8b-4236-a28f-94a1ce78000d</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Eva,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="eva_c"]Unselecting spi and i2c configs in mcuboot.conf solves the problem, thank you![/quote]
&lt;p&gt;I&amp;#39;m glad to hear!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="eva_c"]If I understand correctly, configs in the prj.conf affect only application, while configs in defconfig files are applied to both application and MCUBoot. Due to nature of this project with several board configurations, we have many configs placed in defconfig files. Is it possible to have defconfig file that does not affects MCUBoot?[/quote]
&lt;p&gt;You can add a conditional on &amp;quot;depends on !MCUBOOT&amp;quot; for the specific sensor, and set this up in your board in a similar fashion as&amp;nbsp;done in the nrf9160dk:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.0-ncs1/boards/arm/nrf9160dk_nrf9160/Kconfig.defconfig#L58-L59"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.0-ncs1/boards/arm/nrf9160dk_nrf9160/Kconfig.defconfig#L58-L59&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build fail using MCUBOOT and SPI on ncs 1.7.1</title><link>https://devzone.nordicsemi.com/thread/343562?ContentTypeID=1</link><pubDate>Wed, 15 Dec 2021 08:57:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:632bf8c4-fd49-460a-baf3-43fae0476309</guid><dc:creator>eva_c</dc:creator><description>&lt;p&gt;Unselecting spi and i2c configs in mcuboot.conf solves the problem, thank you!&lt;/p&gt;
&lt;p&gt;If I understand correctly, configs in the prj.conf affect only application, while configs in defconfig files are applied to both application and MCUBoot. Due to nature of this project with several board configurations, we have many configs placed in defconfig files. Is it possible to have defconfig file that does not affects MCUBoot?&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Eva&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build fail using MCUBOOT and SPI on ncs 1.7.1</title><link>https://devzone.nordicsemi.com/thread/343553?ContentTypeID=1</link><pubDate>Wed, 15 Dec 2021 08:14:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90d54a38-ccff-4b91-bed2-1fbb2c1f2867</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you need i2c in mcuboot? ie. should mcuboot be able to interface over i2c/spi?&lt;/p&gt;
&lt;p&gt;If not, I would recommend that you n-select the peripherals in mcuboot.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This can be done by creating the folder, in your application:&lt;/p&gt;
&lt;p&gt;child_image/mcuboot.conf&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And place your override configuration in the above file.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build fail using MCUBOOT and SPI on ncs 1.7.1</title><link>https://devzone.nordicsemi.com/thread/343537?ContentTypeID=1</link><pubDate>Wed, 15 Dec 2021 06:57:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18b1cc32-0b9a-4843-a940-f0e798a274c5</guid><dc:creator>eva_c</dc:creator><description>&lt;p&gt;Adding CONFIG_MULTITHREADING=y did indeed solve this error, thank you!&lt;/p&gt;
&lt;p&gt;However, now I get a similar error in the lis2dw12 driver, again when using MCUBoot:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;In file included from C:/Users/Eva/ncs/v1.7.1/zephyr/drivers/sensor/lis2dw12/lis2dw12.c:25:
C:/Users/Eva/ncs/v1.7.1/zephyr/drivers/sensor/lis2dw12/lis2dw12.h:63:32: error: field &amp;#39;i2c&amp;#39; has incomplete type
   63 |   const struct stmemsc_cfg_i2c i2c;
      |                                ^~~
In file included from C:/Users/Eva/ncs/v1.7.1/zephyr/include/sys/util_macro.h:34,
                 from C:/Users/Eva/ncs/v1.7.1/zephyr/include/sys/util.h:17,
                 from C:/Users/Eva/ncs/v1.7.1/zephyr/include/kernel/sched_priq.h:9,
                 from C:/Users/Eva/ncs/v1.7.1/zephyr/include/kernel_includes.h:23,
                 from C:/Users/Eva/ncs/v1.7.1/zephyr/include/kernel.h:17,
                 from C:/Users/Eva/ncs/v1.7.1/zephyr/include/init.h:11,
                 from C:/Users/Eva/ncs/v1.7.1/zephyr/drivers/sensor/lis2dw12/lis2dw12.c:13:
C:/Users/Eva/ncs/v1.7.1/zephyr/drivers/sensor/lis2dw12/lis2dw12.c:380:25: error: &amp;#39;stmemsc_i2c_read&amp;#39; undeclared here (not in a function); did you mean &amp;#39;stmemsc_spi_read&amp;#39;?
  380 |       (stmdev_read_ptr) stmemsc_i2c_read,  \
      |                         ^~~~~~~~~~~~~~~~&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I use the following config options for lis2dw sensor:&lt;/p&gt;
&lt;p&gt;CONFIG_I2C=y&lt;br /&gt;CONFIG_SENSOR=y&lt;br /&gt;CONFIG_LIS2DW12=y&lt;/p&gt;
&lt;p&gt;And the sensor is added in the devicetree as:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;i2c0 {
	compatible = &amp;quot;nordic,nrf-twi&amp;quot;;
    status = &amp;quot;okay&amp;quot;;
	sda-pin = &amp;lt;6&amp;gt;;
	scl-pin = &amp;lt;7&amp;gt;;
    lis2dw12_accel: lis2dw12-accel@19 {
        compatible = &amp;quot;st,lis2dw12&amp;quot;;
        label = &amp;quot;LIS2DW12-ACCEL&amp;quot;;
        reg = &amp;lt;0x19&amp;gt;;
    };
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Am I again missing some config?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Build fail using MCUBOOT and SPI on ncs 1.7.1</title><link>https://devzone.nordicsemi.com/thread/343439?ContentTypeID=1</link><pubDate>Tue, 14 Dec 2021 14:30:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b14cd12-86f7-4cd5-aad0-dc70dd0f70f0</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Looks like it is mcuboot that fails to build on your side.&lt;/p&gt;
&lt;p&gt;the &amp;quot;spi&amp;quot; driver depends on a multithreaded system, and&amp;nbsp;the errors in linking indicate that&amp;nbsp;your mcuboot config does not have &amp;quot;CONFIG_MULTITHREADING=y&amp;quot; set?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>