<?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>NRF9160 Memory partition</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50155/nrf9160-memory-partition</link><description>Hello guys, 
 I wanted try run on NRF9160 hardware CC310 cryptographic module. 
 I installed all software and tried run secure_services demo. Thats works, cool! 
 In next step I tried run RSA cryptographic fuctions. I found example in downloaded folders</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Jul 2019 15:21:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50155/nrf9160-memory-partition" /><item><title>RE: NRF9160 Memory partition</title><link>https://devzone.nordicsemi.com/thread/200584?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 15:21:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14b0c9b0-7d33-43c7-8044-80b72dc0a5ea</guid><dc:creator>DenisAks</dc:creator><description>&lt;p&gt;ok, thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Memory partition</title><link>https://devzone.nordicsemi.com/thread/200577?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 14:33:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:055574e0-22b5-4729-a885-c4836c33b5de</guid><dc:creator>MJD093</dc:creator><description>&lt;p&gt;That&amp;#39;s a question for Nordic as I honestly wouldn&amp;#39;t know. At least you have been able to build the application and flash it &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Memory partition</title><link>https://devzone.nordicsemi.com/thread/200576?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 14:30:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83e74884-af41-466e-90dd-8e05be80a882</guid><dc:creator>MJD093</dc:creator><description>&lt;p&gt;I have changed my value in this definition to 0x12000 as well and the application runs correctly with the new partition size of 72KB.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[177/319] Linking C executable spm/zephyr/spm_zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:         32 KB        72 KB     44.44%
            SRAM:       10000 B        64 KB     15.26%
        IDT_LIST:          40 B         2 KB      1.95%&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So the issue was with the size of flash allocated to MCUBoot, which is strange as that should have been the partition covered under boot_partition. I tried changing that value yesterday and it had no effect on the outcome.&lt;/p&gt;
&lt;p&gt;From Zephyr documentation:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;boot_partition&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is the partition where the bootloader is expected to be placed. MCUboot&amp;rsquo;s build system will attempt to link the MCUboot image into this partition.&lt;/p&gt;
&lt;p&gt;I guess it doesn&amp;#39;t actually do that and uses this define to set up and partition seperate from the rest of the flash memory. It then links to slot0_partition where the applications secure image is placed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Memory partition</title><link>https://devzone.nordicsemi.com/thread/200575?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 14:28:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4050aca3-bde4-46ca-90e9-a47b35a33d21</guid><dc:creator>DenisAks</dc:creator><description>&lt;p&gt;Thanks for your help.&lt;/p&gt;
&lt;p&gt;Very many things have become clear.&lt;/p&gt;
&lt;p&gt;Now I need run and check how works CC310 crypto module.&lt;/p&gt;
&lt;p&gt;I wanted start it from RSA key generation. I have a question can I use debugger in secure memory? And why I had bus fault when I try use printk from spm_request_random_number()?&lt;/p&gt;
&lt;p&gt;BUS FAULT:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
Exception occurred in Secure State
***** BUS FAULT *****
  Precise data bus error
  BFAR Address: 0x50008120
