<?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>Problem executing simple program on Thingy91</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/121595/problem-executing-simple-program-on-thingy91</link><description>Hello, 
 I recently acquired a Thingy91 board in order to make a hardware prototype. I already have experience developing with the nRF52840 so I took inspiration from my working project. 
 First I flashed the straight out &amp;quot;Hello World&amp;quot; sample from the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 23 Jun 2025 07:57:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/121595/problem-executing-simple-program-on-thingy91" /><item><title>RE: Problem executing simple program on Thingy91</title><link>https://devzone.nordicsemi.com/thread/540148?ContentTypeID=1</link><pubDate>Mon, 23 Jun 2025 07:57:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33c2aa79-530f-4f7b-ac24-c9d9b944c415</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello, sorry for the delayed answer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think looking at the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-3.0.2/page/nrf/scripts/partition_manager/partition_manager.html"&gt;Partition manager documentation&lt;/a&gt;&amp;nbsp;and &lt;a href="https://docs.nordicsemi.com/bundle/ncs-3.0.2/page/nrf/security/tfm/tfm_building.html"&gt;Building and configuring TF-M &lt;/a&gt;should provide some information on the misc. partitions, as most of this is handled in the build system and the partition manager script.&lt;/p&gt;
&lt;p&gt;There is no good explanation on&amp;nbsp;what does empty_0 mean in pm_static? But from our&amp;nbsp;Nordic Semiconductor AI it states:&lt;/p&gt;
&lt;div&gt;
&lt;blockquote&gt;
&lt;div&gt;In the context of Nordic Semiconductor&amp;#39;s nRF Connect SDK and Partition Manager, an&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;EMPTY_0&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;partition in a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;pm_static.yml&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;file (or in the generated partition map) represents an unallocated or unused region of flash memory. These &amp;quot;EMPTY&amp;quot; partitions are automatically created by the Partition Manager to fill gaps between other defined partitions, often due to alignment requirements or reserved space.&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Key points about&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;EMPTY_0&lt;/code&gt;:&lt;/strong&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;&lt;span&gt;It is a placeholder for unused flash space.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span&gt;Its presence is often due to alignment constraints (e.g., partitions needing to start at specific boundaries).&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span&gt;You can rename&amp;nbsp;&lt;code dir="ltr"&gt;EMPTY_0&lt;/code&gt;&amp;nbsp;to something more descriptive (like&amp;nbsp;&lt;code dir="ltr"&gt;app_data&lt;/code&gt;) if you want to use that space for your own data storage.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span&gt;If you want to ensure this region remains available and does not move due to future configuration changes, you should lock down your memory layout by using a static partition configuration (&lt;code dir="ltr"&gt;pm_static.yml&lt;/code&gt;) copied from your build&amp;#39;s&amp;nbsp;&lt;code dir="ltr"&gt;partitions.yml&lt;/code&gt;&amp;nbsp;file.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span&gt;The address and size of&amp;nbsp;&lt;code dir="ltr"&gt;EMPTY_0&lt;/code&gt;&amp;nbsp;can be found programmatically using symbols defined in&amp;nbsp;&lt;code dir="ltr"&gt;pm_config.h&lt;/code&gt;&amp;nbsp;(included with&amp;nbsp;&lt;code dir="ltr"&gt;#include &amp;lt;pm_config.h&amp;gt;&lt;/code&gt;).&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;For example, as explained by a Nordic engineer:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;You can also change the &amp;#39;EMPTY_0&amp;#39; name in your pm_static file to a more descriptive name, such as &amp;#39;app_data&amp;#39;. The size and address of this partition can be found programmatically using the symbols defined in pm_config.h (included with #include &amp;lt;pm_config.h&amp;gt;)&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/112974/write-user-data-to-nvm" rel="noopener noreferrer" target="_blank"&gt;Write user data to NVM&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;And from the official documentation:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;There can only be one unoccupied gap per region.&lt;br /&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/scripts/partition_manager/partition_manager.html#configuring_static_partitions" rel="noopener noreferrer" target="_blank"&gt;Configuring static partitions&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;In summary,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;EMPTY_0&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is simply a label for unused flash space, and you are free to repurpose it as needed in your application.&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem executing simple program on Thingy91</title><link>https://devzone.nordicsemi.com/thread/538101?ContentTypeID=1</link><pubDate>Wed, 04 Jun 2025 15:06:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:716f10e9-a267-4ac4-be2e-ce13cc5e04ea</guid><dc:creator>AdBee</dc:creator><description>&lt;p&gt;I solved my problem by moving my &amp;quot;user_partition&amp;quot; to the &amp;quot;nonsecure_storage&amp;quot; sector. My partition now looks like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  flash_primary (0x100000 - 1024kB): 
+-------------------------------------------------+
| 0x0: mcuboot (0xc000 - 48kB)                    |
+---0xc000: mcuboot_primary (0x69000 - 420kB)-----+
+---0xc000: tfm_secure (0xc000 - 48kB)------------+
| 0xc000: mcuboot_pad (0x200 - 512B)              |
+---0xc200: mcuboot_primary_app (0x68e00 - 419kB)-+
| 0xc200: tfm (0xbe00 - 47kB)                     |
+---0x18000: tfm_nonsecure (0x5b000 - 364kB)------+
| 0x18000: app (0x50000 - 320kB)                  |
| 0x68000: nvs_storage (0x6000 - 24kB)            |
| 0x75000: mcuboot_secondary (0x69000 - 420kB)    |
| 0xde000: EMPTY_0 (0x2000 - 8kB)                 |
+---0xe0000: nonsecure_storage (0x20000 - 128kB)--+
| 0xe0000: user_partition (0x1e000 - 120kB)       |
| 0xfe000: settings_storage (0x2000 - 8kB)        |
+-------------------------------------------------+

  otp (0x2f4 - 756B): 
