<?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>MbedTLS configuration/socket issue. Migrating from 1.8.0-&amp;gt;2.2.0 nRF Connect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97170/mbedtls-configuration-socket-issue-migrating-from-1-8-0--2-2-0-nrf-connect</link><description>Hi, 
 I am trying to migrate the existing application for the custom nrf9160 board. 
 It is based on nRF Connect SDKv1.8.0 and we need to migrate to v2.2.0. 
 I have resolved all conflicts (a legion of those) except for the issue with MbedTLS configuration</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 May 2023 10:46:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97170/mbedtls-configuration-socket-issue-migrating-from-1-8-0--2-2-0-nrf-connect" /><item><title>RE: MbedTLS configuration/socket issue. Migrating from 1.8.0-&gt;2.2.0 nRF Connect</title><link>https://devzone.nordicsemi.com/thread/423738?ContentTypeID=1</link><pubDate>Thu, 04 May 2023 10:46:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b94d3d6e-dc45-4bb8-b676-712bf0dde3cc</guid><dc:creator>dimitrois</dc:creator><description>&lt;p&gt;Hi, thanks for the response.&lt;/p&gt;
&lt;p&gt;Unfortunately I was getting different types of errors (multiple definitions at compile time related to systick) with your suggestion (maybe I was doing something wrong).&lt;/p&gt;
&lt;p&gt;What worked for me: I added&lt;/p&gt;
&lt;p&gt;&amp;amp;systick {&lt;br /&gt; status = &amp;quot;okay&amp;quot;;&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;to our custom board .dts file and used workarounds from this post:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/86525/multiple-definition-errors-when-trying-to-migrate-code-from-toolchain-1-7-1-to-1-9-1"&gt;devzone.nordicsemi.com/.../multiple-definition-errors-when-trying-to-migrate-code-from-toolchain-1-7-1-to-1-9-1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The application now runs fine and authenticates with the server without any issues, so this ticket can be closed.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Transitioning to TF-M will be another headache if we need to migrate to a newer version of SDK but at least the other updates are already implemented.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MbedTLS configuration/socket issue. Migrating from 1.8.0-&gt;2.2.0 nRF Connect</title><link>https://devzone.nordicsemi.com/thread/423520?ContentTypeID=1</link><pubDate>Wed, 03 May 2023 11:42:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fb18638-e383-4653-904f-b93a53fe2611</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Instead of adding the overlay using -Dsmp_DTC_OVERLAY_FILE, try to move systick_enabled.overlay into child_image/spm.conf instead.&lt;/p&gt;
&lt;p&gt;This child_image folder will be in your project directory.&lt;/p&gt;
&lt;p&gt;See &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_dev/multi_image/index.html"&gt;Multi-image builds&lt;/a&gt; for more info on this folder structure.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MbedTLS configuration/socket issue. Migrating from 1.8.0-&gt;2.2.0 nRF Connect</title><link>https://devzone.nordicsemi.com/thread/423201?ContentTypeID=1</link><pubDate>Tue, 02 May 2023 08:20:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccbf19d2-ae26-41c3-af21-d6674fcfba17</guid><dc:creator>dimitrois</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have now abandoned attempts to make our application work with TFM and Nordic Security Backend.&lt;/p&gt;
&lt;p&gt;TFM is not a hard requirement for us and SPM is still supported in nRF SDK v2.2.0, so I decided to change the approach and use SPM for now (I am aware it is removed after 2.2.0). This way I do not need to use Nordic Security Backend.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I made the necessary changes to revert back to SPM but it turns out SPM was broken in release v2.2.0.&lt;/p&gt;
&lt;p&gt;There is a known issue described here:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/known_issues.html?v=v2-2-0"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/known_issues.html?v=v2-2-0&lt;/a&gt;&amp;nbsp;under Secure Partition Manager section.&lt;/p&gt;
&lt;p&gt;I have tried using this workaround but get compilation error:&lt;/p&gt;
&lt;p&gt;-- Found Dtc: /home/.../ncs/toolchains/v2.2.0/usr/local/bin/dtc (found suitable version &amp;quot;1.4.7&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;) &lt;br /&gt;-- Found BOARD.dts: /home/../custom_boards/boards/arm/... .dts&lt;br /&gt;-- Found devicetree overlay: systick_enabled.overlay&lt;br /&gt;&amp;lt;command-line&amp;gt;: fatal error: systick_enabled.overlay: No such file or directory&lt;br /&gt;compilation terminated.&lt;br /&gt;-- Configuring incomplete, errors occurred!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The command I use to build (same as without this workaround except for the last part):&lt;/p&gt;
&lt;p&gt;west build -b ....@1.0.0 -d build_dir_ns -p -- -Dspm_DTC_OVERLAY_FILE=systick_enabled.overlay&lt;/p&gt;
&lt;p&gt;It seems the compiler does not see the overlay file. I tried placing it into different places but the result is always the same.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could you advise, what is the correct way of using this workaround?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MbedTLS configuration/socket issue. Migrating from 1.8.0-&gt;2.2.0 nRF Connect</title><link>https://devzone.nordicsemi.com/thread/418651?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2023 14:41:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79aa9b6b-cbef-4676-8573-88f5d37825d9</guid><dc:creator>dimitrois</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This work was put on hold by the customer for an unknown period of time, so no further findings at this stage.&lt;/p&gt;
&lt;p&gt;I will look into potential solutions you suggested and will post an update when/if there is any progress.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MbedTLS configuration/socket issue. Migrating from 1.8.0-&gt;2.2.0 nRF Connect</title><link>https://devzone.nordicsemi.com/thread/418638?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2023 13:48:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:739e2ce3-3a99-419a-935f-f4837b363d63</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I will continue helping in this case.&lt;/p&gt;
[quote user="kme"]Sorry no:&amp;nbsp;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/95688/config_mbedtls_config_c-does-not-work"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/95688/config_mbedtls_config_c-does-not-work&lt;/a&gt;&amp;nbsp;[/quote]
&lt;p&gt;Answer is still &amp;quot;no&amp;quot; but I added a comment to this case.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/8715.pastedimage1680270314299v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Have you found anything else since last time?&lt;/p&gt;
&lt;p&gt;Have a look at how our &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/https_client/README.html"&gt;HTTPS sample&lt;/a&gt; is &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/https_client/README.html#id9"&gt;Using Mbed TLS and TF-M&lt;/a&gt;, maybe this can be helpful. &lt;br /&gt;Maybe specifically the configurations at &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/samples/nrf9160/https_client/overlay-tfm_mbedtls.conf"&gt;overlay-tfm_mbedtls.conf&lt;/a&gt;.&lt;/p&gt;
[quote user=""]&lt;span&gt;I am not an expert in MbedTLS and the major pain for me is that I can&amp;#39;t use the original &amp;quot;legacy&amp;quot; MbedTLS settings.&lt;/span&gt;[/quote]
&lt;p&gt;Yea, as far as I have seen, we do not support nrf_security and legacy MbedTLS at the same time. It will either not work, or drastically increase the flash usage of your application.&lt;/p&gt;
&lt;p style="margin:0;padding:0;text-align:left;"&gt;If you can still not figure this out with the HTTPS sample linked above, can you capture a &lt;a href="https://infocenter.nordicsemi.com/topic/ug_trace_collector/UG/trace_collector/intro.html" rel="noopener noreferrer" target="_blank"&gt;Modem Trace&lt;/a&gt; and upload it here as a .binary file using Insert -&amp;gt; Image/video/file?&lt;/p&gt;
&lt;p style="margin:0;padding:0;text-align:left;"&gt;(Also include modem firmware version.)&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MbedTLS configuration/socket issue. Migrating from 1.8.0-&gt;2.2.0 nRF Connect</title><link>https://devzone.nordicsemi.com/thread/412817?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 16:54:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a69ab17b-7523-4c35-bfca-a672a498c2ab</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Not sure what the problem is, but have you looked at the psa_tls sample which can be configured to run RSA using TF-M:&lt;br /&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/main/samples/crypto/psa_tls/"&gt;https://github.com/nrfconnect/sdk-nrf/tree/main/samples/crypto/psa_tls/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Also, is there any civilized way of getting detailed logs from MbedTLS/sockets?[/quote]
&lt;p&gt;Sorry no:&amp;nbsp;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/95688/config_mbedtls_config_c-does-not-work"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/95688/config_mbedtls_config_c-does-not-work&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kenneth&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></channel></rss>