![](/media/cache/profiles/0738069b244a1c43c83112b735140a16.50x50_q85.jpg)
hdk serial test program for EA4088 mbed. HDK Serial stopped after a while.
Dependencies: EALib USBDevice mbed
Fork of LPC4088test by
Revision 1:65017af721b9, committed 2013-10-07
- Comitter:
- mio
- Date:
- Mon Oct 07 21:44:21 2013 +0000
- Parent:
- 0:0e8a8d6e4cfd
- Commit message:
- Simple Test only output message version
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 0e8a8d6e4cfd -r 65017af721b9 main.cpp --- a/main.cpp Sun Oct 06 04:24:24 2013 +0000 +++ b/main.cpp Mon Oct 07 21:44:21 2013 +0000 @@ -1,9 +1,9 @@ #include "mbed.h" -#include "sdram.h" -#include "USBSerial.h" +//#include "sdram.h" +//#include "USBSerial.h" DigitalOut led1(LED1); -USBSerial cdc; +//USBSerial cdc; Serial pc(USBTX,USBRX); #define SIZE (1024*1024) @@ -12,21 +12,21 @@ unsigned char *ptr[100] ; int main() { - sdram_init(); + //sdram_init(); while(1) { - ptr[alloccount] = (unsigned char *)malloc(SIZE) ; - cdc.printf ("Allocated Address = %08X\r\n",ptr[alloccount]); + //ptr[alloccount] = (unsigned char *)malloc(SIZE) ; + //cdc.printf ("Allocated Address = %08X\r\n",ptr[alloccount]); pc.printf ("Allocated Address = %08X\r\n",ptr[alloccount]); - if (ptr[alloccount] == NULL) { - cdc.printf("MAX ALLOC MEMORY %d MB\r\n",alloccount); - pc.printf("MAX ALLOC MEMORY %d MB\r\n",alloccount); - for (int i=0;i<alloccount;i++) { - free(ptr[i]); - } - alloccount = 0; - } else { - alloccount++ ; - } + //if (ptr[alloccount] == NULL) { + // cdc.printf("MAX ALLOC MEMORY %d MB\r\n",alloccount); + // pc.printf("MAX ALLOC MEMORY %d MB\r\n",alloccount); + // for (int i=0;i<alloccount;i++) { + // free(ptr[i]); + // } + // alloccount = 0; + //} else { + // alloccount++ ; + //} led1 = 1; wait(0.1); led1 = 0;