+------------------------------+
| 0xff8108: otp (0x2f4 - 756B) |
+------------------------------+

  sram_primary (0x40000 - 256kB): 
+--------------------------------------------------+
+---0x20000000: mcuboot_sram (0x8000 - 32kB)-------+
+---0x20000000: sram_secure (0x8000 - 32kB)--------+
| 0x20000000: tfm_sram (0x8000 - 32kB)             |
+---0x20008000: sram_nonsecure (0x38000 - 224kB)---+
+---0x20008000: nrf_modem_lib_sram (0x4568 - 17kB)-+
| 0x20008000: nrf_modem_lib_ctrl (0x4e8 - 1kB)     |
| 0x200084e8: nrf_modem_lib_tx (0x2080 - 8kB)      |
| 0x2000a568: nrf_modem_lib_rx (0x2000 - 8kB)      |
+--------------------------------------------------+
| 0x2000c568: sram_primary (0x33a98 - 206kB)       |
+--------------------------------------------------+&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am still a bit confused about some partitions though, could you explain them to me ?&lt;/p&gt;
&lt;p&gt;First I&amp;#39;d like to know why there is a &amp;quot;nvs_storage&amp;quot; partition which appeared in the tfm_nonsecure sector. I didn&amp;#39;t explicitly requested this, and this is not the partition that is being mounted on my system (it is &amp;quot;user_partition&amp;quot; which works fine).&lt;/p&gt;
&lt;p&gt;Secondly I&amp;#39;d like to know what the EMPTY_0 partition is for. This partition is set by default in the partitions.pm file so I kept it in my custom pm_static.yml file, but I&amp;#39;d like to why it&amp;#39;s there.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is my &lt;strong&gt;pm_static.yml&lt;/strong&gt; file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;app: {address: 0x18000, size: 0x5b000}
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
  size: 0x69000
  span: [tfm, mcuboot_pad, app]
mcuboot_primary_app:
  address: 0xc200
  size: 0x68e00
  span: [app, tfm]
mcuboot_secondary:
  address: 0x75000
  placement:
    after: [mcuboot_primary]
    align: {start: 0x1000}
  share_size: [mcuboot_primary]
  size: 0x69000
EMPTY_0:
  address: 0xde000
  size: 0x2000
user_partition:
  address: 0xe0000
  placement:
    after: [EMPTY_0]
    align: {start: 0x1000}
  size: 0x1e000
settings_storage:
  address: 0xfe000
  placement:
    after: [user_partition]
  size: 0x2000
nonsecure_storage:
  address: 0xe0000
  size: 0x20000
  span: [user_partition, settings_storage]
tfm_secure:
  address: 0xc000
  size: 0xc000
  span: [mcuboot_pad, tfm]
tfm_nonsecure:
  address: 0x18000
  size: 0x5b000
  span: [app]
tfm:
  address: 0xc200
  size: 0xbe00

mcuboot_sram:
  address: 0x20000000
  end_address: 0x20008000
  orig_span: &amp;amp;id001
  - tfm_sram
  region: sram_primary
  size: 0x8000
  span: *id001
sram_secure:
  address: 0x20000000
  end_address: 0x20008000
  orig_span: &amp;amp;id004
  - tfm_sram
  region: sram_primary
  size: 0x8000
  span: *id004
tfm_sram:
  address: 0x20000000
  end_address: 0x20008000
  inside:
  - sram_secure
  placement:
    after:
    - start
  region: sram_primary
  size: 0x8000
sram_nonsecure:
  address: 0x20008000
  end_address: 0x20040000
  orig_span: &amp;amp;id003
  - sram_primary
  - nrf_modem_lib_ctrl
  - nrf_modem_lib_tx
  - nrf_modem_lib_rx
  region: sram_primary
  size: 0x38000
  span: *id003
nrf_modem_lib_sram:
  address: 0x20008000
  end_address: 0x2000c568
  orig_span: &amp;amp;id002
  - nrf_modem_lib_ctrl
  - nrf_modem_lib_tx
  - nrf_modem_lib_rx
  region: sram_primary
  size: 0x4568
  span: *id002
