<?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>Can I implement pairing with LESC enabled in nRF52810; SDK 15.2.0 v6.1.0 S112 ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63238/can-i-implement-pairing-with-lesc-enabled-in-nrf52810-sdk-15-2-0-v6-1-0-s112</link><description>I’m using nRF52810 on a custom board (for our own application) using SDK 15.2.0 v6.1.0 S112. Given the amount of memory this chip has (192/24 KB) is it possible to implement pairing using LESC ? The SoftDevice occupies 100KB of flash(0x00000-0x19000)</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 05 Jul 2020 18:15:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63238/can-i-implement-pairing-with-lesc-enabled-in-nrf52810-sdk-15-2-0-v6-1-0-s112" /><item><title>RE: Can I implement pairing with LESC enabled in nRF52810; SDK 15.2.0 v6.1.0 S112 ?</title><link>https://devzone.nordicsemi.com/thread/258471?ContentTypeID=1</link><pubDate>Sun, 05 Jul 2020 18:15:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26d32a9e-f53f-4c06-9f27-42917a1a1f77</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;It is explained in the release notes:&lt;/p&gt;
&lt;pre&gt;&lt;span&gt;Note for IAR 8 users:
(Libraries for IAR 8 require wchar_t to be of size 32 bits while IAR 7 requires 16 bits).
 
To run a project using IAR 8, follow these intructions:
 - Open the IAR project in IAR 8. The IAR workbench will automatically generate an IAR 8 compatible project file.
 - If the project contains one of the precompiled libraries listed below, replace it
   with the IAR 8 compatible alternative (there are no projects targeting nRF51 in this SDK).
 - Save the project.
 - When building the project, you might get the warning: &amp;quot;The header file &amp;#39;cmsis_iar.h&amp;#39; is obsolete and should not be used. [...]&amp;quot;.
    - The problem is described in DevZone post: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/31123/iar-ewarm-8-22-1-complains-about-cmsis_iar-h"&gt;devzone.nordicsemi.com/.../iar-ewarm-8-22-1-complains-about-cmsis_iar-h&lt;/a&gt;
      The solution is to remove all occurrences of #include &amp;lt;cmsis_iar.h&amp;gt;.
    
The affected libraries are:
 - &lt;strong&gt;micro-ecc crypto:
    - IAR7: Includes library located in the folder named “…_iar\…”.
    - IAR8: Switch to using the library from the folder named “…_armgcc\…”.&lt;/strong&gt;
 - nrf_cc310, nrf_cc310_bl, and nrf_oberon:
    - IAR7: Link to a library where “short_wchar” is part of the folder name.
    - IAR8: Link to a library without “short_wchar” in part of the folder name.
 - Gazell, NFC Tag, and 802.15.4:
    - IAR7: Includes the library where the file name ends with “_iar”.
    - IAR8: Switch to using the library with similar file name that ends with “_gcc”.&lt;/span&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I implement pairing with LESC enabled in nRF52810; SDK 15.2.0 v6.1.0 S112 ?</title><link>https://devzone.nordicsemi.com/thread/258460?ContentTypeID=1</link><pubDate>Sun, 05 Jul 2020 15:37:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ea9d291-aa1f-445e-86b3-790a8e20428a</guid><dc:creator>Manish Kaul</dc:creator><description>[quote userid="14926" url="~/f/nordic-q-a/63238/can-i-implement-pairing-with-lesc-enabled-in-nrf52810-sdk-15-2-0-v6-1-0-s112/258383"]This is from the SDK release notes:[/quote]
