Skip to content

Commit

Permalink
Update K64F memory map for for larger static data
Browse files Browse the repository at this point in the history
The KSDK2 update restricts static data to the first 64K of RAM.
This breaks some applications which require more than 64K of
static data.  This patch moves the static data sections
(bss and data) into the second ram region which is 192K.

Changes taken from similar patches here:
ARMmbed/target-kinetis-k64-gcc#5
ARMmbed/target-kinetis-k64-gcc#6

Previous layout
---------------
0x1FFF0000 m_data   .interrupts_ram
0x1FFF0400          data, bss
0x1FFFFFFF          end of bss
0x20000000 m_data_2 start of heap, end of stack
0x2002ffff          end of heap, start of stack

New layout
----------
0x1FFF0000 m_data   .interrupts_ram
0x1FFF0400          start of unused ram
0x1FFFFFFF          end of unused ram
0x20000000 m_data_2 data, bss
0x200XXXXX          end of bss
0x200XXXXX+1        start of heap, end of stack
0x2002ffff          end of heap, start of stack
  • Loading branch information
c1728p9 committed May 31, 2016
1 parent a8d2fa6 commit c730c63
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ SECTIONS
KEEP(*(.jcr*))
. = ALIGN(4);
__data_end__ = .; /* define a global symbol at data end */
} > m_data
} > m_data_2

__DATA_END = __DATA_ROM + (__data_end__ - __data_start__);
text_end = ORIGIN(m_text) + LENGTH(m_text);
Expand All @@ -225,7 +225,7 @@ SECTIONS
. = ALIGN(4);
__bss_end__ = .;
__END_BSS = .;
} > m_data
} > m_data_2

.heap :
{
Expand Down

0 comments on commit c730c63

Please sign in to comment.