nrf_modem_lib_ctrl:
  address: 0x20008000
  end_address: 0x200084e8
  inside:
  - sram_nonsecure
  placement:
    after:
    - tfm_sram
    - start
  region: sram_primary
  size: 0x4e8
nrf_modem_lib_tx:
  address: 0x200084e8
  end_address: 0x2000a568
  inside:
  - sram_nonsecure
  placement:
    after:
    - nrf_modem_lib_ctrl
  region: sram_primary
  size: 0x2080
nrf_modem_lib_rx:
  address: 0x2000a568
  end_address: 0x2000c568
  inside:
  - sram_nonsecure
  placement:
    after:
    - nrf_modem_lib_tx
  region: sram_primary
  size: 0x2000
sram_primary:
  address: 0x2000c568
  end_address: 0x20040000
  region: sram_primary
  size: 0x33a98&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Relevant &lt;strong&gt;prj.conf&lt;/strong&gt; configurations:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;AdBee&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem executing simple program on Thingy91</title><link>https://devzone.nordicsemi.com/thread/538044?ContentTypeID=1</link><pubDate>Wed, 04 Jun 2025 12:17:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7e89c3e-bf6b-4825-8916-94f4f372ab31</guid><dc:creator>AdBee</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Did you set&amp;nbsp;&lt;span&gt;&lt;code&gt;CONFIG_THINGY91_STATIC_PARTITIONS_FACTORY=n&lt;/code&gt; along with&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span&gt;CONFIG_THINGY91_NO_PREDEFINED_LAYOUT&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&lt;code&gt;y&lt;/code&gt;?&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span&gt;I didn&amp;#39;t indeed. Doing this seems to have troubleshot the problem, thank you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Running&amp;nbsp; &lt;code&gt;west build -t partition_manager_report&lt;/code&gt; gets me:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;flash_primary (0x100000 - 1024kB): 
+-------------------------------------------------+
| 0x0: mcuboot (0xc000 - 48kB)                    |
+---0xc000: mcuboot_primary (0x69000 - 420kB)-----+
+---0xc000: tfm_secure (0xc000 - 48kB)------------+
| 0xc000: mcuboot_pad (0x200 - 512B)              |
+---0xc200: mcuboot_primary_app (0x68e00 - 419kB)-+
| 0xc200: tfm (0xbe00 - 47kB)                     |
| 0x18000: app (0x5d000 - 372kB)                  |
+---0x18000: tfm_nonsecure (0x5b000 - 364kB)------+
| 0x75000: mcuboot_secondary (0x69000 - 420kB)    |
| 0xde000: user_partition (0x1e000 - 120kB)       |
| 0xfc000: EMPTY_0 (0x2000 - 8kB)                 |
+---0xfe000: nonsecure_storage (0x2000 - 8kB)-----+
| 0xfe000: settings_storage (0x2000 - 8kB)        |
+-------------------------------------------------+

  otp (0x2f4 - 756B): 
+------------------------------+
| 0xff8108: otp (0x2f4 - 756B) |
+------------------------------+

  sram_primary (0x40000 - 256kB): 