&lt;p&gt;So how do I resolve this? I obviously can&amp;#39;t edit the library file so how do I change wchar_t to 32 bits ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I implement pairing with LESC enabled in nRF52810; SDK 15.2.0 v6.1.0 S112 ?</title><link>https://devzone.nordicsemi.com/thread/258383?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 15:10:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48fd970a-d3ed-4e71-bec0-a1f9a44d2737</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I&amp;#39;m not that familiar with IAR. Maybe you can ask their support if they can explain why you get these compilation errors?&lt;/p&gt;
[quote user="Manish Kaul"]Can you suggest some resources to learn from or suggest methods to do so ?[/quote]
&lt;p&gt;You would just need to remove unused modules and features. NRF_LOG is typically the first thing that needs to go if flash/RAM size is an issue.&lt;/p&gt;
[quote user="Manish Kaul"]Also, can you please explain what is this warning of wchar_t size being 16bits in library file ?[/quote]
&lt;p&gt;This is from the SDK release notes:&lt;/p&gt;
&lt;pre&gt;Note for IAR 8 users:
(Libraries for IAR 8 require wchar_t to be of size 32 bits while IAR 7 requires 16 bits).&lt;/pre&gt;
[quote user="Manish Kaul"]One more thing, can we not implement link encryption using LESC on nRF52832 (PCA10040 S132) in SDK 14.0.0 ?[/quote]
&lt;p&gt;There is a &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.0.0/ble_sdk_app_multirole_lesc.html"&gt;LESC example&lt;/a&gt; in SDK 14.0.0 as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I implement pairing with LESC enabled in nRF52810; SDK 15.2.0 v6.1.0 S112 ?</title><link>https://devzone.nordicsemi.com/thread/258167?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 15:05:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e797455-b6d6-409c-833b-d194d18e2e15</guid><dc:creator>Manish Kaul</dc:creator><description>[quote userid="14926" url="~/f/nordic-q-a/63238/can-i-implement-pairing-with-lesc-enabled-in-nrf52810-sdk-15-2-0-v6-1-0-s112/257812"]If you can post your full project, we can try to help you optimize the flash and RAM usage[/quote]
&lt;p&gt;Can you suggest some resources to learn from or suggest methods to do so ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I implement pairing with LESC enabled in nRF52810; SDK 15.2.0 v6.1.0 S112 ?</title><link>https://devzone.nordicsemi.com/thread/258159?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 14:39:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e5c4bc5-3077-4792-a781-89be8e92c164</guid><dc:creator>Manish Kaul</dc:creator><description>&lt;p&gt;I verified by mistake. Please respond to the queries pending. Regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I implement pairing with LESC enabled in nRF52810; SDK 15.2.0 v6.1.0 S112 ?</title><link>https://devzone.nordicsemi.com/thread/258090?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 12:00:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b281db62-fda7-4675-b936-c7ebbc1ada35</guid><dc:creator>Manish Kaul</dc:creator><description>&lt;p&gt;One more thing, can we not implement link encryption using LESC on nRF52832 (PCA10040 S132) in SDK 14.0.0 ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I implement pairing with LESC enabled in nRF52810; SDK 15.2.0 v6.1.0 S112 ?</title><link>https://devzone.nordicsemi.com/thread/258011?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 09:07:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04178db6-2151-4a63-bc04-1f795c6c56ef</guid><dc:creator>Manish Kaul</dc:creator><description>&lt;p&gt;Thanks for the reply.&lt;br /&gt;I was able to create the &amp;#39;micro_ecc_lib_nrf52.a&amp;#39;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="14926" url="~/f/nordic-q-a/63238/can-i-implement-pairing-with-lesc-enabled-in-nrf52810-sdk-15-2-0-v6-1-0-s112/257893"]The errors from the section placement look a bit strange, this was one of the things I wanted to look at if you provided your project. Which example project are you based on? Did you modify the section placement/linker files for the project?[/quote]
&lt;p&gt;The application is not based on any particular example, it&amp;#39;s our own product with the hardware and the software built from scratch. However the current firmware does not take care of the encryption and to include encryption I referred to the hrs example,&amp;nbsp;incorporated&amp;nbsp;it on the app_uart example (worked well on testing with nRF Connect) and now porting the framework of encryption to our product firmware.&amp;nbsp;&lt;br /&gt;Yes I did modify the FLASH end region (start is fixed at&amp;nbsp; 0x19000) to&amp;nbsp;accommodate for the additional size upon inclusion of encryption modules and files (as I said before he flash was divided into bootloader and application).&lt;br /&gt;I&amp;#39;m afraid I am not in a position to share the source code/project as per the company policies.&lt;br /&gt;Can you please help me out without the project ?&lt;br /&gt;Attached are pictures of memory usage step by step (What&amp;#39;s weird is when the RAM size is 8784 byte it gives no such error but when it reduces to 4096 bytes it gives placement error during linking):&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1593680761149v1.png" /&gt;&lt;br /&gt;&lt;br /&gt;After compiling the code now:&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1593680800589v2.png" /&gt;&lt;br /&gt;Also, can you please explain what is this warning of wchar_t size being 16bits in library file ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I implement pairing with LESC enabled in nRF52810; SDK 15.2.0 v6.1.0 S112 ?</title><link>https://devzone.nordicsemi.com/thread/257893?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2020 14:27:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb07dfa2-d80c-44e7-bd23-ccec6b175786</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Do you have GCC installed in the location where the Makefile is looking for it? If not, you have to modify the&amp;nbsp;file in&amp;nbsp;components\toolchain\gcc\Makefile.windows to point to the correct locations for GCC.&lt;/p&gt;
[quote user="Manish Kaul"]Can you please explain the linker errors? It says RAM is being over used however you can see in the other picture above that RAM is just using 6794 bytes where as the available is ~8KB ?[/quote]
&lt;p&gt;The errors from the section placement look a bit strange, this was one of the things I wanted to look at if you provided your project. Which example project are you based on? Did you modify the section placement/linker files for the project?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I implement pairing with LESC enabled in nRF52810; SDK 15.2.0 v6.1.0 S112 ?</title><link>https://devzone.nordicsemi.com/thread/257883?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2020 14:05:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5dff5ea2-b4a0-4cb7-a9ab-8668ebf2fd3d</guid><dc:creator>Manish Kaul</dc:creator><description>&lt;p&gt;Thanks for the response.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Further queries:&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;&lt;/p&gt;
[quote userid="14926" url="~/f/nordic-q-a/63238/can-i-implement-pairing-with-lesc-enabled-in-nrf52810-sdk-15-2-0-v6-1-0-s112/257812"]I have not double-checked, but I would assume that the micro-ecc backend may be much smaller than the nRF_Oberon libraries (which support many additional crypto algorithms). Have you tested that with LESC?[/quote]
&lt;p&gt;trying to do that but am&amp;nbsp;NOT being able to get through generating the &amp;#39;micro_ecc_lib_nrf52.a&amp;#39; file by compiling the Makefile on the path &amp;quot;&amp;lt;PROJ_DIR&amp;gt;\external\micro-ecc\nrf52hf_iar\armgcc&amp;quot; . When I run the make command on this path in the cmd, it says this (on a Windows 10 machine)&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1593611687503v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;I followed steps according to (&lt;/span&gt;&lt;a style="font-family:inherit;" href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Flib_crypto_backend_micro_ecc.html"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Flib_crypto_backend_micro_ecc.html&lt;/a&gt;&lt;span style="font-family:inherit;"&gt;).&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;Can you help me out with how to get the .a file from ecc-micro library that I can then include in the project build? (again, compiler: IAR EWARM 8.32)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;2. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Can you please explain the linker errors? It says RAM is being over used however you can see in the other picture above that RAM is just using 6794 bytes where as the available is ~8KB ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;span style="font-family:inherit;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Manish&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I implement pairing with LESC enabled in nRF52810; SDK 15.2.0 v6.1.0 S112 ?</title><link>https://devzone.nordicsemi.com/thread/257812?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2020 11:55:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc385eb8-b011-4f54-9e66-7bf02894eef2</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Manish Kaul"]i. For flash out of 92KB , 24KB of flash is assigned to the bootloader firmware leaving essentially just 68KB of flash (right now I&amp;#39;ve left just 0.5KB of flash space for bootloader). Can the chip nRF52810 really allow for pairing using LESC ?[/quote]
&lt;p&gt;The nRF52810 is a very small chip. You cannot expect to fit everything into this (DFU, LESC, etc). If you do not require DFU, you do not need to reserve any space for the bootloader.&lt;/p&gt;
[quote user="Manish Kaul"]ii. currently for pairing I&amp;#39;ve used Oberon library and nRF_hw_backend_rng and nRF_hw_backend_rng_mbedtls. What I observed was that the main space has been taken up the the encryption library file (liboberon_2.0.5.a)&amp;nbsp;and currently we&amp;#39;re using &amp;#39;Normal&amp;#39; runtime C library but I had to increase it to &amp;#39;Full&amp;#39; runtime library to include file descriptor operations (as they were used in one of the files for encryption)[/quote]
&lt;p&gt;I have not double-checked, but I would assume that the micro-ecc backend may be much smaller than the nRF_Oberon libraries (which support many additional crypto algorithms). Have you tested that with LESC?&lt;/p&gt;
[quote user=""]Can you please help me out to either optimize memory or let me know where I can improve to achieve pairing using LESC ? ( IDE: IAR EWARM 8.32)[/quote]
&lt;p&gt;If you can post your full project, we can try to help you optimize the flash and RAM usage.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I implement pairing with LESC enabled in nRF52810; SDK 15.2.0 v6.1.0 S112 ?</title><link>https://devzone.nordicsemi.com/thread/257733?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2020 08:16:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:895729e9-7714-4c5b-92ee-cf42aa924799</guid><dc:creator>Manish Kaul</dc:creator><description>&lt;p&gt;In continuation to the above question,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;i. For flash out of 92KB , 24KB of flash is assigned to the bootloader firmware leaving essentially just 68KB of flash (right now I&amp;#39;ve left just 0.5KB of flash space for bootloader). Can the chip nRF52810 really allow for pairing using LESC ?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;ii. currently for pairing I&amp;#39;ve used Oberon library and nRF_hw_backend_rng and nRF_hw_backend_rng_mbedtls. What I observed was that the main space has been taken up the the encryption library file (liboberon_2.0.5.a)&amp;nbsp;and currently we&amp;#39;re using &amp;#39;Normal&amp;#39; runtime C library but I had to increase it to &amp;#39;Full&amp;#39; runtime library to include file descriptor operations (as they were used in one of the files for encryption)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>