<?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>Creating partitions on external SPI flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53277/creating-partitions-on-external-spi-flash</link><description>I have added an external SPI flash on the nRF9160 DK board, and wired it up to SPI3. I want to partition the flash into two ares for separate uses, but the partition_manager script is not generating the partitions for the external flash. I have added</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Mar 2020 13:33:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53277/creating-partitions-on-external-spi-flash" /><item><title>RE: Creating partitions on external SPI flash</title><link>https://devzone.nordicsemi.com/thread/238536?ContentTypeID=1</link><pubDate>Fri, 06 Mar 2020 13:33:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46151e64-5a95-49ed-b125-0a8f74b8a6f1</guid><dc:creator>shibshab</dc:creator><description>&lt;p&gt;For future reference, support for external flash in partition manager is WIP in this PR:&amp;nbsp;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/pull/1962"&gt;https://github.com/NordicPlayground/fw-nrfconnect-nrf/pull/1962&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating partitions on external SPI flash</title><link>https://devzone.nordicsemi.com/thread/217718?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2019 09:33:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1be61bff-2b7d-4984-a4ad-d23e78e5bc74</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Okay. Let&amp;#39;s go with that solution for now, and if you have any more problems regarding this, just post it here.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating partitions on external SPI flash</title><link>https://devzone.nordicsemi.com/thread/217351?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2019 14:00:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de7538fe-190f-435f-a04b-52a4e63a2f0e</guid><dc:creator>Paul</dc:creator><description>&lt;p&gt;Hello Simon,&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t solved this but I did implement a workaround that helps in this case.&amp;nbsp; I replaced the flash_area_open() call with this code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    static const struct flash_area fake_area =
    {
        .fa_id = DT_FLASH_AREA_LOG_ID,
        .fa_off = DT_FLASH_AREA_LOG_OFFSET,
        .fa_size = DT_FLASH_AREA_LOG_SIZE,
        .fa_dev_name = DT_JEDEC_SPI_NOR_0_LABEL,        /* MX25R64 */
    };

    flash_area = &amp;amp;fake_area;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and the remainder of the flash area routines, like flash_area_erase, flash_area_read, etc. were able to use this &amp;quot;flash_area&amp;quot; to run.&lt;/p&gt;
&lt;p&gt;This works in my specific case, but I&amp;#39;m not sure if it would be applicable in other cases.&lt;/p&gt;
&lt;p&gt;Thanks for the update,&lt;/p&gt;
&lt;p&gt;-paul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating partitions on external SPI flash</title><link>https://devzone.nordicsemi.com/thread/217266?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2019 09:14:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43ca10cd-dfa8-4175-a092-f35900ccfad5</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;How is it going? Have you been able to solve this? I have been quite busy the last days and have not been able to make any progress on your issue, my apologies for that. I will look into it the next couple of days.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating partitions on external SPI flash</title><link>https://devzone.nordicsemi.com/thread/216309?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2019 08:42:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab0081b3-11d9-401e-ae17-de10aaf54e47</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Thank you, I will take a look at it and try to recreate your error.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating partitions on external SPI flash</title><link>https://devzone.nordicsemi.com/thread/216240?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2019 20:07:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcbb2c8f-620b-4778-99f5-57609a8c08fc</guid><dc:creator>Paul</dc:creator><description>&lt;p&gt;I was able to create a small test case that shows the issue that I am having with the partitions.&amp;nbsp; The test case has a overlay file for the 9160 DK that adds an external flash on SPI3.&amp;nbsp; The external flash has two partitions, and the code in main.c attempts to open one of these areas with the &amp;quot;flash_area_open&amp;quot; routine.&lt;/p&gt;
&lt;p&gt;The console shows:&lt;/p&gt;
&lt;p&gt;uart:~$ ***** Booting Zephyr OS v1.14.99-ncs2-3-gf91b3336b61f *****&lt;br /&gt;Flash LOG failed to open (ret = -2)&lt;/p&gt;
&lt;p&gt;The -2 return is ENOENT, which is returned from flash_area_open when the id value is not found in the list of flash areas.&lt;/p&gt;
&lt;p&gt;I can see the partition information is making it into the generated files (i.e. build/zephyr/include/generated/generated_dts_board_unfixed.h) but because the USE_PARTITION_MANAGER value is set to 1 by the compilation environment, the code in the zephyr/subsys/storage/flash_map/flash_map_default.c looks for PM_* defines instead of DT_FLASH_AREA_* defines.&amp;nbsp; These are coming from the generated &amp;quot;pm_config.h&amp;quot; file which only contains two partitions for SPM.&lt;/p&gt;
&lt;p&gt;I have attached a small tar file with the files.&amp;nbsp; I build it from the directory above src with the following steps:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;rm -rf build; mkdir build; cd build
cmake -GNinja -DBOARD=nrf9160_pca10090ns ..
ninja
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the help,&lt;/p&gt;
&lt;p&gt;-paul&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8420.testcase.tgz"&gt;devzone.nordicsemi.com/.../8420.testcase.tgz&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating partitions on external SPI flash</title><link>https://devzone.nordicsemi.com/thread/215443?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2019 09:05:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d96a65a-1cb6-4d54-aa76-4fc00229bed0</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Could you&amp;nbsp;share the overlay file, src/main.c, prj.conf and the other files necessary files in order to recreate your behavior. I can make the case private if you would like to.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>