mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
bogdanm
Date:
Wed Aug 07 16:43:59 2013 +0300
Revision:
15:4892fe388435
Child:
71:ca88dd32f209
Added LPC4088 target and interrupt chaining code

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 15:4892fe388435 1 /* mbed Microcontroller Library - stackheap
bogdanm 15:4892fe388435 2 * Copyright (C) 2009-2011 ARM Limited. All rights reserved.
bogdanm 15:4892fe388435 3 *
bogdanm 15:4892fe388435 4 * Setup a fixed single stack/heap memory model,
bogdanm 15:4892fe388435 5 * between the top of the RW/ZI region and the stackpointer
bogdanm 15:4892fe388435 6 */
bogdanm 15:4892fe388435 7
bogdanm 15:4892fe388435 8 #ifdef __cplusplus
bogdanm 15:4892fe388435 9 extern "C" {
bogdanm 15:4892fe388435 10 #endif
bogdanm 15:4892fe388435 11
bogdanm 15:4892fe388435 12 #include <rt_misc.h>
bogdanm 15:4892fe388435 13 #include <stdint.h>
bogdanm 15:4892fe388435 14
bogdanm 15:4892fe388435 15 extern char Image$$RW_IRAM1$$ZI$$Limit[];
bogdanm 15:4892fe388435 16
bogdanm 15:4892fe388435 17 extern __value_in_regs struct __initial_stackheap __user_setup_stackheap(uint32_t R0, uint32_t R1, uint32_t R2, uint32_t R3) {
bogdanm 15:4892fe388435 18 uint32_t zi_limit = (uint32_t)Image$$RW_IRAM1$$ZI$$Limit;
bogdanm 15:4892fe388435 19 uint32_t sp_limit = __current_sp();
bogdanm 15:4892fe388435 20
bogdanm 15:4892fe388435 21 zi_limit = (zi_limit + 7) & ~0x7; // ensure zi_limit is 8-byte aligned
bogdanm 15:4892fe388435 22
bogdanm 15:4892fe388435 23 struct __initial_stackheap r;
bogdanm 15:4892fe388435 24 r.heap_base = zi_limit;
bogdanm 15:4892fe388435 25 r.heap_limit = sp_limit;
bogdanm 15:4892fe388435 26 return r;
bogdanm 15:4892fe388435 27 }
bogdanm 15:4892fe388435 28
bogdanm 15:4892fe388435 29 #ifdef __cplusplus
bogdanm 15:4892fe388435 30 }
bogdanm 15:4892fe388435 31 #endif