+--------------------------------------------------+
+---0x20000000: mcuboot_sram (0x8000 - 32kB)-------+
+---0x20000000: sram_secure (0x8000 - 32kB)--------+
| 0x20000000: tfm_sram (0x8000 - 32kB)             |
+---0x20008000: sram_nonsecure (0x38000 - 224kB)---+
+---0x20008000: nrf_modem_lib_sram (0x4568 - 17kB)-+
| 0x20008000: nrf_modem_lib_ctrl (0x4e8 - 1kB)     |
| 0x200084e8: nrf_modem_lib_tx (0x2080 - 8kB)      |
| 0x2000a568: nrf_modem_lib_rx (0x2000 - 8kB)      |
+--------------------------------------------------+
| 0x2000c568: sram_primary (0x33a98 - 206kB)       |
+--------------------------------------------------+&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;At heart, I took the default partitions and added a custom one for NVS that I called &amp;quot;user_partition&amp;quot;. Since a scratch partition for MCUBOOT shouldn&amp;#39;t be absolutely needed depending on the FOTA swap policy, I decided to remove it to make room for &amp;quot;user_partition&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m now getting this error at runtime when trying to mount the NVS partition:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:00.391,296] &amp;lt;err&amp;gt; os: ***** SECURE FAULT *****
[00:00:00.397,033] &amp;lt;err&amp;gt; os:   Address: 0xe0ff8
[00:00:00.402,313] &amp;lt;err&amp;gt; os:   Attribution unit violation
[00:00:00.408,477] &amp;lt;err&amp;gt; os: r0/a1:  0x20011518  r1/a2:  0x000e0ff8  r2/a3:  0x000e1000
[00:00:00.417,236] &amp;lt;err&amp;gt; os: r3/a4:  0x20011517 r12/ip:  0x0001cad5 r14/lr:  0x0001cb23
[00:00:00.425,994] &amp;lt;err&amp;gt; os:  xpsr:  0x81000000
[00:00:00.431,274] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x0002de86
[00:00:00.439,239] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 41: Unknown error on CPU 0
[00:00:00.447,204] &amp;lt;err&amp;gt; os: Current thread: 0x2000d318 (unknown)
[00:00:00.454,040] &amp;lt;err&amp;gt; os: Halting system&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;which is pretty explicit about me violating the NS and/or trusted Firmware setup. Since I&amp;#39;m not very familiar with the concept, I am currently going through the documentation to see how I could fix this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Have a good day.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem executing simple program on Thingy91</title><link>https://devzone.nordicsemi.com/thread/537744?ContentTypeID=1</link><pubDate>Mon, 02 Jun 2025 20:13:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7478ff55-582a-4516-8864-9856a6fad154</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello AdBee,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My apologies for the late reply.&amp;nbsp;&lt;/p&gt;
[quote user="AdBee"]I don&amp;#39;t think there is a sample to demonstrate this functionnality, or at least I didn&amp;#39;t find it.[/quote]
&lt;p&gt;No, there is no specific sample for this, but if you look at the samples that are using e.g.&amp;nbsp;nrf_modem_at_printf() they will show the correct way to include the files.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;This is due to the build system and how CMakeLists.txt work in the background, removing parts of the path when found in a &amp;quot;include&amp;quot; folder. That said, the documentation for the AT commands should show how to use the AT commands.&lt;/p&gt;
[quote user="AdBee"]Then&amp;nbsp; tried to put a custom pm_static.yml file in my project directory, and following your doc I put[/quote]
&lt;p&gt;Did you set&amp;nbsp;&lt;span&gt;&lt;code&gt;CONFIG_THINGY91_STATIC_PARTITIONS_FACTORY=n&lt;/code&gt; along with&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span&gt;CONFIG_THINGY91_NO_PREDEFINED_LAYOUT&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&lt;code&gt;y&lt;/code&gt;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you share your pm_static file?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem executing simple program on Thingy91</title><link>https://devzone.nordicsemi.com/thread/537313?ContentTypeID=1</link><pubDate>Wed, 28 May 2025 08:28:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68d75137-9cc0-4e60-8774-8237e60aae6b</guid><dc:creator>AdBee</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have been trying to implement a custom static partition following your leads, but with no success.&lt;/p&gt;
&lt;p&gt;First I ran &lt;code&gt;west build -t partition_manager_report&lt;/code&gt; with the default thingy/nrf9160/ns board:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  flash_primary (0x100000 - 1024kB): 
+-------------------------------------------------+
| 0x0: mcuboot (0xc000 - 48kB)                    |
+---0xc000: mcuboot_primary (0x69000 - 420kB)-----+
+---0xc000: tfm_secure (0xc000 - 48kB)------------+
| 0xc000: mcuboot_pad (0x200 - 512B)              |
+---0xc200: mcuboot_primary_app (0x68e00 - 419kB)-+
| 0xc200: tfm (0xbe00 - 47kB)                     |
| 0x18000: app (0x5d000 - 372kB)                  |
+---0x18000: tfm_nonsecure (0x5b000 - 364kB)------+
| 0x75000: mcuboot_secondary (0x69000 - 420kB)    |
| 0xde000: mcuboot_scratch (0x1e000 - 120kB)      |
| 0xfc000: EMPTY_0 (0x2000 - 8kB)                 |
+---0xfe000: nonsecure_storage (0x2000 - 8kB)-----+
| 0xfe000: settings_storage (0x2000 - 8kB)        |
+-------------------------------------------------+

  otp (0x2f4 - 756B): 
+------------------------------+
| 0xff8108: otp (0x2f4 - 756B) |
+------------------------------+

  sram_primary (0x40000 - 256kB): 
