<?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>BLE DFU build fails</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96424/ble-dfu-build-fails</link><description>I can successfully build and run the DFU as described here: 
 Now I&amp;#39;m trying to take the same steps with my own application and it fails in a weird way. I had to change /zephyr/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/include/image.h a bit just to get anything</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 Feb 2023 11:34:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96424/ble-dfu-build-fails" /><item><title>RE: BLE DFU build fails</title><link>https://devzone.nordicsemi.com/thread/409131?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 11:34:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22a3cc09-ff09-48f7-9bb7-08efabe6dc33</guid><dc:creator>Tiit</dc:creator><description>&lt;p&gt;I uninstalled everything and reinstalled v2.0.0. That doesn&amp;#39;t work well with my dts file (something in the ADC config part). But removing offending parts of the dts file I got the HR sample to compile with my board file.&lt;/p&gt;
&lt;p&gt;I then installed v2.2.0 and again modified the HR sample to have DFU. That compiled fine. Added my own DTS file and that also compiled now. So I just copied all the sources from my project into this new one and now it seems to work. I have no idea what in the project configuration is causing this error but it still fails in the old folder and works in the new one.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I guess we can close this as I have a working solution now. During all this testing VSCode broke several times and I had to uninstall and reinstall the Nordic extension to get it to work again. I&amp;#39;m coming from the very old nrf-51 SDK and all the new configuration files are really confusing me still. The code part is easy but gettign all the dts and conf and yaml and CMake file working has been a hassle.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Tiit&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU build fails</title><link>https://devzone.nordicsemi.com/thread/409065?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 08:29:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74cba854-f4c2-450c-a623-2d6aa382135e</guid><dc:creator>Tiit</dc:creator><description>&lt;p&gt;After installing the SDK v2.0.0 I can&amp;#39;t open anything in VSCode any more. I&amp;#39;m getting this error:&lt;/p&gt;
&lt;p&gt;Error loading webview: Error: Could not register service workers: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..&lt;/p&gt;
&lt;p&gt;VSCode itself seems to be fine but all the Nordic parts are broken now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU build fails</title><link>https://devzone.nordicsemi.com/thread/409060?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 07:48:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7794bac0-2fd1-470d-8cf3-d9fcfd366f40</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi Tiit,&lt;/p&gt;
[quote user="Tiit Ratsep"] I can send you the entire project[/quote]
&lt;p&gt;Yes please. As you said that the DFU with LBS sample is working but not with your custom board. So please make no / minimal changes to the sample project + your custom board files.&amp;nbsp;Do mention if there is anything special to consider.&lt;/p&gt;
&lt;p&gt;We can look for upgrading to the latest version once it compiles successfully.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Naeem&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU build fails</title><link>https://devzone.nordicsemi.com/thread/408966?ContentTypeID=1</link><pubDate>Wed, 08 Feb 2023 16:08:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6197dac4-55b3-483a-9cfc-046cebcc06c8</guid><dc:creator>Tiit</dc:creator><description>&lt;p&gt;Hi Naeem,&lt;/p&gt;
&lt;p&gt;That is why I am contacting you. The only error I get is:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;/tmp/ccetOlIq.s: Assembler messages:&lt;br /&gt;/tmp/ccetOlIq.s:213: Error: missing expression&lt;/p&gt;
&lt;p&gt;This doesn&amp;#39;t really tell me anything. I can send you the entire project somehow if you think that would make a difference. The same error appears if you follow the DFU tutorial with the LBS sample and change the build configuration to use the custom board file I have copied above.&lt;/p&gt;
&lt;p&gt;I will try downloading a fresh copy of the SDK tomorrow and then see if I can follow the DFU tutorial in that folder without changing the &amp;quot;image.h&amp;quot;. I will also try an older version of the SDK but if that works I still want to figure out the problem as we do plan on keeping the production code updated to the latest SDK as long as possible with regular updates for users.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Tiit&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU build fails</title><link>https://devzone.nordicsemi.com/thread/408963?ContentTypeID=1</link><pubDate>Wed, 08 Feb 2023 16:02:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9f13c54-d459-4b27-9467-51016b68c8c7</guid><dc:creator>Tiit</dc:creator><description>&lt;p&gt;The blindy_v3 and blindy_v4 thing is confusing here I agree but that should not make a difference. We are in the process of preparing this for manufacture and PCB revisions come and go pretty fast. The only real differences are pin mappings and ADC setups. All that should have little to no effect on the BLE part as far as I can tell.&lt;/p&gt;
&lt;p&gt;I will try to compile this for the nrf52840 dev kit tomorrow but I will likely need to comment out parts of the code since I have added many new aliases into the dts file that will not be there for the DK. Or I can try to do the overlay thing - I haven&amp;#39;t tried that yet. This is my first project with Zephyr and I&amp;#39;ve never worked with devicetree before so everything takes a while to get right still.&lt;/p&gt;
&lt;p&gt;My custom board uses a module from Raytac containing the nrf52840. The same code works on my board without the DFU part already. And I will try tomorrow but I&amp;#39;m confident the HRS or LBS samples also work on my board if they are compiled with the DTS files for the DK. The issue seems to be the DTS file for my board. DFU samples that work with the nrf52840 DK DTS file fail to build with the DTS file I copied above. Unfortunately the error message is very non-descriptive and I can&amp;#39;t see what is wrong in my DTS file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU build fails</title><link>https://devzone.nordicsemi.com/thread/408930?ContentTypeID=1</link><pubDate>Wed, 08 Feb 2023 14:51:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5122cfcf-8244-4a65-8716-9085c3a1eab4</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;This board you built on was &amp;quot;&lt;span&gt;blindy_v3&lt;/span&gt;&amp;quot; and this is &amp;quot;Blindy_v4&amp;quot;&lt;/p&gt;
&lt;p&gt;Also, can you successfully build your project for certain DK ?&lt;/p&gt;
&lt;p&gt;Which DK you used as basis for your custom board?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU build fails</title><link>https://devzone.nordicsemi.com/thread/408929?ContentTypeID=1</link><pubDate>Wed, 08 Feb 2023 14:48:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd0d468b-0d57-47cc-9803-ece1e21b55d1</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi Tiit,&lt;/p&gt;
&lt;p&gt;Thank you for contacting DevZone at NordicSemi.&lt;/p&gt;
&lt;p&gt;The information you have provided is not helpful.&lt;/p&gt;
&lt;p&gt;Can you please let me know of the steps to reproduce the error you are facing?&lt;/p&gt;
&lt;p&gt;Also, the error / problem in your description is not clear.&lt;/p&gt;
&lt;p&gt;As you can correctly build, flash and run the example DFU from the tutorials, I would think there is some problem with your application project; I am not sure though.&lt;/p&gt;
&lt;p&gt;I am also not sure why you had to change/edit the &amp;quot;image.h&amp;quot; file from the zephyr. You can update SDK and the toolchain and check again.&lt;/p&gt;
&lt;p&gt;You could also probably use other version (like 2.0.0 of the nCS) to see if you still had to change those files or not and if you are getting the same error.&lt;/p&gt;
&lt;p&gt;With regards,&lt;br /&gt;Naeem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE DFU build fails</title><link>https://devzone.nordicsemi.com/thread/408827?ContentTypeID=1</link><pubDate>Wed, 08 Feb 2023 11:25:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e596a97d-5805-4b36-a95c-3b7de1a0aa77</guid><dc:creator>Tiit</dc:creator><description>&lt;p&gt;This seems to be caused by my custom board file somehow. If I try to build the working sample files on my custom board I get the same error.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is my board dts file. Can you see anything I should change there to make this work?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// Copyright (c) 2022 Nordic Semiconductor ASA
// SPDX-License-Identifier: Apache-2.0

