refactor linker & startup for dynamic checking stack & heap usage.

- add syscall __sbrk() for malloc function
- add dbgMemInfo() is visual format
- FreeRTOS enable : configCHECK_FOR_STACK_OVERFLOW,
configUSE_MALLOC_FAILED_HOOK, configUSE_TRACE_FACILITY,
configUSE_STATS_FORMATTING_FUNCTIONS
This commit is contained in:
hathach committed 2017-02-17 23:07:30 +07:00
1 parent f0c0cec1c2
commit ecedd3d0e2
10 files changed
+141 -62

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
/* Linker script to configure memory regions. */
SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)
MEMORY
{
FLASH (rx) : ORIGIN = 0x1c000, LENGTH = 0x64000
/* ATTR SIZE = 0x0580, mid bandwidth (central, prph, sec) = (0, 1, 0) */
/* RAM (rwx) : ORIGIN = 0x20002080, LENGTH = 0xdf80 */
/* ATTR SIZE = 0x1000, mid bandwidth (central, prph, sec) = (0, 1, 0) */
/* RAM (rwx) : ORIGIN = 0x20002B00, LENGTH = 0xD500 */
/* ATTR SIZE = 0x0B00, mid bandwidth (central, prph, sec) = (0, 1, 0) */
RAM (rwx) : ORIGIN = 0x20002600, LENGTH = 0xDA00
/* ATTR SIZE = 0x0B00, mid bandwidth (central, prph, sec) = (4, 1, 4) */
/*RAM (rwx) : ORIGIN = 0x20002600, LENGTH = 0xDA00*/
}
SECTIONS
{
.fs_data :
{
PROVIDE(__start_fs_data = .);
KEEP(*(.fs_data))
PROVIDE(__stop_fs_data = .);
} > RAM
} INSERT AFTER .data;
INCLUDE "nrf5x_common.ld"