python

Dependencies:   TSI mbed

Fork of pymite by Norimasa Okamoto

Revision:
8:88d4fba4ccd5
Parent:
7:71a6f45bc563
Child:
9:2bba4682879b
diff -r 71a6f45bc563 -r 88d4fba4ccd5 platform/mbed/main.cpp
--- a/platform/mbed/main.cpp	Sat Jun 14 12:14:55 2014 +0000
+++ b/platform/mbed/main.cpp	Sat Jun 21 01:08:08 2014 +0000
@@ -15,29 +15,38 @@
 
 #include "pm.h"
 
-
-#ifdef __cplusplus
-extern
-#endif
-
 #if defined(TARGET_LPC1768)
 #define HEAP_SIZE 0x7000
+#define USRLIB_IMG (uint8_t*)77824
+
 #elif defined(TARGET_LPC1549)
 #define HEAP_SIZE 0x8000
+#define USRLIB_IMG (uint8_t*)61440
+
 #elif defined(TARGET_KL46Z)
 #define HEAP_SIZE 0x7000
+#define USRLIB_IMG (uint8_t*)73728
+
 #elif defined(TARGET_KL25Z)
 #define HEAP_SIZE 0x3400
+#define USRLIB_IMG (uint8_t*)73728
+
 #elif defined(TARGET_LPC4088)
 #define HEAP_SIZE 0xf000
+#define USRLIB_IMG (uint8_t*)73728
+
 #elif defined(TARGET_NUCLEO_F401RE)
-#define HEAP_SIZE 0xf000
+#define HEAP_SIZE 0x15000
+#define USRLIB_IMG (uint8_t*)69632
+
+#elif defined(TARGET_LPC11U68)
+#define HEAP_SIZE 0x7000
+#define USRLIB_IMG (uint8_t*)61440
+
 #else
 #error "target error"
 #endif
 
-unsigned char const usrlib_img[];
-
 uint8_t heap[HEAP_SIZE];
 
 int
@@ -45,7 +54,7 @@
 {
     PmReturn_t retval;
 
-    retval = pm_init(heap, HEAP_SIZE, MEMSPACE_PROG, usrlib_img);
+    retval = pm_init(heap, HEAP_SIZE, MEMSPACE_PROG, USRLIB_IMG);
     PM_RETURN_IF_ERROR(retval);
 
     /* Run the sample program */