Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previous change to memory layout to avoid the 64K RAM discontinuity broke some builds, as it restricted static data to the first 64K. Only stack and dlmalloc heap were in the top 192K. Nanostack builds were particularly affected as the Nanostack heap is a large bss allocation, and didn't fit. Rework the memory allocation to better use the memory - stack and uVisor data now go in the first 64K, with the stack auto-sized. Data, bss and dlmalloc heap go in the 192K region. Also fix the broken uVisor RAM layout symbols and restore the 512-byte initial reservation (for uVisor?). Stack limit checking also restored by putting the stack back immediately above the secure memory. Previous layout --------------- 1fff0000 RAM uvisor.bss (512-byte reservation missing) 1fff2000 data, bss 1fff.... end of bss (some unused RAM) 20000000 RAM2 stack (fixed 32K) 20008000 start of dlmalloc heap (fixed 160K) 2002ffff end of dlmalloc heap New layout ---------- 1fff0000 Start of physical ram, 512 bytes reserved 1fff0200 RAM uvisor.bss 1fff.... start of stack (autosized 64K - uvisor data) 1fffffff end of stack 20000000 RAM2 data, bss 2000.... start of dlmalloc heap (autosized 192K - static data) 2002ffff end of dlmalloc heap
- Loading branch information