/dts-v1/;
#include &amp;lt;nordic/nrf52840_qiaa.dtsi&amp;gt;

/ {
	zephyr,user {
		io-channels = &amp;lt;&amp;amp;adc 0&amp;gt;, &amp;lt;&amp;amp;adc 1&amp;gt;;
	};
};

&amp;amp;pinctrl {
	pwm0_default: pwm0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(PWM_OUT0, 0, 27)&amp;gt;;
			nordic,invert;
		};
	};

	pwm0_sleep: pwm0_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(PWM_OUT0, 0, 27)&amp;gt;;
			low-power-enable;
		};
	};

	pwm1_default: pwm1_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(PWM_OUT1, 0, 6)&amp;gt;;
			nordic,invert;
		};
	};

	pwm1_sleep: pwm1_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(PWM_OUT1, 0, 6)&amp;gt;;
			low-power-enable;
		};
	};
};

/ {
	model = &amp;quot;Blindy v4&amp;quot;;
	compatible = &amp;quot;soma,blindy-v4&amp;quot;;

	chosen {
		zephyr,sram = &amp;amp;sram0;
		zephyr,flash = &amp;amp;flash0;
		zephyr,code-partition = &amp;amp;slot0_partition;
	};

	aliases {
		led0 = &amp;amp;led0;
		led1 = &amp;amp;led1;
		led2 = &amp;amp;led2;
		moten = &amp;amp;mot_en_pin;
		chgen = &amp;amp;chg_en_pin;
		ah = &amp;amp;ah_pin;
		al = &amp;amp;al_pin;
		bh = &amp;amp;bh_pin;
		bl = &amp;amp;bl_pin;
		enc1 = &amp;amp;enc1;
		enc2 = &amp;amp;enc2;
	};

	leds {
		compatible = &amp;quot;gpio-leds&amp;quot;;
		led0: led_0 {
			gpios = &amp;lt; &amp;amp;gpio0 22 GPIO_ACTIVE_LOW &amp;gt;;
			label = &amp;quot;Blue led&amp;quot;;
		};
		led1: led_1 {
			gpios = &amp;lt; &amp;amp;gpio0 21 GPIO_ACTIVE_LOW &amp;gt;;
			label = &amp;quot;Green led&amp;quot;;
		};
		led2: led_2 {
			gpios = &amp;lt; &amp;amp;gpio0 20 GPIO_ACTIVE_LOW &amp;gt;;
			label = &amp;quot;Red led&amp;quot;;
		};
	};

	inputs {
		compatible = &amp;quot;gpio-keys&amp;quot;;
		enc1: enc_1 {
			gpios = &amp;lt;&amp;amp;gpio0 24 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;Encoder 1&amp;quot;;
		};
		enc2: enc_2 {
			gpios = &amp;lt;&amp;amp;gpio1 12 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;Encoder 2&amp;quot;;
		};
	};

	outputs {
		compatible = &amp;quot;gpio-leds&amp;quot;;
		chg_en_pin: chg_en_pin {
			gpios = &amp;lt; &amp;amp;gpio1 11 GPIO_ACTIVE_HIGH &amp;gt;;
		};
	};

	motor_pins {
		compatible = &amp;quot;gpio-leds&amp;quot;;
		mot_en_pin: mot_en_pin {
			gpios = &amp;lt; &amp;amp;gpio1 10 GPIO_ACTIVE_HIGH &amp;gt;;
		};
		/*
		ah_pin: ah_pin {
			gpios = &amp;lt; &amp;amp;gpio0 27 GPIO_ACTIVE_HIGH &amp;gt;;
		};
		*/
		al_pin: al_pin {
			gpios = &amp;lt; &amp;amp;gpio0 26 GPIO_ACTIVE_LOW &amp;gt;;
		};
		/*
		bh_pin: bh_pin {
			gpios = &amp;lt; &amp;amp;gpio0 6 GPIO_ACTIVE_HIGH &amp;gt;;
		};
		*/
		bl_pin: bl_pin {
			gpios = &amp;lt; &amp;amp;gpio0 8 GPIO_ACTIVE_LOW &amp;gt;;
		};
	};

	pwm_pins {
		compatible = &amp;quot;pwm-leds&amp;quot;;
		ah_pin: ah_pin {
			pwms = &amp;lt; &amp;amp;pwm0 0 PWM_USEC(50) PWM_POLARITY_NORMAL &amp;gt;;
		};
		bh_pin: bh_pin {
			pwms = &amp;lt; &amp;amp;pwm1 1 PWM_USEC(50) PWM_POLARITY_NORMAL &amp;gt;;
		};
	};
};

