<?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>USB HID (physical) + BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56826/usb-hid-physical-ble</link><description>Dear Nordic community, 
 we as a company, have developed products with the nRF52832... currently, we&amp;#39;re developing a product with the nRF52840 (because we needed USB). 
 My development setup is as follows: 
 OS: Windows 10 Pro 
 FW: nRF5_SDK_15.3.0_59ac345</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Jan 2020 14:49:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56826/usb-hid-physical-ble" /><item><title>RE: USB HID (physical) + BLE</title><link>https://devzone.nordicsemi.com/thread/230675?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2020 14:49:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dce7207b-695b-41a0-952f-3f514ba655ec</guid><dc:creator>mauro_nx</dc:creator><description>&lt;p&gt;Maybe you can update on the next version of the SDK to have the definition of the &amp;#39;ret&amp;#39; instance (on the app_usbd_hid_generic.c file) outside of the critical_region. That worked out for me... I guess it&amp;#39;s because the Softdevice is enabled.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Again, thank you so much &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB HID (physical) + BLE</title><link>https://devzone.nordicsemi.com/thread/230665?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2020 14:31:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:380dd0ed-8846-448f-b304-a2fa4c7e0139</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;No worries &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt; Glad it worked out!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB HID (physical) + BLE</title><link>https://devzone.nordicsemi.com/thread/230614?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2020 13:18:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f906081-7d2c-4579-a804-a224f3b923c8</guid><dc:creator>mauro_nx</dc:creator><description>&lt;p&gt;Hi Edvin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;the project now successfully compiles. It was an error from my side. I didn&amp;#39;t know about the &amp;#39;Output&amp;#39; option to see the details of the compiling process. Now we know it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t realize that in one of our libraries there was a definition on a .h file... So compiler was saying that there was a redefinition of some variables. I placed the definition on the .c file and now it works.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for the mistake... and thank you so much for all your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB HID (physical) + BLE</title><link>https://devzone.nordicsemi.com/thread/230503?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2020 08:42:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b17d620-fec8-4a52-9256-c9882899dd07</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Before we do that, can you please try to look at the &amp;quot;output&amp;quot; from the build?&lt;/p&gt;
&lt;p&gt;From your last screenshot, there is a dropdown menu saying &amp;quot;Task&amp;quot;. Can you change it to &amp;quot;Output&amp;quot;, and copy-paste all the text from there?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB HID (physical) + BLE</title><link>https://devzone.nordicsemi.com/thread/230424?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 16:47:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b1c5fd9-fa2d-4955-846b-111f7fb6becb</guid><dc:creator>mauro_nx</dc:creator><description>&lt;p&gt;Hi Edvin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;yes, this is the instance that the error points to. On the app_usbd_hid_generic.c :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/t10.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;If I try what you suggested, declaring &amp;quot;ret&amp;quot; outside from the critical region, this is what happens... Build fails and there is any error message:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/t11.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;I was using SES v4.18 (64 bits). I&amp;nbsp;updated it to v4.40 (64 bits) as you recommended, and the behavior is the same, Build failed with no error message. If I try to double click the Build failed message... nothing happens.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/t12.png" /&gt;&lt;/p&gt;
&lt;p&gt;Do you think that sending you the project... Would help you to review it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB HID (physical) + BLE</title><link>https://devzone.nordicsemi.com/thread/230390?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 14:27:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fc22cc6-eb82-4b7b-9a46-95a7e13cb6b6</guid><dc:creator>Edvin</dc:creator><description>[quote user="mauroaristi"]I made the change because of this error... but not sure if that was ok.&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;I see. I would try to move &lt;strong&gt;only&lt;/strong&gt; the &amp;quot;rety_code_t ret&amp;quot; outside the critical region if this caused any issues during compilation:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_DRV_USBD_TRANSFER_IN(transfer, p_buff, size);
ret_code_t ret;

CRITICAL_REGION_ENTER();
ret = app_usbd_ep_transfer(ep_addr, &amp;amp;transfer);
if (ret == NRF_SUCCESS)
{
    app_usbd_hid_state_flag_set(&amp;amp;p_generic_ctx-&amp;gt;hid_ctx,&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But are you sure this &amp;quot;ret&amp;quot; is the &amp;quot;ret&amp;quot; instance that it was actually pointing to?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;what happens if you double click the &amp;quot;build failed&amp;quot;? Does anything else pop up?&lt;/p&gt;
&lt;p&gt;It looks like you are using SES, is that correct? What version? Can you try to update it to a later version from &lt;a href="https://www.segger.com/downloads/embedded-studio/" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB HID (physical) + BLE</title><link>https://devzone.nordicsemi.com/thread/230379?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 13:53:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36e07884-0edd-4b38-bd9d-8a9c29fad5b1</guid><dc:creator>mauro_nx</dc:creator><description>&lt;p&gt;Hello Edvin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thank you so much for you fast reply. Please find attached the warnings that it shows... Those warnings are from main.c... and on the previous version of the project (where it didn&amp;#39;t has USB functionality, the same warnings appeared, and it compiled successfully):&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Current version - build failed:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/t4.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;But... i modified one file:&amp;nbsp;app_usbd_hid_generic.c, as follows:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/t5.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;I made the change because of this error... but not sure if that was ok.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/t6.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/t7.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;On the previous version of the project (where no USB functionality was added... The same warnings appeared, and it compiled successfully:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/t8.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/t9.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Probably my mistake was to change the&amp;nbsp;&lt;span&gt;app_usbd_hid_generic.c file. But... how can I avoid that error?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you so much!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB HID (physical) + BLE</title><link>https://devzone.nordicsemi.com/thread/230340?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 12:42:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65d3e79b-f110-4271-ba32-cdb30f3c3968</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What are the warnings and errors you get when you try to build the project? If you double click the warnings, you should see what they are, and you probably have at least one error as well, since the build failed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>