<?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>Using NCS 1.2  SMP_SVR example compiled with custom board DT</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58972/using-ncs-1-2-smp_svr-example-compiled-with-custom-board-dt</link><description>Hi, 
 I am using NCS 1.2 with Zephyr SMP_SVR example compiling with my own board DTS and using MCUBOOT 
 I have my own partitions configured in my DTS (attached down at the bottom of this message) 
 I understood that NCS is using PM (Partition manager</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 19 Mar 2020 18:01:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58972/using-ncs-1-2-smp_svr-example-compiled-with-custom-board-dt" /><item><title>RE: Using NCS 1.2  SMP_SVR example compiled with custom board DT</title><link>https://devzone.nordicsemi.com/thread/240721?ContentTypeID=1</link><pubDate>Thu, 19 Mar 2020 18:01:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9165afb9-061a-44e0-80af-591dbb1874ce</guid><dc:creator>eshaul</dc:creator><description>&lt;p&gt;Dear&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/sigvartmh"&gt;sigvartmh&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The below pm_static.yml is compiling ok (I have removed the scratch partition and added that space to the storage), but I have a few follow-up questions&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;mcuboot:
  address: 0x0
  size: 0xc000

mcuboot_primary:
  address: 0xc000
  orig_span: &amp;amp;id001
  - mcuboot_pad
  - app
  sharers: 0x1
  size: 0x36000
  span: *id001

mcuboot_secondary:
  address: 0x42000
  size: 0x36000

littlefs_storage:
  address: 0x78000
  size: 0x88000  &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;1.&lt;/p&gt;
&lt;p&gt;In the&amp;nbsp;mcuboot_primary section, I must add the &amp;quot;orig_span&amp;quot;, &amp;quot;sharers&amp;quot; &amp;amp; &amp;quot;span&amp;quot; sections (or else I get the same error as above), I got them from the partition.yml on my build folder but I don&amp;#39;t know their meaning &amp;amp; why are they needed, can you share your thoughts?&lt;/p&gt;
&lt;p&gt;2.&lt;/p&gt;
&lt;p&gt;The storage partition seems ok to me as it is exactly filling up space&amp;nbsp;till 0x100000. Anyway, it is not preventing the compilation (i will check the storage partition later on)&lt;/p&gt;
&lt;p&gt;3.&lt;/p&gt;
&lt;p&gt;During the build both memory maps are confirming that the partitions for mcuboot and the application are on the right size:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;For MCUBOOT, 48K = 0xC000

Memory region         Used Size  Region Size  %age Used
           FLASH:       35680 B        48 KB     72.59%
            SRAM:       23764 B       256 KB      9.07%
        IDT_LIST:          56 B         2 KB      2.73%
        
For APP, 220672B = 0x35E00

Memory region         Used Size  Region Size  %age Used
           FLASH:      121848 B     220672 B     55.22%
            SRAM:       26124 B       256 KB      9.97%
        IDT_LIST:         120 B         2 KB      5.86%&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;4.&lt;/p&gt;
&lt;p&gt;I managed to get a cycle of mcumgr commands and&amp;nbsp;DFU the board using the 2nd partition&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using NCS 1.2  SMP_SVR example compiled with custom board DT</title><link>https://devzone.nordicsemi.com/thread/240614?ContentTypeID=1</link><pubDate>Thu, 19 Mar 2020 11:26:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c22c9d36-6553-421b-bf27-271df0605622</guid><dc:creator>sigvartmh</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="python"&gt;mcuboot:
  address: 0x0
  size: 0xc000
mcuboot_primary:
  address: 0xc000
  size: 0x36000
mcuboot_secondary:
  address: 0x42000
  size: 0x36000
mcuboot_scratch:
  address: 0x78000
  size: 0x8000
littlefs_storage:
  address: 0x80000
  size: 0x7f000&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I guess that would be the simplest way of representing what you are trying to write. I don&amp;#39;t think you can have 0x80000 in your storage partition it seems as you hit 0x100000. Maybe there is a bug in the partition manager that doesn&amp;#39;t do a proper check.&lt;br /&gt;&lt;br /&gt;So I guess that&amp;#39;s what is failing for you since&amp;nbsp;partition manager is thinking you&amp;nbsp;are going out of bounds of the flash. I would agree that the error message is not telling you what&amp;#39;s failing.&lt;br /&gt;&lt;br /&gt;Just an FYI you don&amp;#39;t need a scratch partition anymore:&amp;nbsp;&lt;a href="https://github.com/JuulLabs-OSS/mcuboot/pull/645"&gt;https://github.com/JuulLabs-OSS/mcuboot/pull/645&lt;br /&gt;&lt;br /&gt;E&lt;/a&gt;dit:&amp;nbsp;Tested it and it seems that it doesn&amp;#39;t work as expected :/ Seems truncates the space of MCUBoot&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using NCS 1.2  SMP_SVR example compiled with custom board DT</title><link>https://devzone.nordicsemi.com/thread/240611?ContentTypeID=1</link><pubDate>Thu, 19 Mar 2020 11:22:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc1c269b-905c-4216-b314-b62720513b2b</guid><dc:creator>eshaul</dc:creator><description>&lt;p&gt;According to my understanding, they are perfectly aligned, which means there are no gaps that I know of, I am not sure if the syntax of the pm_static.yml is correct&lt;/p&gt;
&lt;p&gt;It was copied from the partitions.yml and changed addresses and sizes only.&lt;/p&gt;
&lt;p&gt;I am not aware of this keywoards:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;orig_span:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;sharers:&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using NCS 1.2  SMP_SVR example compiled with custom board DT</title><link>https://devzone.nordicsemi.com/thread/240609?ContentTypeID=1</link><pubDate>Thu, 19 Mar 2020 11:06:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcaa47c2-d470-4ef1-9871-a2f9c3403119</guid><dc:creator>sigvartmh</dc:creator><description>[quote userid="83877" url="~/f/nordic-q-a/58972/using-ncs-1-2-smp_svr-example-compiled-with-custom-board-dt/239847"]&lt;em&gt;File &amp;quot;/home/eshaul/workspace/ncs/nrf/scripts/partition_manager.py&amp;quot;, line 490, in get_dynamic_area_start_and_size&lt;/em&gt;&lt;br /&gt;&lt;em&gt; assert len(gaps) == 1, &amp;quot;Incorrect amount of gaps found&amp;quot;&lt;/em&gt;[/quote]
&lt;p&gt;So this error comes if your partitions are not address aligned directly after each other.&amp;nbsp;Try to create an empty partition between the sections which are not aligned. So&amp;nbsp;that you fill the gaps which are between your partitions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using NCS 1.2  SMP_SVR example compiled with custom board DT</title><link>https://devzone.nordicsemi.com/thread/239847?ContentTypeID=1</link><pubDate>Sun, 15 Mar 2020 18:21:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0a070af-f867-4f97-96ba-377d172679ba</guid><dc:creator>eshaul</dc:creator><description>&lt;p&gt;dear&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/sigvartmh"&gt;sigvartmh&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your reply it&amp;#39;s very helpful,&lt;/p&gt;
&lt;p&gt;I generated this pm_ststic.yml, it supposes (according to my understanding) to correspond with the DTS partitions configuration&lt;/p&gt;
&lt;p&gt;but unfortunately, I am getting error in compilation:&lt;/p&gt;
&lt;p&gt;&lt;em&gt; File &amp;quot;/home/eshaul/workspace/ncs/nrf/scripts/partition_manager.py&amp;quot;, line 490, in get_dynamic_area_start_and_size&lt;/em&gt;&lt;br /&gt;&lt;em&gt; assert len(gaps) == 1, &amp;quot;Incorrect amount of gaps found&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Can you help my understanding if indeed the pm_static.yml is corresponding with DTS partition configuration?&lt;/p&gt;
&lt;p&gt;For example, I don&amp;#39;t have the scratch partition there...&lt;/p&gt;
&lt;p&gt;Is there any documentation specific to how pm_static.yml structure should be?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Erez.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;app:
  address: 0xc200
  size: 0x35e00
littlefs_storage:
  address: 0x80000
  placement:
    after:
    - app
  size: 0x80000
mcuboot:
  address: 0x0
  placement:
    before:
    - mcuboot_primary
  size: 0xc000
mcuboot_pad:
  address: 0xc000
  placement:
    align:
      start: 0x1000
    before:
    - mcuboot_primary_app
  size: 0x200
mcuboot_primary:
  address: 0xc000
  orig_span: &amp;amp;id001
  - mcuboot_pad
  - app
  sharers: 0x1
  size: 0x36000
  span: *id001
mcuboot_primary_app:
  address: 0xc200
  orig_span: &amp;amp;id002
  - app
  size: 0x35e00
  span: *id002
mcuboot_secondary:
  address: 0x42000
  placement:
    after:
    - mcuboot_primary
    align:
      start: 0x1000
  share_size:
  - mcuboot_primary
  size: 0x36000
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;boot_partition: partition@0 {
label = &amp;quot;mcuboot&amp;quot;;
reg = &amp;lt;0x00000000 0x0000C000&amp;gt;;
};
slot0_partition: partition@c000 {
label = &amp;quot;image-0&amp;quot;;
reg = &amp;lt;0x0000C000 0x000036000&amp;gt;;
};
slot1_partition: partition@42000 {
label = &amp;quot;image-1&amp;quot;;
reg = &amp;lt;0x00042000 0x000036000&amp;gt;;
};
scratch_partition: partition@78000 {
label = &amp;quot;image-scratch&amp;quot;;
reg = &amp;lt;0x00078000 0x00008000&amp;gt;;
};
storage_partition: partition@80000 {
label = &amp;quot;storage&amp;quot;;
reg = &amp;lt;0x00080000 0x00080000&amp;gt;;
};&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using NCS 1.2  SMP_SVR example compiled with custom board DT</title><link>https://devzone.nordicsemi.com/thread/239610?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2020 20:34:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:269374eb-5ea8-4c5b-b61c-d3e8f9eb33bc</guid><dc:creator>sigvartmh</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/eshaul"&gt;eshaul&lt;/a&gt;&amp;nbsp;If you want to enter the configuration of mcuboot to configure the partition configurations&amp;nbsp;&lt;/p&gt;
&lt;div&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;ninja/make mcuboot_menuconfig&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;To change the configuration, you could either specify a specific config file for MCUBoot&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Through&lt;/div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="text"&gt;CmakeFile:

set(mcuboot_CONF_FILE mcuboot.conf)

or
cmake -Dmcuboot_CONF_FILE=mcuboot.conf&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;or change&amp;nbsp;&lt;br /&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;NCS root dir&amp;gt;/bootloader/mcuboot/boot/zephyr/pm.yml&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;If you want a specific configuration, I would recommend trying to define a pm_static.yml file in your project folder.&lt;br /&gt;&lt;br /&gt;If you want to look at what is generated, look in your &amp;lt;build_root&amp;gt;/partitions.yml or&amp;nbsp;pm.config depending on what you prefer to read.&lt;br /&gt;&lt;br /&gt;The generated correlated&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;build root&amp;gt;mcuboot/zephyr/include/generated/pm_config.h
&amp;lt;build root&amp;gt;zephyr/include/generated/pm_config.h&lt;/pre&gt;&amp;nbsp;header files are found at:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;To better answer, your question is that you would have to set:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="text"&gt;PM_PARTITION_SIZE_MCUBOOT=0xc000
PM_PARTITION_SIZE_MCUBOOT_STORAGE=0x80000
PM_PARTITION_SIZE_MCUBOOT_SCRATCH=8000&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;Unfortunately, you won&amp;#39;t be able to set the partition size as that&amp;#39;s what partition manager will calculate for you so the rest of the space will be split in to and be slot_0 and slot_1 and both storage and scratch is placed accordingly. So if you want a 1:1 match you&amp;#39;ll have to use pm_static.yml. Look at the generated partitions.yml after setting the configuration you want and tune the placement afterward would be my suggestion.&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using NCS 1.2  SMP_SVR example compiled with custom board DT</title><link>https://devzone.nordicsemi.com/thread/239437?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2020 06:33:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8a07056-7a22-436f-9b82-c5edffa77347</guid><dc:creator>eshaul</dc:creator><description>&lt;p&gt;Dear&amp;nbsp;&lt;span&gt;&amp;Oslash;yvind,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Partition manager is NCS related module, I am asking what is the designed way to configure partitions, SMP_SVR is a Zephyr example included in the NCS package and uses Partition Manager&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using NCS 1.2  SMP_SVR example compiled with custom board DT</title><link>https://devzone.nordicsemi.com/thread/239390?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2020 15:57:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5051b0d8-65de-45e3-aaeb-78bbaeb0f1b9</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html?highlight=smp_svr#smp-server-sample"&gt;&amp;nbsp;Zephyr&amp;nbsp;SMP Server Sample (SMP_SVR)&lt;/a&gt;&amp;nbsp;is a sample made by the Zephyr community for nRF52x, and not by the NCS team in Nordic. At the moment NCS is lacking full support for nRF52 devices. Therefore I would recommend asking the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/getting-help.html"&gt;Zephyr community for help&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>