***** Hardware exception *****
Current thread ID = 0x200200b0
Faulting instruction address = 0xffffffff
Fatal fault in essential thread! Spinning...
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Memory partition</title><link>https://devzone.nordicsemi.com/thread/200570?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 14:08:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c3b0d0c-6771-49e5-8512-a7a6f867de9a</guid><dc:creator>MJD093</dc:creator><description>&lt;p&gt;Ah ok, I was looking for something like that tbh myself. I knew that whatever was causing this to be reduced was something 13 flash sectors in size, which was what you found. If you compile the SPM application, the flash area is like 128KB but in every other sample it gets reduced to 48KB. I guess you found where the flash sector for SPM was getting throttled down. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Memory partition</title><link>https://devzone.nordicsemi.com/thread/200545?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 13:25:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d562b77b-49ac-4f01-a6d2-f1f5e027a9e0</guid><dc:creator>DenisAks</dc:creator><description>&lt;p&gt;I changed 0xc000 to 0x12000 and now all compiled ok.&lt;/p&gt;
&lt;p&gt;But in the debugger I can&amp;#39;t go inside funcion __TZ_NONSECURE_ENTRY_FUNC rsa_test().&lt;/p&gt;
&lt;p&gt;Is this how it should be?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Memory partition</title><link>https://devzone.nordicsemi.com/thread/200498?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 11:40:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ee64571-78de-45ea-a8ae-2ea24928ae41</guid><dc:creator>DenisAks</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;In my previous post def **.zip it files which have default settings, they are confused me with boot section. I thought they are correct.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I replaced my files.&amp;nbsp; I deleted build directories in spm and security_service folders.&lt;/p&gt;
&lt;p&gt;And what is strange I have same errors.&lt;/p&gt;
&lt;p&gt;Here full secure_services demo compile log.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Building ‘spm/zephyr/include/generated/driver-validation.h’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Combining ‘spm/zephyr/include/generated/driver-validation.h’
Building ‘spm/zephyr/CMakeFiles/spm_driver_validation_h_target’ from solution ‘build’ in configuration ‘Common’
Building ‘spm/zephyr/spm_driver_validation_h_target’ from solution ‘build’ in configuration ‘Common’
Building ‘spm/zephyr/include/generated/kobj-types-enum.h’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Combining ‘spm/zephyr/include/generated/kobj-types-enum.h’
Building ‘spm/zephyr/include/generated/otype-to-str.h’ from solution ‘build’ in configuration ‘Common’
Building ‘spm/zephyr/CMakeFiles/spm_kobj_types_h_target’ from solution ‘build’ in configuration ‘Common’
Building ‘spm/zephyr/spm_kobj_types_h_target’ from solution ‘build’ in configuration ‘Common’
Building ‘spm/zephyr/misc/generated/syscalls.json’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Combining ‘spm/zephyr/misc/generated/syscalls.json’
Building ‘spm/zephyr/include/generated/syscall_list.h’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Combining ‘spm/zephyr/include/generated/syscall_list.h’
Building ‘spm/zephyr/CMakeFiles/spm_syscall_list_h_target’ from solution ‘build’ in configuration ‘Common’
Building ‘spm/zephyr/include/generated/syscall_dispatch.c’ from solution ‘build’ in configuration ‘Common’
Building ‘spm/zephyr/spm_syscall_list_h_target’ from solution ‘build’ in configuration ‘Common’
Building ‘spm/zephyr/include/generated/syscall_macros.h’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Combining ‘spm/zephyr/include/generated/syscall_macros.h’
Building ‘spm/zephyr/CMakeFiles/spm_syscall_macros_h_target’ from solution ‘build’ in configuration ‘Common’
Building ‘spm/zephyr/spm_syscall_macros_h_target’ from solution ‘build’ in configuration ‘Common’
Building ‘cmake_object_order_depends_target_spm_offsets’ from solution ‘build’ in configuration ‘Common’
Building ‘spm/zephyr/spm_offsets’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Compiling ‘offsets.c’
Building ‘spm/zephyr/include/generated/offsets.h’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Combining ‘spm/zephyr/include/generated/offsets.h’
Building ‘spm/zephyr/CMakeFiles/spm_offsets_h’ from solution ‘build’ in configuration ‘Common’
Building ‘spm/zephyr/spm_offsets_h’ from solution ‘build’ in configuration ‘Common’
Building ‘cmake_object_order_depends_target_spm_app’ from solution ‘build’ in configuration ‘Common’
Building ‘cmake_object_order_depends_target_spm_arch__arm__core’ from solution ‘build’ in configuration ‘Common’
Building ‘cmake_object_order_depends_target_spm_arch__arm__core__cortex_m’ from solution ‘build’ in configuration ‘Common’
Building ‘cmake_object_order_depends_target_spm_arch__arm__core__cortex_m__mpu’ from solution ‘build’ in configuration ‘Common’
Building ‘cmake_object_order_depends_target_spm_drivers__serial’ from solution ‘build’ in configuration ‘Common’
Building ‘cmake_object_order_depends_target_spm_kernel’ from solution ‘build’ in configuration ‘Common’
Building ‘cmake_object_order_depends_target_spm_lib__libc__minimal’ from solution ‘build’ in configuration ‘Common’
Building ‘cmake_object_order_depends_target_spm_mbedcrypto_vanilla’ from solution ‘build’ in configuration ‘Common’
Building ‘cmake_object_order_depends_target_spm_mbeddrbg’ from solution ‘build’ in configuration ‘Common’
Building ‘cmake_object_order_depends_target_spm_zephyr’ from solution ‘build’ in configuration ‘Common’
Building ‘spm/zephyr/linker.cmd’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Combining ‘spm/zephyr/linker.cmd’
Building ‘spm/zephyr/CMakeFiles/spm_linker_script_target’ from solution ‘build’ in configuration ‘Common’
Building ‘spm/zephyr/spm_linker_script_target’ from solution ‘build’ in configuration ‘Common’
Building ‘cmake_object_order_depends_target_spm_zephyr_prebuilt’ from solution ‘build’ in configuration ‘Common’
Building ‘spm/spm_app/libspm_app.a’ from solution ‘build’ in configuration ‘Common’
2&amp;gt; Compiling ‘main.c’
Building ‘spm/zephyr/libspm_zephyr.a’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Archiving ‘libspm_app.a’
2&amp;gt; Compiling ‘isr_tables.c’
1&amp;gt; Compiling ‘sw_isr_common.c’
2&amp;gt; Compiling ‘arm_core_cmse.c’
1&amp;gt; Compiling ‘arm_core_tz.c’
2&amp;gt; Compiling ‘crc32_sw.c’
1&amp;gt; Compiling ‘crc16_sw.c’
2&amp;gt; Compiling ‘crc8_sw.c’
1&amp;gt; Compiling ‘crc7_sw.c’
2&amp;gt; Compiling ‘fdtable.c’
1&amp;gt; Compiling ‘mempool.c’
2&amp;gt; Compiling ‘rb.c’
1&amp;gt; Compiling ‘thread_entry.c’
2&amp;gt; Compiling ‘work_q.c’
1&amp;gt; Compiling ‘printk.c’
2&amp;gt; Compiling ‘configs.c’
1&amp;gt; Compiling ‘soc.c’
2&amp;gt; Compiling ‘mpu_regions.c’
1&amp;gt; Compiling ‘system_nrf9160.c’
2&amp;gt; Compiling ‘nrfx_glue.c’
1&amp;gt; Compiling ‘power.c’
2&amp;gt; Compiling ‘reboot.c’
2&amp;gt; Compiling ‘policy_residency.c’
1&amp;gt; Compiling ‘uart_console.c’
2&amp;gt; Compiling ‘nrf_power_clock.c’
1&amp;gt; Compiling ‘sys_clock_init.c’
1&amp;gt; Compiling ‘nrf_rtc_timer.c’
2&amp;gt; Compiling ‘spm.c’
1&amp;gt; Compiling ‘secure_services.c’
1&amp;gt; C:/ncs/nrf/subsys/spm/secure_services.c:148:13: warning: unused variable &amp;#39;ret&amp;#39; [-Wunused-variable]
1&amp;gt; C:/ncs/nrf/subsys/spm/secure_services.c:146:6: warning: unused variable &amp;#39;i&amp;#39; [-Wunused-variable]
1&amp;gt; C:/ncs/nrf/subsys/spm/secure_services.c:143:23: warning: unused variable &amp;#39;rsa&amp;#39; [-Wunused-variable]
1&amp;gt; C:/ncs/nrf/subsys/spm/secure_services.c:142:21: warning: unused variable &amp;#39;pk&amp;#39; [-Wunused-variable]
1&amp;gt; C:/ncs/nrf/subsys/spm/secure_services.c:298:9: warning: implicit declaration of function &amp;#39;memcpy&amp;#39; [-Wimplicit-function-declaration]
1&amp;gt; C:/ncs/nrf/subsys/spm/secure_services.c:303:1: warning: no return statement in function returning non-void [-Wreturn-type]
1&amp;gt; C:/ncs/nrf/subsys/spm/secure_services.c:181:1: warning: control reaches end of non-void function [-Wreturn-type]
Building ‘spm/zephyr/arch/arm/core/libspm_arch__arm__core.a’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Archiving ‘libspm_zephyr.a’
2&amp;gt; Assembling ‘exc_exit.S’
1&amp;gt; Assembling ‘swap_helper.S’
2&amp;gt; Assembling ‘cpu_idle.S’
1&amp;gt; Assembling ‘fault_s.S’
2&amp;gt; Assembling ‘isr_wrapper.S’
1&amp;gt; Compiling ‘irq_init.c’
2&amp;gt; Compiling ‘swap.c’
1&amp;gt; Compiling ‘irq_manage.c’
2&amp;gt; Compiling ‘fault.c’
1&amp;gt; Compiling ‘thread.c’
2&amp;gt; Compiling ‘fatal.c’
1&amp;gt; Compiling ‘sys_fatal_error_handler.c’
2&amp;gt; Compiling ‘thread_abort.c’
Building ‘spm/zephyr/arch/arm/core/cortex_m/libspm_arch__arm__core__cortex_m.a’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Archiving ‘libspm_arch__arm__core.a’
2&amp;gt; Assembling ‘vector_table.S’
1&amp;gt; Assembling ‘reset.S’
2&amp;gt; Assembling ‘nmi_on_reset.S’
1&amp;gt; Compiling ‘prep_c.c’
2&amp;gt; Compiling ‘scb.c’
1&amp;gt; Compiling ‘nmi.c’
2&amp;gt; Compiling ‘exc_manage.c’
Building ‘spm/zephyr/arch/arm/core/cortex_m/mpu/libspm_arch__arm__core__cortex_m__mpu.a’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Archiving ‘libspm_arch__arm__core__cortex_m.a’
2&amp;gt; Compiling ‘arm_core_mpu.c’
1&amp;gt; Compiling ‘arm_mpu.c’
Building ‘spm/zephyr/lib/libc/minimal/libspm_lib__libc__minimal.a’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Archiving ‘libspm_arch__arm__core__cortex_m__mpu.a’
2&amp;gt; Compiling ‘atoi.c’
1&amp;gt; Compiling ‘strtol.c’
1&amp;gt; Compiling ‘malloc.c’
2&amp;gt; Compiling ‘strtoul.c’
1&amp;gt; Compiling ‘bsearch.c’
2&amp;gt; Compiling ‘exit.c’
1&amp;gt; Compiling ‘strncasecmp.c’
2&amp;gt; Compiling ‘strstr.c’
1&amp;gt; Compiling ‘string.c’
2&amp;gt; Compiling ‘prf.c’
1&amp;gt; Compiling ‘stdout_console.c’
1&amp;gt; Compiling ‘sprintf.c’
2&amp;gt; Compiling ‘fprintf.c’
Building ‘spm/zephyr/drivers/serial/libspm_drivers__serial.a’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Archiving ‘libspm_lib__libc__minimal.a’
2&amp;gt; Compiling ‘uart_nrfx_uarte.c’
Building ‘spm/zephyr/modules/nrfxlib/nrf_security/src/mbedtls/libspm_mbeddrbg.a’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Archiving ‘libspm_drivers__serial.a’
2&amp;gt; Compiling ‘ctr_drbg.c’
1&amp;gt; Compiling ‘entropy.c’
Building ‘spm/zephyr/modules/nrfxlib/nrf_security/src/mbedtls/libspm_mbedcrypto_vanilla.a’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Archiving ‘libspm_mbeddrbg.a’
2&amp;gt; Compiling ‘aes.c’
1&amp;gt; Compiling ‘aesni.c’
2&amp;gt; Compiling ‘arc4.c’
1&amp;gt; Compiling ‘aria.c’
1&amp;gt; Compiling ‘asn1parse.c’
2&amp;gt; Compiling ‘asn1write.c’
1&amp;gt; Compiling ‘base64.c’
2&amp;gt; Compiling ‘bignum.c’
1&amp;gt; Compiling ‘blowfish.c’
1&amp;gt; Compiling ‘camellia.c’
2&amp;gt; Compiling ‘ccm.c’
1&amp;gt; Compiling ‘chacha20.c’
2&amp;gt; Compiling ‘chachapoly.c’
1&amp;gt; Compiling ‘cipher.c’
2&amp;gt; Compiling ‘cmac.c’
1&amp;gt; Compiling ‘des.c’
1&amp;gt; Compiling ‘dhm.c’
2&amp;gt; Compiling ‘ecdh.c’
1&amp;gt; Compiling ‘ecdsa.c’
2&amp;gt; Compiling ‘ecjpake.c’
1&amp;gt; Compiling ‘ecp.c’
2&amp;gt; Compiling ‘ecp_curves.c’
1&amp;gt; Compiling ‘entropy_poll.c’
2&amp;gt; Compiling ‘error.c’
1&amp;gt; Compiling ‘gcm.c’
2&amp;gt; Compiling ‘havege.c’
1&amp;gt; Compiling ‘hkdf.c’
2&amp;gt; Compiling ‘hmac_drbg.c’
1&amp;gt; Compiling ‘md2.c’
2&amp;gt; Compiling ‘md.c’
1&amp;gt; Compiling ‘md4.c’
2&amp;gt; Compiling ‘md5.c’
1&amp;gt; Compiling ‘md_wrap.c’
2&amp;gt; Compiling ‘memory_buffer_alloc.c’
1&amp;gt; Compiling ‘nist_kw.c’
2&amp;gt; Compiling ‘oid.c’
1&amp;gt; Compiling ‘padlock.c’
2&amp;gt; Compiling ‘pk.c’
1&amp;gt; Compiling ‘pk_wrap.c’
2&amp;gt; Compiling ‘pkcs12.c’
1&amp;gt; Compiling ‘pkcs5.c’
1&amp;gt; Compiling ‘pkwrite.c’
2&amp;gt; Compiling ‘pkparse.c’
1&amp;gt; Compiling ‘platform.c’
2&amp;gt; Compiling ‘platform_util.c’
1&amp;gt; Compiling ‘poly1305.c’
2&amp;gt; Compiling ‘ripemd160.c’
1&amp;gt; Compiling ‘rsa.c’
1&amp;gt; Compiling ‘sha1.c’
2&amp;gt; Compiling ‘rsa_internal.c’
1&amp;gt; Compiling ‘sha256.c’
2&amp;gt; Compiling ‘sha512.c’
1&amp;gt; Compiling ‘threading.c’
2&amp;gt; Compiling ‘timing.c’
1&amp;gt; Compiling ‘version.c’
2&amp;gt; Compiling ‘version_features.c’
1&amp;gt; Compiling ‘xtea.c’
2&amp;gt; Compiling ‘cipher_wrap.c’
2&amp;gt; Compiling ‘pem.c’
Building ‘spm/zephyr/kernel/libspm_kernel.a’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Archiving ‘libspm_mbedcrypto_vanilla.a’
2&amp;gt; Compiling ‘device.c’
1&amp;gt; Compiling ‘errno.c’
2&amp;gt; Compiling ‘idle.c’
1&amp;gt; Compiling ‘init.c’
2&amp;gt; Compiling ‘mailbox.c’
1&amp;gt; Compiling ‘mem_slab.c’
2&amp;gt; Compiling ‘mempool.c’
1&amp;gt; Compiling ‘msg_q.c’
2&amp;gt; Compiling ‘mutex.c’
1&amp;gt; Compiling ‘pipes.c’
1&amp;gt; Compiling ‘sched.c’
2&amp;gt; Compiling ‘queue.c’
2&amp;gt; Compiling ‘sem.c’
2&amp;gt; Compiling ‘stack.c’
1&amp;gt; Compiling ‘system_work_q.c’
1&amp;gt; Compiling ‘thread.c’
2&amp;gt; Compiling ‘thread_abort.c’
1&amp;gt; Compiling ‘version.c’
2&amp;gt; Compiling ‘work_q.c’
1&amp;gt; Compiling ‘smp.c’
1&amp;gt; Compiling ‘timeout.c’
2&amp;gt; Compiling ‘timer.c’
1&amp;gt; Archiving ‘libspm_kernel.a’
Building ‘spm/zephyr/spm_zephyr_prebuilt.elf’ from solution ‘build’ in configuration ‘Common’
1&amp;gt; Compiling ‘empty_file.c’
1&amp;gt; Linking ‘spm_zephyr_prebuilt.elf’
1&amp;gt; Memory region         Used Size  Region Size  %age Used
1&amp;gt;            FLASH:         64 KB        48 KB    133.33%
1&amp;gt;             SRAM:        4912 B        64 KB      7.50%
1&amp;gt;         IDT_LIST:          40 B         2 KB      1.95%
1&amp;gt; c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: spm\zephyr\spm_zephyr_prebuilt.elf section `.gnu.sgstubs&amp;#39; will not fit in region `FLASH&amp;#39;
1&amp;gt; c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: SPM and app are sharing an SPU region. Cannot partition flash correctly into secure and non-secure. Adjust partitions sizes so they are placed in separate regions.
1&amp;gt; c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH&amp;#39; overflowed by 16384 bytes
1&amp;gt; collect2.exe: error: ld returned 1 exit status
Build failed
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1&amp;gt; Linking &amp;lsquo;spm_zephyr_prebuilt.elf&amp;rsquo;&lt;br /&gt;1&amp;gt; Memory region&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used Size&amp;nbsp; Region Size&amp;nbsp; %age Used&lt;br /&gt;1&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FLASH:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64 KB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 48 KB&amp;nbsp;&amp;nbsp;&amp;nbsp; 133.33%&lt;br /&gt;1&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SRAM:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4912 B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 64 KB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7.50%&lt;br /&gt;1&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IDT_LIST:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40 B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 KB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.95%&lt;br /&gt;1&amp;gt; c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: spm\zephyr\spm_zephyr_prebuilt.elf section `.gnu.sgstubs&amp;#39; will not fit in region `FLASH&amp;#39;&lt;br /&gt;1&amp;gt; c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: SPM and app are sharing an SPU region. Cannot partition flash correctly into secure and non-secure. Adjust partitions sizes so they are placed in separate regions.&lt;br /&gt;1&amp;gt; c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH&amp;#39; overflowed by 16384 bytes&lt;br /&gt;1&amp;gt; collect2.exe: error: ld returned 1 exit status&lt;br /&gt;Build failed&lt;/p&gt;
&lt;p&gt;I tried it several times and also restarted my pc and etc.. Same error.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Maybe I can change or check something else?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I want to do still some tests.&lt;/p&gt;
&lt;p&gt;----------------------------------------------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;EDIT:&lt;/p&gt;
&lt;p&gt;Also I found in spm menu config (placed at C:\ncs\nrf\susbsys\spm\Kconfig &amp;nbsp; this:&lt;/p&gt;
&lt;p&gt;# Define used by partition_manager.py to deduce size of partition&lt;br /&gt;config PM_PARTITION_SIZE_MCUBOOT&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;hex &amp;quot;Flash space reserved for bootloader.&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;default 0xc000&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;help&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; Flash space set aside for the MCUBoot. Note, the name&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; of this configuration needs to match the requirements set by the&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; script &amp;#39;partition_manager.py&amp;#39;. See pm.yaml.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What this mean? This space 0xc000 = 48kB&lt;/p&gt;
&lt;p&gt;I think so compiler try place rsa functions with bootloader in one section. Does it make sense?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Memory partition</title><link>https://devzone.nordicsemi.com/thread/200334?ContentTypeID=1</link><pubDate>Wed, 24 Jul 2019 15:51:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ee66da2-5683-48f2-b7f8-9dd2e6665d6b</guid><dc:creator>MJD093</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll go through what I see in each:&lt;/p&gt;
&lt;p&gt;In def_files.zip&lt;/p&gt;
&lt;p&gt;There are mismatching partition sizes for slots 0 and 1 in both secure and non-secure. Remember, Zephyr state that they should be equal.&lt;/p&gt;
&lt;p&gt;MCUBoot starts at 0x0 and extends for 0x20000 addresses but slot0 starts at address 0x10000, conflict of partitions here.&lt;/p&gt;
&lt;p&gt;In security_increased.zip&lt;/p&gt;
&lt;p&gt;Partitions look alright, you have very small non-secure partitions, that could cause another overflow issue.&lt;/p&gt;
&lt;p&gt;In security_decreased.zip&lt;/p&gt;
&lt;p&gt;Partitions look alright.&lt;/p&gt;
&lt;p&gt;I edited my partitions a while back to allow me to have a much larger access to NVS flash memory (my application needs lots of memory and back-up memory) and I know this works fine on my kit as I can happily flash more data to NVS than was ever possible before.&lt;/p&gt;
&lt;p&gt;I have linked them below. Remember to rebuild your SPM application in nrf9160/samples. Then rebuild your application. (it&amp;#39;s better to delete the whole build library and build them both from scratch)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1205.Archive.zip"&gt;devzone.nordicsemi.com/.../1205.Archive.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Memory partition</title><link>https://devzone.nordicsemi.com/thread/200329?ContentTypeID=1</link><pubDate>Wed, 24 Jul 2019 15:32:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:037c7576-c570-478c-8db7-a1318f76ecfe</guid><dc:creator>DenisAks</dc:creator><description>&lt;p&gt;Hi, thanks for your reply. &lt;/p&gt;
&lt;p&gt;I attached my files. Could you check them?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf9160_5F00_pca10090_5F00_security_5F00_decreased.zip"&gt;devzone.nordicsemi.com/.../nrf9160_5F00_pca10090_5F00_security_5F00_decreased.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf9160_5F00_pca10090_5F00_security_5F00_increased.zip"&gt;devzone.nordicsemi.com/.../nrf9160_5F00_pca10090_5F00_security_5F00_increased.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/_5F005F00_nrf9160_5F00_pca10090_5F00_def_5F00_files.zip"&gt;devzone.nordicsemi.com/.../_5F005F00_nrf9160_5F00_pca10090_5F00_def_5F00_files.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Memory partition</title><link>https://devzone.nordicsemi.com/thread/200258?ContentTypeID=1</link><pubDate>Wed, 24 Jul 2019 10:57:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a60b3eb-3427-40d9-825f-003a9ad61054</guid><dc:creator>MJD093</dc:creator><description>&lt;p&gt;Which one did you change? If you changed the size of the correct partition, the error would also change to overflow from a different value. Looking at the SRAM partition, slot0 is allocated 64KB of SRAM which is what your error shows as well so it should be slot0 that needs changed (i.e. the secure partition needs increased).&lt;/p&gt;
&lt;p&gt;Did you remember to update the spm application as well? Any changes to the device tree requires you to rebuild the spm sample project for the changes to take effect, otherwise it will look like nothing changed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Memory partition</title><link>https://devzone.nordicsemi.com/thread/200249?ContentTypeID=1</link><pubDate>Wed, 24 Jul 2019 10:27:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24774ace-6596-4b76-ba40-2c9ffa7d0419</guid><dc:creator>DenisAks</dc:creator><description>&lt;p&gt;I tried it, I have the same error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 Memory partition</title><link>https://devzone.nordicsemi.com/thread/200147?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2019 16:00:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eba3bc4b-40c5-4333-b995-fc1bb28111e3</guid><dc:creator>MJD093</dc:creator><description>&lt;p&gt;See /path/to/zephyr/boards/arm/nrf9160_pca10090.&lt;/p&gt;
&lt;p&gt;In this folder you will find all files relating to the hardware set up of the PCA10090, the device tree structure.&lt;/p&gt;
&lt;p&gt;In the files labeled nrf9160_pca10090_common.dts and nrf9160_pca10090_partition_conf.dts, you will find the partition setups for every area in the 1MB flash memory.&lt;/p&gt;
&lt;p&gt;Edit the addresses to increase the size of the non-secure memory (I assume this is a non-secure space issue and not the secure side). For non-secure partition sizes, you are looking at slot0ns and slot1ns in the nrf9160_pca10090_partition_conf.dts. Increase the sizes of these regions and decrease the size of the others if necessary to make the space you need avaliable.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;NOTE: slot0-slot1 and slot0ns-slot1ns MUST BE THE SAME SIZE. The secure and non-secure can be different sizes but the slots for each region must be equal as the slot numbered 0 is the secure/nonsecure application data and the slot numbered 1 is the secure/nonsecure update image storage for firmware updates and must be equal to slot 0&lt;/p&gt;
&lt;p&gt;Scratch is the partition for copying data between slot 0s and slot1s&lt;/p&gt;
&lt;p&gt;See &lt;a href="https://docs.zephyrproject.org/1.12.0/devices/dts/flash_partitions.html"&gt;https://docs.zephyrproject.org/1.12.0/devices/dts/flash_partitions.html&lt;/a&gt; for the Zephyr information on partitions.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EDIT: actually, looking at your post again, I think it&amp;#39;s the secure size thats too small. Error was on SPM building which, unless I&amp;#39;m mistaken, goes in the secure partition.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>