+--------------------------------------------------+
+---0x20000000: mcuboot_sram (0x8000 - 32kB)-------+
+---0x20000000: sram_secure (0x8000 - 32kB)--------+
| 0x20000000: tfm_sram (0x8000 - 32kB)             |
+---0x20008000: sram_nonsecure (0x38000 - 224kB)---+
+---0x20008000: nrf_modem_lib_sram (0x4568 - 17kB)-+
| 0x20008000: nrf_modem_lib_ctrl (0x4e8 - 1kB)     |
| 0x200084e8: nrf_modem_lib_tx (0x2080 - 8kB)      |
| 0x2000a568: nrf_modem_lib_rx (0x2000 - 8kB)      |
+--------------------------------------------------+
| 0x2000c568: sram_primary (0x33a98 - 206kB)       |
+--------------------------------------------------+&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So far so good.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then&amp;nbsp; tried to put a custom pm_static.yml file in my project directory, and following your doc I put&lt;/p&gt;
&lt;div style="background-color:#1c2433;color:#d0d7e4;font-family:&amp;#39;CommitMono Nerd Font Mono&amp;#39;, Consolas, &amp;#39;Courier New&amp;#39;, monospace, &amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#eacd61;"&gt;CONFIG_THINGY91_NO_PREDEFINED_LAYOUT&lt;/span&gt;&lt;span style="color:#d0d7e4;"&gt;=&lt;/span&gt;&lt;span style="color:#afbbd2;"&gt;y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;in my prj.conf file.&lt;/p&gt;
&lt;p&gt;Running again &lt;code&gt;west build -t partition_manager_report&lt;/code&gt;, I found the exact same result than previously, meaning that my pm_static.yml file was not taken into account.&lt;/p&gt;
&lt;p&gt;I tried to move&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="background-color:#1c2433;color:#d0d7e4;font-family:&amp;#39;CommitMono Nerd Font Mono&amp;#39;, Consolas, &amp;#39;Courier New&amp;#39;, monospace, &amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#eacd61;"&gt;CONFIG_THINGY91_NO_PREDEFINED_LAYOUT&lt;/span&gt;&lt;span style="color:#d0d7e4;"&gt;=&lt;/span&gt;&lt;span style="color:#afbbd2;"&gt;y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;to my sysbuild/mcuboot.conf file with no greater success.&lt;/p&gt;
&lt;p&gt;I also added&lt;/p&gt;
&lt;div style="background-color:#1c2433;color:#d0d7e4;font-family:&amp;#39;CommitMono Nerd Font Mono&amp;#39;, Consolas, &amp;#39;Courier New&amp;#39;, monospace, &amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#eacd61;"&gt;SB_CONFIG_PARTITION_MANAGER&lt;/span&gt;&lt;span style="color:#d0d7e4;"&gt;=&lt;/span&gt;&lt;span style="color:#afbbd2;"&gt;y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;to my sysbuild.conf file which didn&amp;#39;t help.&lt;/p&gt;
&lt;p&gt;Lastly, I tried to switch the board from thingy91/nrf9160/ns to thingy91/nrf9160 but at this point the project didn&amp;#39;t even compile (the &amp;lt;nrf_modem.h&amp;gt; library that I referenced for AT commands was not found)&lt;/p&gt;
&lt;p&gt;What am I supposed to do ?&lt;/p&gt;
&lt;p&gt;Ty,&lt;/p&gt;
&lt;p&gt;AdBee&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem executing simple program on Thingy91</title><link>https://devzone.nordicsemi.com/thread/537079?ContentTypeID=1</link><pubDate>Tue, 27 May 2025 08:11:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff66408b-a4f0-4ba8-ae48-263a399f56c0</guid><dc:creator>AdBee</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;Yes, I see what you man, which can be somewhat confusing. The best way is often to look at our samples in our SDK, but of course the documentation should reflect the code base. I will report internally.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I don&amp;#39;t think there is a sample to demonstrate this functionnality, or at least I didn&amp;#39;t find it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Have you successfully been able to send AT commands programmatically?&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes with the &lt;code&gt;nrf_modem_at_printf()&lt;/code&gt; function and the correct include it appears to work.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The only remaining question I have is about the absence of early logs. I assume it is because the hook that redirects outputs from the nRF9160 to the nRF52840 serial is set after some delay rather than at program start. Correct ?&lt;/p&gt;
&lt;p&gt;Thank you for your support,&lt;/p&gt;
&lt;p&gt;AdBee&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem executing simple program on Thingy91</title><link>https://devzone.nordicsemi.com/thread/536993?ContentTypeID=1</link><pubDate>Mon, 26 May 2025 15:33:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b35eb8d0-6d6a-4fc0-8124-1d5d552fe27e</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello, my apologies for the late reply.&amp;nbsp;&lt;/p&gt;
[quote user="AdBee"] The correct way to import it is to call &lt;code&gt;#include &amp;lt;nrf_model_at.h&amp;gt;&lt;/code&gt;. I would suggest updating &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_modem/doc/at_interface.html"&gt;this doc&lt;/a&gt; and &lt;a href="https://docs.nordicsemi.com/bundle/nrfxlib-apis-latest/page/group_nrf_modem_at_gadd01d7552e0195961396c374ecaa8c00.html#gadd01d7552e0195961396c374ecaa8c00"&gt;this one&lt;/a&gt; which are misleading about it.[/quote]
&lt;p&gt;Yes, I see what you man, which can be somewhat confusing. The best way is often to look at our samples in our SDK, but of course the documentation should reflect the code base. I will report internally.&lt;/p&gt;
[quote user="AdBee"]I am trying to interact with the LTE-M/GNSS module by using AT-commands.[/quote]
&lt;p&gt;Have you successfully been able to send AT commands programmatically?&amp;nbsp;&lt;/p&gt;
[quote user="AdBee"]&lt;p&gt;Does the existence of the later file means that pm_static files are not used by default, but only if configs such as &lt;code&gt;&lt;span&gt;CONFIG_THINGY91_STATIC_PARTITIONS_FACTORY&lt;/span&gt;&lt;/code&gt; are provided ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;The build system should pick up on the file automatically. Have a look at&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/scripts/partition_manager/partition_manager.html#configuring_static_partitions"&gt;Configuring static partitions in the partition manager.&lt;/a&gt;&amp;nbsp;This is a KConfig symbol&amp;nbsp;defined in&amp;nbsp;nrf/boards/nordic/thingy91/Kconfig&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
config THINGY91_STATIC_PARTITIONS_FACTORY
	bool &amp;quot;Factory Thingy:91 partition layout&amp;quot;
	help
	   The default Thingy:91 partition layout used in the factory firmware. This ensures
	   firmware updates are compatible with Thingy:91 when flashing firmware over USB or over
	   the air.&lt;/pre&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><item><title>RE: Problem executing simple program on Thingy91</title><link>https://devzone.nordicsemi.com/thread/536911?ContentTypeID=1</link><pubDate>Mon, 26 May 2025 11:03:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62b1d0cf-425c-44d9-afc1-48d7356a19a0</guid><dc:creator>AdBee</dc:creator><description>&lt;p&gt;Any update ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EDIT: With regard to my last question, I found out that the nrfxlib library is already compiled in the packaged v2.9.0 SDK (as &amp;quot;west list&amp;quot; reveals). The correct way to import it is to call &lt;code&gt;#include &amp;lt;nrf_model_at.h&amp;gt;&lt;/code&gt;. I would suggest updating &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_modem/doc/at_interface.html"&gt;this doc&lt;/a&gt; and &lt;a href="https://docs.nordicsemi.com/bundle/nrfxlib-apis-latest/page/group_nrf_modem_at_gadd01d7552e0195961396c374ecaa8c00.html#gadd01d7552e0195961396c374ecaa8c00"&gt;this one&lt;/a&gt; which are misleading about it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem executing simple program on Thingy91</title><link>https://devzone.nordicsemi.com/thread/536751?ContentTypeID=1</link><pubDate>Fri, 23 May 2025 10:20:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77515ed8-134d-422d-bbc1-3905be2c00d9</guid><dc:creator>AdBee</dc:creator><description>&lt;p&gt;I have an additional question.&lt;/p&gt;
