mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Revision:
187:0387e8f68319
Parent:
186:707f6e361f3e
Child:
189:f392fc9709a3
--- a/targets/TARGET_NXP/mbed_rtx.h	Fri Jun 22 16:45:37 2018 +0100
+++ b/targets/TARGET_NXP/mbed_rtx.h	Thu Sep 06 13:40:20 2018 +0100
@@ -17,6 +17,8 @@
 #ifndef MBED_MBED_RTX_H
 #define MBED_MBED_RTX_H
 
+#include <stdint.h>
+
 #if defined(TARGET_LPC11U68)
 
 #ifndef INITIAL_SP
@@ -93,10 +95,30 @@
 #define INITIAL_SP              (0x20028000UL)
 #endif
 
-#elif defined(TARGET_MIMXRT1050)
+#elif defined(TARGET_MIMXRT1050_EVK)
 
-#ifndef INITIAL_SP
-#define INITIAL_SP              (0x20020000UL)
+#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
+    extern uint32_t               Image$$RW_IRAM1$$ZI$$Base[];
+    extern uint32_t               Image$$RW_IRAM1$$ZI$$Length[];
+    extern uint32_t               Image$$ARM_LIB_STACK$$ZI$$Base[];
+    extern uint32_t               Image$$ARM_LIB_STACK$$ZI$$Length[];
+    #define HEAP_START            ((unsigned char*) Image$$RW_IRAM1$$ZI$$Base)
+    #define HEAP_SIZE             ((uint32_t) Image$$RW_IRAM1$$ZI$$Length)
+    #define ISR_STACK_START       ((unsigned char*)Image$$ARM_LIB_STACK$$ZI$$Base)
+    #define ISR_STACK_SIZE        ((uint32_t)Image$$ARM_LIB_STACK$$ZI$$Length)
+#elif defined(__GNUC__)
+    extern uint32_t               __StackTop[];
+    extern uint32_t               __StackLimit[];
+    extern uint32_t               __end__;
+    extern uint32_t               __HeapLimit[];
+    #define HEAP_START            ((unsigned char*)&__end__)
+    #define HEAP_SIZE             ((uint32_t)((uint32_t)__HeapLimit - (uint32_t)HEAP_START))
+    #define ISR_STACK_START       ((unsigned char*)__StackLimit)
+    #define ISR_STACK_SIZE        ((uint32_t)((uint32_t)__StackTop - (uint32_t)__StackLimit))
+#elif defined(__ICCARM__)
+    /* No region declarations needed */
+#else
+    #error "no toolchain defined"
 #endif
 
 #endif