<?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>What address to manually flash zephyr and application?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52329/what-address-to-manually-flash-zephyr-and-application</link><description>Hi, 
 Is it possible for me to manually flash the zephyr.bin on the nrf9160 located in proj/build/zephr/? I can flash the merge.hex however I do not want to use the merge.hex, I want to flash just the zephyr.bin, but I&amp;#39;m not sure what address is the zephyr</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Oct 2019 08:38:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52329/what-address-to-manually-flash-zephyr-and-application" /><item><title>RE: What address to manually flash zephyr and application?</title><link>https://devzone.nordicsemi.com/thread/216304?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2019 08:38:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc106fda-d8e3-40b0-b59e-be2ba5b6954a</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;The SPM does not do any kind of validation. Take a look at the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/readme-zephyr.html"&gt;MCUboot&lt;/a&gt;, which allows you to validate&amp;nbsp;the application.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;
&lt;div style="left:537px;top:22.6px;"&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What address to manually flash zephyr and application?</title><link>https://devzone.nordicsemi.com/thread/216222?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2019 15:59:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2591fbd5-eeb3-4520-8e15-d09dba961c1b</guid><dc:creator>raymond.zhang</dc:creator><description>&lt;p&gt;&lt;span&gt;When you say &amp;quot;The SPM sample does not perform any validation of the application image.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Does this include the Zephyr RTOS as well? For example, if I&amp;nbsp;modify and flash the Zephyr image, the SPM would not detect any kind of change on there?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I also read the two links you provided and regarding the secure environment, will that be able to do the validation?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When you said &amp;quot;....run a non-secure application (which is required if you are going to use the modem). &amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Does this also includes Zephyr not being secure as well?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What address to manually flash zephyr and application?</title><link>https://devzone.nordicsemi.com/thread/216175?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2019 12:44:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcc7b2e0-9a59-434f-a75b-3936266e71d3</guid><dc:creator>Simon</dc:creator><description>[quote user="raymond.zhang"]Can you provide any background information on how the SPM works?[/quote]
&lt;p&gt;Read about the&lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/spm.html#lib-spm"&gt; SPM library&lt;/a&gt; and the &lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/spm/README.html"&gt;SPM sample&lt;/a&gt; in the NCS documentation. Also take a look at the section &lt;a href="https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/getting-started-cellular/posts/nrf-connect-sdk-tutorial#h100sjwm551634uoal2fr9zwynnptkq"&gt;1.6 Secure vs. nonsecure&lt;/a&gt; in the nRF Connect SDK tutorial.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="raymond.zhang"]I am trying to determine whether the SPM is validating the application image and zephyr image upon booting[/quote]
&lt;p&gt;The SPM sample does not perform any validation of the application image. All it does is to set up the nRF9160 such that it can run a non-secure application (which is required if you are going to use the modem).&amp;nbsp;Also, it includes a function for jumping to the non-secure partition.&lt;/p&gt;
&lt;p&gt;&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: What address to manually flash zephyr and application?</title><link>https://devzone.nordicsemi.com/thread/216027?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2019 00:24:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:190691b6-9469-4263-bf2c-14f85186b562</guid><dc:creator>raymond.zhang</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;I tried your suggestion on following that thread to flash the SPM image and application image separately. I disabled the setting CONFIG_SPM and rebuilt my application. When I flashed onto the chip, I am still seeing that it&amp;#39;s booting to the application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What I&amp;#39;m trying to test here is the secure boot aka Secure Partition Manager. Can you provide any background information on how the SPM works? I am trying to determine whether the SPM is validating the application image and zephyr image upon booting so my test was to modify the application or zephyr in a way where the SPM would detect that the application or os failed the security check (e.g. hash or checksum). Correct me if I&amp;#39;m wrong if I misunderstood anything.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Raymond&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What address to manually flash zephyr and application?</title><link>https://devzone.nordicsemi.com/thread/211870?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2019 14:02:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2886c740-e0d2-4622-b946-fb07fa9baa06</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;First I would like to clear up some different things.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The merged.hex file consists of two files
&lt;ul&gt;
&lt;li&gt;The SPM zephyr image (ncs\nrf\samples\nrf9160\&amp;lt;your_project&amp;gt; \build_nrf9160_pca10090ns\spm\zephyr\zephyr.hex)&lt;/li&gt;
&lt;li&gt;The application zephyr image (ncs\nrf\samples\nrf9160\&amp;lt;your_project&amp;gt;\build_nrf9160_pca10090ns\zephyr\zephyr.hex)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The application zephyr image (zephyr.hex) is the result of linking together a lot of static libraries and different files, and libapp.a is the library that contains all the source files (.c) in the src folder (often only main.c). The end result is a zephyr.hex file, which includes a zephyr kernel at the bottom, controlling everything.&lt;/li&gt;
&lt;/ul&gt;
[quote user=""]Is it possible for me to manually flash the zephyr.bin on the nrf9160 located in proj/build/zephr/? I can flash the merge.hex however I do not want to use the merge.hex, I want to flash just the zephyr.bin, but I&amp;#39;m not sure what address is the zephyr image stored at?[/quote]
&lt;p&gt;Take a look at &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/46787/application-won-t-run---erroneous-flash-address-range"&gt;this thread&lt;/a&gt;, which explains how to flash the SPM image and the application image separately. You simply set CONFIG_SPM=n in prj.conf, then you build and flash the non-secure application onto the chip. Next, you build and program the SPM sample (ncs\nrf\samples\nrf9160\spm) as secure, and flash it onto the chip as well.&lt;/p&gt;
&lt;p&gt;I tried both of these approaches. When I programmed the merged.hex, the image was located at 0xC000 and when I programmed them separately the application image was located at 0x40000.&lt;/p&gt;
&lt;p&gt;You can use the configs CONFIG_BUILD_OUPUT_HEX and CONFIG_BUILD_OUPUT_BIN to enable building of .bin and .exe files. See ncs\zephyr\Kconfig.zephyr for other possibilites.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]Also I want to flash the application as well however the application which is located in proj/build/app/libapp.a is not in a format that is binary or hex which is what SES can flash. If I can convert this to binary or hex, would I be able to flash this too onto the nrf9160?[/quote]
&lt;p&gt;I am not sure if this is what you mean, or if you are mixing it with spm/application. I am sure it is possible to separate the libapp.a from zephy.hex, and I can look into it 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>