update memory layout

This commit is contained in:
hathach committed 2017-10-03 22:18:13 +07:00
1 parent 4a0b0caaf8
commit c22eb3e9ca
5 files changed
+54 -11

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
/* Linker script to configure memory regions. */
SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)
MEMORY
{
FLASH (rx) : ORIGIN = 0x23000, LENGTH = 0x26000 /* Max 152 KB for dual banks */
/* SRAM required by S132 depend on
* - Attribute Table Size
* - Number of concurrent connection central + peripherl + secure links
* Several configuration with different SRAM config is included for reference
*/
/* ATTR SIZE = 0x0B00, (central, prph, sec) = (0, 1, 0) */
/* RAM (rwx) : ORIGIN = 0x20001B00 + 0x0B00, LENGTH = 0xE500 - 0x0B00 */
/* ATTR SIZE = 0x0B00, (central, prph, sec) = (4, 1, 1) */
RAM (rwx) : ORIGIN = 0x20001B00 + (0x0B00 + 0x1280), LENGTH = 0xE500 - (0x0B00 + 0x1280)
/* ATTR SIZE = 0x0B00, (central, prph, sec) = (7, 1, 1) */
/* RAM (rwx) : ORIGIN = 0x20001B00 + (0x0B00 + 0x1F08), LENGTH = 0xE500 - (0x0B00 + 0x1F08) */
}
SECTIONS
{
.fs_data :
{
PROVIDE(__start_fs_data = .);
KEEP(*(.fs_data))
PROVIDE(__stop_fs_data = .);
} > RAM
} INSERT AFTER .data;
INCLUDE "nrf5x_common.ld"
/* S132 v2.0.1 role configuration SRAM usage */
/* APP_RAM_BASE_CENTRAL_LINKS_0_PERIPH_LINKS_1_SEC_COUNT_0_MID_BW 0x20001fe8 */
/* APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_1_SEC_COUNT_1_MID_BW 0x20003268 inc = 1280 */
/* APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_1_SEC_COUNT_2_MID_BW 0x20003438 inc = 1450 */
/* APP_RAM_BASE_CENTRAL_LINKS_4_PERIPH_LINKS_1_SEC_COUNT_4_MID_BW 0x200037d0 inc = 17e8 */
/* APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_1_MID_BW 0x20003ef0 inc = 1F08*/
/* APP_RAM_BASE_CENTRAL_LINKS_7_PERIPH_LINKS_1_SEC_COUNT_7_MID_BW 0x200049b8 inc = 29d0*/
+5 -4
View File
@@ -1,4 +1,4 @@
/* Linker script for Nordic Semiconductor nRF51 devices
/* Linker script for Nordic Semiconductor nRF52 devices
*
* Version: Sourcery G++ 4.5-1
* Support: https://support.codesourcery.com/GNUToolchain/
@@ -38,6 +38,7 @@ OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
* __bss_end__
* __end__
* end
* __HeapBase
* __HeapLimit
* __StackLimit
* __StackTop
@@ -87,8 +88,8 @@ SECTIONS
KEEP(*(.eh_frame*))
} > FLASH
.ARM.extab :
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > FLASH
@@ -101,7 +102,7 @@ SECTIONS
__exidx_end = .;
__etext = .;
.data : AT (__etext)
{
__data_start__ = .;
@@ -24,13 +24,9 @@ void setup() {
// the loop function runs over and over again forever
void loop() {
#if 0
for (int i = 0; i < 2; i++)
{
digitalToggle(LED_BLUE); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
}
#endif
systemOff(A0, HIGH);
}
@@ -14,12 +14,12 @@
#include <Arduino.h>
/* This example erase the content of 28KB User Data starting from 0x6D000
/* This example erase the content of 28KB User Data starting from 0x6F000
* (used by NFFS) using low level API sd_flash_page_erase() with SoftDevice
* DISABLED. In other words, it performs low level formating of NFFS.
*/
#define STARTING_ADDR 0x06D000
#define STARTING_ADDR 0x06F000
#define SECTOR_SIZE 4096
#define ERASE_SIZE (7*SECTOR_SIZE)
@@ -26,7 +26,7 @@ extern "C" {
// Adafruit
#define NFFS_SECTOR_NUM 7
#define NFFS_START_ADDR 0x6D000
#define NFFS_START_ADDR 0x6F000
#define FLASH_AREA_NFFS 0