&lt;p&gt;I am trying to interact with the LTE-M/GNSS module by using AT-commands.&lt;/p&gt;
&lt;p&gt;First I flashed the AT-Client module and verified that I could send AT command through the serial terminal.&lt;/p&gt;
&lt;p&gt;Now I am trying to send said AT-commands programmatically.&lt;/p&gt;
&lt;p&gt;Taking inspiration from the AT Client sample and &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_modem/doc/at_interface.html"&gt;this page&lt;/a&gt; here is what I have:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;modem/nrf_modem_lib.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;nrfxlib/nrf_modem/include/nrf_modem_at.h&amp;gt;
#include &amp;lt;zephyr/drivers/clock_control.h&amp;gt;
#include &amp;lt;zephyr/drivers/clock_control/nrf_clock_control.h&amp;gt;
#include &amp;lt;zephyr/drivers/uart.h&amp;gt;

/* To strictly comply with UART timing, enable external XTAL oscillator */
void enable_xtal(void) {
  struct onoff_manager *clk_mgr;
  static struct onoff_client cli = {};

  clk_mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_HF);
  sys_notify_init_spinwait(&amp;amp;cli.notify);
  (void)onoff_request(clk_mgr, &amp;amp;cli);
}

int main(void) {
  int err;

  printk(&amp;quot;The AT host sample started\n&amp;quot;);

  err = nrf_modem_lib_init();
  if (err) {
    printk(&amp;quot;Modem library initialization failed, error: %d\n&amp;quot;, err);
    return 0;
  }
  enable_xtal();
  printk(&amp;quot;Ready\n&amp;quot;);
  err = nrf_modem_at_printf(&amp;quot;AT+CFUN?&amp;quot;);
  printk(&amp;quot;%d\n&amp;quot;, err);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately I am having an error while linking the library:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/path/to/home/repos/sandbox/at_client_sample/src/main.c:12:10: fatal error: nrfxlib/nrf_modem/include/nrf_modem_at.h: No such file or directory
   12 | #include &amp;lt;nrfxlib/nrf_modem/include/nrf_modem_at.h&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am unfamiliar with the build pipeline in the nrf toolchain and how I am supposed to properly do this, but I assume I might as well compile the nrfxlib library myself and then reference it as an external library in the CMakeLists.txt. So I ran:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cd ~/ncs/v2.9.0/nrfxlib
cmake .&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And got:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CMake Error at CMakeLists.txt:14 (add_subdirectory_ifdef):
  Unknown CMake command &amp;quot;add_subdirectory_ifdef&amp;quot;.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Since the command was not recognized, I though my cmake version might be outdated, but from my googling &amp;quot;add_directory_ifdef&amp;quot; isn&amp;#39;t a native Cmake command but rather something defined by Zephyr/the NRF toolchain. I am a little puzzled at what to do. Any input ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem executing simple program on Thingy91</title><link>https://devzone.nordicsemi.com/thread/536122?ContentTypeID=1</link><pubDate>Tue, 20 May 2025 08:32:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ba67a32-283c-46f0-bc13-8f9b790d0237</guid><dc:creator>AdBee</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;Could you provide logs from the application of what you are describing? This does not sound correct. What program are you running on the device?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sure. I am running this very basic program which logs the version of the app and then logs &amp;quot;HI&amp;quot; forever.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/logging/log.h&amp;gt;
#include &amp;lt;zephyr/sys/printk.h&amp;gt;

#include &amp;quot;app_version.h&amp;quot;

LOG_MODULE_REGISTER(MAIN, CONFIG_APP_LOG_LEVEL);

int main(void) {
  k_sleep(K_MSEC(100));

  LOG_INF(&amp;quot;Hello World! %s\n&amp;quot;, CONFIG_BOARD_TARGET);
  LOG_INF(&amp;quot;START VERSION %s \n&amp;quot;, APP_VERSION_STRING);

  while (true) {
    k_sleep(K_MSEC(1000));
    LOG_INF(&amp;quot;HI \n&amp;quot;);
  }

  // Run forever
  k_sleep(K_FOREVER);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is what I see when I first flash the program:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting My Application v0.1.0-unstable-eaf0d677a29f ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
[00:00:00.370,269] &amp;lt;inf&amp;gt; MAIN: Hello World! thingy91/nrf9160/ns

[00:00:00.376,708] &amp;lt;inf&amp;gt; MAIN: START VERSION 0.1.0-unstable 

[00:00:01.383,026] &amp;lt;inf&amp;gt; MAIN: HI 

[00:00:02.386,993] &amp;lt;inf&amp;gt; MAIN: HI 

[00:00:03.390,960] &amp;lt;inf&amp;gt; MAIN: HI 

[00:00:04.394,927] &amp;lt;inf&amp;gt; MAIN: HI 

[00:00:05.398,895] &amp;lt;inf&amp;gt; MAIN: HI&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And this is what I see when I switch the device off/on:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:03:42.256,561] &amp;lt;inf&amp;gt; MAIN: HI 

[00:03:43.260,528] &amp;lt;inf&amp;gt; MAIN: HI 

    &amp;lt;-- Restart here 

[00:00:02.387,359] &amp;lt;inf&amp;gt; MAIN: HI 

[00:00:03.391,326] &amp;lt;inf&amp;gt; MAIN: HI 

[00:00:04.395,294] &amp;lt;inf&amp;gt; MAIN: HI&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In this version the early logs don&amp;#39;t print.&lt;/p&gt;
&lt;p&gt;Now I am aware that log printing cannot be trusted 100% since they are not processed by the main thread but by the one that runs the default work_queue. On occasions there may be some delay/some loss (though I have CONFIG_LOG_MODE_IMMEDIATE=y in my .conf file which should somehow help a little). Still I have never witnessed an absence of early logs with a program that simple and that runs on such a low frequency when working with my previous nRF52840 project. So I am a bit surprised here.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The Thingy:91 uses its own partition layout, have a look at&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/thingy91/thingy91_updating_fw_programmer.html#partition_layout"&gt;Partition layout&lt;/a&gt;. This uses e.g.&amp;nbsp;nrf\boards\nordic\thingy91\thingy91_pm_static_lwm2m_carrier.yml&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You could have a look at&amp;nbsp;&lt;code&gt;nrf\boards\nordic\thingy91\thingy91_nrf9160_partition_conf.dts&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;From my understanding, the pm_static files override the partitions that are defined in .dts files. Does the existence of the later file means that pm_static files are not used by default, but only if configs such as &lt;code class="xref kconfig kconfig-option docutils literal notranslate"&gt;&lt;span class="pre"&gt;CONFIG_THINGY91_STATIC_PARTITIONS_FACTORY&lt;/span&gt;&lt;/code&gt; are provided ?&lt;/p&gt;
&lt;p&gt;Say that I provide a custom pm_static file with &lt;code class="xref kconfig kconfig-option docutils literal notranslate"&gt;&lt;span class="pre"&gt;CONFIG_THINGY91_NO_PREDEFINED_LAYOUT&lt;/span&gt;&lt;/code&gt;. Since I am using an external programmer and not the USB, I can overwrite the whole partition (size 0x100000) safely, right ? Won&amp;#39;t this mess up the &amp;quot;connectivity bridge&amp;quot; that is deployed on the nRF52840 ? To what point does the &amp;quot;connectivity bridge&amp;quot; make assumptions about the partitions of the nRF9160 ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for your support,&lt;/p&gt;
&lt;p&gt;AdBee&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem executing simple program on Thingy91</title><link>https://devzone.nordicsemi.com/thread/536071?ContentTypeID=1</link><pubDate>Tue, 20 May 2025 06:00:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:236a3ee8-b271-444f-9934-83cd13d49671</guid><dc:creator>&amp;#216;yvind</dc:creator><description>[quote user="AdBee"]1/ When I switch off/on the device using the SW1 switch, my program doesn&amp;#39;t restart from scratch as expected, but rather seems to resume to where it was. How is it ? [/quote]
&lt;p&gt;Could you provide logs from the application of what you are describing? This does not sound correct. What program are you running on the device?&lt;/p&gt;
[quote user="AdBee"]How can I customize partitions in this environment ?[/quote]
&lt;p&gt;The Thingy:91 uses its own partition layout, have a look at&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/thingy91/thingy91_updating_fw_programmer.html#partition_layout"&gt;Partition layout&lt;/a&gt;. This uses e.g.&amp;nbsp;nrf\boards\nordic\thingy91\thingy91_pm_static_lwm2m_carrier.yml&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You could have a look at&amp;nbsp;&lt;code&gt;nrf\boards\nordic\thingy91\thingy91_nrf9160_partition_conf.dts&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Default Flash planning for thingy91_nrf9160.
 *
 * Zephyr build for nRF9160 with ARM TrustZone-M support,
 * implies building Secure and Non-Secure Zephyr images.
 *
 * Secure image will be placed, by default, in flash0
 * (or in slot0, if MCUboot is present).
 * Secure image will use sram0 for system memory.
 *
 * Non-Secure image will be placed in slot0_ns, and use
 * sram0_ns for system memory.
 *
 * Note that the Secure image only requires knowledge of
 * the beginning of the Non-Secure image (not its size).
 */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Let me know how that works for you.&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem executing simple program on Thingy91</title><link>https://devzone.nordicsemi.com/thread/535992?ContentTypeID=1</link><pubDate>Mon, 19 May 2025 12:39:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:951a3b91-138c-45ef-b7f5-54b7db3fadd2</guid><dc:creator>AdBee</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thank you for your fast reply.&lt;/p&gt;
&lt;p&gt;I think by using the &lt;code&gt;thingy91/nrf9160&lt;/code&gt; board instead of the &lt;code&gt;thingy/nrf9160/ns, &lt;/code&gt;I may have overwritten some useful default partitions.&lt;/p&gt;
&lt;p&gt;Following your link, I reinstalled all default images using the nRFConnect for Desktop, reflashed my own code with the &lt;code&gt;thingy/nrf9160/ns&lt;/code&gt; board and it appears that it solved my problem.&lt;/p&gt;
&lt;p&gt;I have further questions though:&lt;/p&gt;
&lt;p&gt;1/ When I switch off/on the device using the SW1 switch, my program doesn&amp;#39;t restart from scratch as expected, but rather seems to resume to where it was. How is it ? Is there a bootloader configuration that somehow saves PC and other registers ? Is it possible to change this behavior so that my program actually restarts at every power on ? It is unclear to me how the peripherals behave when their parameters are not explicitly set by my init functions.&lt;/p&gt;
&lt;p&gt;2/ With regards to the partitions: I am used to customize them in a pm_static file to enable features such as nvs or BLE settings. But with this &amp;quot;ns&amp;quot; setup it seems that a lot of things are done under the hood that I shouldn&amp;#39;t break. How can I customize partitions in this environment ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for your time,&lt;/p&gt;
&lt;p&gt;AdBee&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem executing simple program on Thingy91</title><link>https://devzone.nordicsemi.com/thread/535951?ContentTypeID=1</link><pubDate>Mon, 19 May 2025 10:45:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6aed099-67f8-40fc-8a7e-b203abc7af70</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The Nordic Thingy:91 USB connector is connected to the USB interface of the nRF52840 SoC. This enables PC communication and battery charging. The nRF52840 comes preprogrammed with the Connectivity Bridge application which&amp;nbsp;&lt;span&gt;&amp;nbsp;acts as a USB composite device, exposing two UART interfaces to a USB host as two CDC ACM devices.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Did you reprogram the nRF52840?&amp;nbsp;&lt;/strong&gt;&lt;em&gt;&lt;/em&gt;I.e. build for &lt;code&gt;thingy91/nrf52840&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also, I see that you are building you project for the &lt;code&gt;thingy91/nrf9160&lt;/code&gt; and not the &lt;code&gt;thingy91/nrf9160/ns&lt;/code&gt;. The latter is needed in order to communicate with the nRF91 modem from the application core. &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/thingy91/index.html"&gt;See Developing with the Thingy:91 for more information&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>