python-on-a-chip online compiler

Dependencies:   mbed TSI

/media/uploads/va009039/p14p-f446re.png

more info: python-on-a-chip

Files at this revision

API Documentation at this revision

Comitter:
va009039
Date:
Sat Jun 21 01:08:08 2014 +0000
Parent:
7:71a6f45bc563
Child:
9:2bba4682879b
Commit message:
add LPC11U68

Changed in this revision

platform/mbed/PinNameTable.h Show annotated file Show diff for this revision Revisions of this file
platform/mbed/main.cpp Show annotated file Show diff for this revision Revisions of this file
platform/mbed/main_nat.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/platform/mbed/PinNameTable.h	Sat Jun 14 12:14:55 2014 +0000
+++ b/platform/mbed/PinNameTable.h	Sat Jun 21 01:08:08 2014 +0000
@@ -1,7 +1,6 @@
-
 /*
  * by pinname.py on
- * Sat Jun 14 20:42:52 2014
+ * Sat Jun 21 08:55:50 2014
  *
  * DO NOT EDIT THIS FILE.
  * ANY CHANGES WILL BE LOST.
@@ -133,9 +132,24 @@
 P(PC_13),P(PC_14),P(PC_15),P(PC_2),P(PC_3),P(PC_4),P(PC_5),P(PC_6),P(PC_7),P(PC_8),
 P(PC_9),P(PD_2),P(PH_0),P(PH_1),P(PWM_OUT),P(SERIAL_RX),P(SERIAL_TX),P(SPI_CS),P(SPI_MISO),
 P(SPI_MOSI),P(SPI_SCK),P(USBRX),P(USBTX),P(USER_BUTTON),
+#elif defined(TARGET_LPC11U68)
+P(A0),P(A1),P(A2),P(A3),P(A4),P(A5),P(D0),P(D1),P(D10),P(D11),P(D12),P(D13),P(D14),
+P(D15),P(D2),P(D3),P(D4),P(D5),P(D6),P(D7),P(D8),P(D9),P(LED1),P(LED2),P(LED3),P(LED4),
+P(LED_BLUE),P(LED_GREEN),P(LED_RED),P(NC),P(P0_0),P(P0_1),P(P0_10),P(P0_11),P(P0_12),
+P(P0_13),P(P0_14),P(P0_15),P(P0_16),P(P0_17),P(P0_18),P(P0_19),P(P0_2),P(P0_20),
+P(P0_21),P(P0_22),P(P0_23),P(P0_3),P(P0_4),P(P0_5),P(P0_6),P(P0_7),P(P0_8),P(P0_9),
+P(P1_0),P(P1_1),P(P1_10),P(P1_11),P(P1_12),P(P1_13),P(P1_14),P(P1_15),P(P1_16),P(P1_17),
+P(P1_18),P(P1_19),P(P1_2),P(P1_20),P(P1_21),P(P1_22),P(P1_23),P(P1_24),P(P1_25),
+P(P1_26),P(P1_27),P(P1_28),P(P1_29),P(P1_3),P(P1_30),P(P1_31),P(P1_4),P(P1_5),P(P1_6),
+P(P1_7),P(P1_8),P(P1_9),P(P2_0),P(P2_1),P(P2_10),P(P2_11),P(P2_12),P(P2_13),P(P2_14),
+P(P2_15),P(P2_16),P(P2_17),P(P2_18),P(P2_19),P(P2_2),P(P2_20),P(P2_21),P(P2_22),
+P(P2_23),P(P2_3),P(P2_4),P(P2_5),P(P2_6),P(P2_7),P(P2_8),P(P2_9),P(SCL),P(SDA),P(USBRX),
+P(USBTX),
 
 #else
 #error "target error"
 #endif
 };
 
+
+
--- 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 */
--- a/platform/mbed/main_nat.cpp	Sat Jun 14 12:14:55 2014 +0000
+++ b/platform/mbed/main_nat.cpp	Sat Jun 21 01:08:08 2014 +0000
@@ -22,13 +22,13 @@
 #include "TSISensor.h"
 #endif
 
-#if defined(TARGET_NUCLEO_F401RE)
+#if DEVICE_ANALOGOUT==0
 class AnalogOut {
 public:
 AnalogOut(PinName pin){}
 void write(float value){}
 void write_u16(unsigned short value){}
-float read(){}
+float read(){ return 0.0; }
 };
 #endif