|
1 |
| -/* Linker script for the nRF9160 in Non-secure mode */ |
| 1 | +/* Linker script for the nRF9160 in Non-secure mode. It assumes you have the |
| 2 | +Nordic Secure Partition Manager installed at the bottom of flash and that |
| 3 | +the SPM is set to boot a non-secure application from the FLASH origin below. */ |
| 4 | + |
2 | 5 | MEMORY
|
3 | 6 | {
|
4 |
| - /* SECURE_FLASH : ORIGIN = 0x00000000, LENGTH = 256K */ |
5 |
| - /* NONSECURE_FLASH : ORIGIN = 0x00040000, LENGTH = 768K */ |
6 |
| - /* SECURE_RAM : ORIGIN = 0x20000000, LENGTH = 64K */ |
7 |
| - /* LIBBSD_RAM : ORIGIN = 0x20010000, LENGTH = 64K */ |
8 |
| - /* NONSECURE_RAM : ORIGIN = 0x20020000, LENGTH = 128K */ |
9 |
| - |
10 |
| - FLASH : ORIGIN = 0x00040000, LENGTH = 768K |
11 |
| - RAM : ORIGIN = 0x20020000, LENGTH = 128K |
| 7 | + /* |
| 8 | + * This is where the Bootloader, Secure Partition Manager or |
| 9 | + * Trusted-Firmware-M lives. |
| 10 | + */ |
| 11 | + SECURE_FLASH : ORIGIN = 0x00000000, LENGTH = 256K |
| 12 | + /* |
| 13 | + * This is where your non-secure Rust application lives. Note that SPM must agree this |
| 14 | + * is where your application lives, or it will jump to garbage and crash the CPU. |
| 15 | + */ |
| 16 | + FLASH : ORIGIN = 0x00050000, LENGTH = 768K |
| 17 | + /* |
| 18 | + * This RAM is reserved for the Secure-Mode code located in the `SECURE_FLASH` region. |
| 19 | + */ |
| 20 | + SECURE_RAM : ORIGIN = 0x20000000, LENGTH = 64K |
| 21 | + /* |
| 22 | + * This RAM is available to both the Cortex-M33 and the LTE core (well, |
| 23 | + technically anything between `0x2000_0000` and `0x2001_FFFF` is |
| 24 | + shareable, but we just gave the first 64 KiB to Secure Mode). Shared |
| 25 | + buffers must be placed here. |
| 26 | + */ |
| 27 | + SHARED_RAM : ORIGIN = 0x20010000, LENGTH = 64K |
| 28 | + /* |
| 29 | + * This RAM is available to your non-secure Rust application. |
| 30 | + */ |
| 31 | + RAM : ORIGIN = 0x20020000, LENGTH = 128K |
12 | 32 | }
|
13 | 33 |
|
14 |
| -/* This is where the call stack will be allocated. */ |
15 |
| -/* The stack is of the full descending type. */ |
16 |
| -/* You may want to use this variable to locate the call stack and static |
17 |
| - variables in different memory regions. Below is shown the default value */ |
18 |
| -/* _stack_start = ORIGIN(RAM) + LENGTH(RAM); */ |
19 |
| - |
20 |
| -/* You can use this symbol to customize the location of the .text section */ |
21 |
| -/* If omitted the .text section will be placed right after the .vector_table |
22 |
| - section */ |
23 |
| -/* This is required only on microcontrollers that store some configuration right |
24 |
| - after the vector table */ |
25 |
| -/* _stext = ORIGIN(FLASH) + 0x400; */ |
26 |
| - |
27 |
| -/* Size of the heap (in bytes) */ |
28 |
| -/* _heap_size = 1024; */ |
| 34 | +SECTIONS |
| 35 | +{ |
| 36 | + /* This section contains the buffers used by `libnrf_modem` to talk between the Cortex-M33 and the LTE core */ |
| 37 | + .shared_ram (NOLOAD) : ALIGN(4) |
| 38 | + { |
| 39 | + . = ALIGN(4); |
| 40 | + *(.shared_ram .shared_ram.*); |
| 41 | + . = ALIGN(4); |
| 42 | + } > SHARED_RAM |
| 43 | +} |
0 commit comments