Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of target-mcu-k64f by
sys.cpp
00001 /* mbed Microcontroller Library - stackheap 00002 * Copyright (C) 2009-2011 ARM Limited. All rights reserved. 00003 * 00004 * Setup a fixed single stack/heap memory model, 00005 * between the top of the RW/ZI region and the stackpointer 00006 */ 00007 00008 #ifdef __cplusplus 00009 extern "C" { 00010 #endif 00011 00012 #include <rt_misc.h> 00013 #include <stdint.h> 00014 00015 extern char Image$$RW_IRAM1$$ZI$$Limit[]; 00016 00017 extern __value_in_regs struct __initial_stackheap __user_setup_stackheap(uint32_t R0, uint32_t R1, uint32_t R2, uint32_t R3) { 00018 uint32_t zi_limit = (uint32_t)Image$$RW_IRAM1$$ZI$$Limit; 00019 uint32_t sp_limit = __current_sp(); 00020 00021 zi_limit = (zi_limit + 7) & ~0x7; // ensure zi_limit is 8-byte aligned 00022 00023 struct __initial_stackheap r; 00024 r.heap_base = zi_limit; 00025 r.heap_limit = sp_limit; 00026 return r; 00027 } 00028 00029 #ifdef __cplusplus 00030 } 00031 #endif
Generated on Sat Aug 27 2022 17:09:00 by