zephyr_udc0: &amp;amp;usbd {
	compatible = &amp;quot;nordic,nrf-usbd&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;zephyr_udc0 {
	cdc_acm_uart0 {
		compatible = &amp;quot;zephyr,cdc-acm-uart&amp;quot;;
	};
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;flash0 {
	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		boot_partition: partition@0 {
			label = &amp;quot;mcuboot&amp;quot;;
			reg = &amp;lt;0x0 0xc000&amp;gt;;
		};
		slot0_partition: partition@c000 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0xc000 0x72000&amp;gt;;
		};
		slot1_partition: partition@7e000 {
			label = &amp;quot;image-1&amp;quot;;
			reg = &amp;lt;0x7e000 0x72000&amp;gt;;
		};
		scratch_partition: partition@f0000 {
			label = &amp;quot;image-scratch&amp;quot;;
			reg = &amp;lt;0xf0000 0xa000&amp;gt;;
		};
		storage_partition: partition@fa000 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0xfa000 0x6000&amp;gt;;
		};
	};
};

&amp;amp;gpio0 {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpio1 {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;pwm0 {
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;pwm0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;pwm0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;pwm1 {
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;pwm1_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;pwm1_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;adc {
	#address-cells = &amp;lt;1&amp;gt;;
	#size-cells = &amp;lt;0&amp;gt;;
	status = &amp;quot;okay&amp;quot;;

	channel@0 { /* Touch ADC */
		reg = &amp;lt;0&amp;gt;;
		zephyr,gain = &amp;quot;ADC_GAIN_1_6&amp;quot;;
		zephyr,reference = &amp;quot;ADC_REF_INTERNAL&amp;quot;;
		zephyr,acquisition-time = &amp;lt;ADC_ACQ_TIME_DEFAULT&amp;gt;;
		zephyr,input-positive = &amp;lt;NRF_SAADC_AIN0&amp;gt;; /* P0.02 */
		zephyr,resolution = &amp;lt;12&amp;gt;;
	};

	channel@1 { /* BAT_POS */
		reg = &amp;lt;1&amp;gt;;
		zephyr,gain = &amp;quot;ADC_GAIN_1_3&amp;quot;;
		zephyr,reference = &amp;quot;ADC_REF_INTERNAL&amp;quot;;
		zephyr,acquisition-time = &amp;lt;ADC_ACQ_TIME_DEFAULT&amp;gt;;
		zephyr,input-positive = &amp;lt;NRF_SAADC_AIN7&amp;gt;;
		zephyr,resolution = &amp;lt;12&amp;gt;;
		/*zephyr,oversampling = &amp;lt;8&amp;gt;;*/
	};
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>