A project to implement a console using the Mbed using VGA for video output and a PS/2 keyboard for the input. The eventual goal is to also include tools for managing SD cards, and a semi-self-hosting programming environment.
Dependencies: PS2_MbedConsole fastlib SDFileSystem vga640x480g_mbedconsole lightvm mbed
MbedConsole is a cool little project to have a self-contained computer all on an Mbed. So far it has VGA and PS/2 support and can stand alone without a computer powering it. Next planned features are SD card support and a lightweight programmable VM complete with a file editor and self-hosted assembler.
You can view additional details about it at http://earlz.net/tags/mbedconsole
Diff: shell.cpp
- Revision:
- 20:13556e5bac04
- Parent:
- 18:83579e7dd1bc
diff -r 8a94de51c61a -r 13556e5bac04 shell.cpp --- a/shell.cpp Fri Apr 12 04:15:26 2013 +0000 +++ b/shell.cpp Mon Apr 15 02:37:02 2013 +0000 @@ -32,6 +32,9 @@ #include "mbedconsole.h" #include "plEarlz.h" #include "PS2Keyboard.h" + +#include "SDFileSystem.h" + char kbd_GetKey(); LocalFileSystem local("local"); @@ -104,6 +107,21 @@ while(1){ vputc(kbd_GetKey()); } + }else if(strlcmp(cmd, "test3", 6) == 0) + { + //SDFileSystem sdcard(p11, p12, p13, p20, "sd"); + FILE *fp = fopen("/sd/sdtest.txt", "w"); + if(fp == NULL) { + vputs("Could not open file for write\n"); + } + fprintf(fp, "Hello fun SD Card World!"); + fclose(fp); + }else if(strlcmp(cmd, "format", 7) == 0) + { + if(sdcard->format()!=0) + { + vputs("Error formatting :("); + } }else if(strlcmp(cmd, "plearlz", 8)==0){ valid=1; pl_shell();