Then, for some reason, the SD card library for mbed would never work the first time I ran it. So, I had to fork it and make it so that "if initialization fails, try one more time, just in case". It's delightfully horrible, but I'm tired of trying to find the correct solution to the problem

So, I've recently been wanting to really get MbedConsole to a all-in-one system, complete with a programming environment. After spending a few months shifting around different ideas on the best way to implement a programming language in such a small amount of resources, I've decided to go another route.

Yesterday, I created a new bitbucket repo called LightVM. Here, I will implement a very lightweight VM complete with a self-hosted assembler with bootstrapping. After getting it to run good on my PC I'll port it to the mbed and eventually also see if it'll work on an ATMega16 or some such.

So, what all will be added to MbedConsole?

LightVM implementation complete with system calls

Assembler for LightVM which runs in LightVM

A very basic file editor. It'll probably be as horrible as ed

"real" filesystem access.

Because the semi-hosted filesystem sucks horribly, I'll be trying to add SD card support

So again, not dead! Check out LightVM. When it gets to a usable state, I'll start working on the bootstrapping assembler and then the actual assembler. The file editor will probably not be made in LightVM for performance and cost of implementation reasons.

Well, I think I should finally document how to actually build the MbedConsole. It's very simple...

A full overview schematic(which I think I did a horrible job on) is below:

I think this design is simple enough that it doesn't need much further explanation. One note though is that you can possible increase or decrease the resistance for the 470ohm resistor connected across RGB. Having more resistance decreases the brightness, having less increases it.

Interrupts are re-prioritized at startup so that the VGA signal never stutters.

Tons of RAM and Flash left over. Just have to find something to do with it!

No ethernet/USB support. The VGA framebuffer uses the memory that is reserved for those components

Anyway, if anyone would like to contribute, I'd love it. Right now my top priority is a simple interactive programming shell using some usable language. I've evaluated Scheme, Forth, and Basic, but haven't found anything I can directly port to the mbed. If anyone would like to try their hand porting a language or even writing something from scratch, I'd most appreciate it! (Also, extra points for using a BSD-style license :) ) I'm really bad at implementing a language in C.

Other than that there is a ton of resources left in this tiny microcontroller to tap. Next on my list:

SD card support

file management commands in the shell

possibly bitmap support for reading from the filesystem

a simple game

Maybe even add a speaker for some basic sound support

And tons of other ideas. What do you think would be cool to implement?

Also, if you want to read more about my latest MbedConsole stuff, or look at the history of it, just look at the MbedConsole tag

For starters, I finally got the PS/2 keyboard working completely. So now getc and friends now point to the PS/2 keyboard and not the serial port. Also, I've added a few more commands than what I had. I also did a lot of other small things like resetting interrupt priorities so that the VGA console should only be disrupted during semi-hosting events(ie, LocalStorage), and probably if the mbed crashes.

As you can see, there is also plearlz. That's actually less of a work in progress than you'd think. I don't have anything "working" right now because it's in the middle of refactor, but it can function as a simple stack calculator so far. I'll consider it complete when I can add words, create "local" variables, and have looping support(which is nearly there, but not quite)

As you can see, the wiring for this project is extremely simple. Ridiculously simple really. I don't have a single real component on my breadboard! All I have are a few resistors. The only thing I might consider adding in the future is a few caps on the power and ground lines of each component.

Don't worry! I'm not just hyping you up for nothing! I expect to release the code along with a more detailed build report probably in a week or two. It's getting very close to "complete" now. What I consider complete is a self-hosting development environment. I'll of course continue improving on it after I release it :)

Also, in case anyone is searching for a PS/2 scancode set 2 map in C source code, here you go. A complete scancode set 2 to ASCII translation table/array. Also BSD licensed. I had to make this by hand. I've come to the conclusion that no sane individual should ever have to do this! Scancode set 2 is SOOO much more complicated compared to set 1!

I just felt I should update on the status of MbedConsole. A formal release is coming soon! I'll probably release it before my Forth interpreter is completely done after all though.

Anyway, I received my nice PS/2 Keyboard Breakout today. I soldered some pins on it and got it to read scan codes from a keyboard with a bit code. So that part is working pretty well. The next big thing is getting it to correctly translate those scancodes to ASCII text. I've done this kind of thing before, so it shouldn't be too hard.

So far, about 8K of RAM is used up in all of the overhead, which I don't think is too terrible. My goal is to have 20K available to the Forth compiler/interpreter thing and I think I will be able to easily manage that even with a couple of utilities. Of course, I'm also already up to 32K of Flash, but that's no big deal since I have 512K

Anyway, I expect to release the code in probably another week or two. Hopefully with some small demo of how awesome it is.

So, I've been working more and more on my recent mbed project. I've decided to go for something really interesting and not too hard.

The project is named MbedConsole because I'm bad at names. Anyway it will feature

PS/2 keyboard support

Monochrome VGA. 640x480, with text and/or graphics

A simple shell

A Forth programming environment

About 20K or so of usable RAM for the Forth environment

SD card support of some kind maybe

All of this works with no external components but a few resistors. This means, it's going to be awesome!

About the Forth environment:

I'm not aiming at all for Forth compatibility, but it definitely has a Forth feel to it(everything is in a stack). The big thing that this is enables is semi-self hosting.. That means I can write some system software in Forth. Because Forth programs don't constantly occupy RAM, this means I can make a "real" computer with a whole 20K of memory. After getting the Forth environment created I'd like to rewrite my shell to use Forth as well. If I really want to get awesome I could even write my Forth implementation in Forth and leave on the virtual machine in native code... I'm not that brave.

Anyway, the Forth environment was at first planned to be interpreted only. Now however, I've found that compiling to a virtual machine is about 10 times easier than trying to interpret it directly. It also will save memory, and probably will be faster. The virtual machine is extremely simple. and should already be Turing complete. Forth however is not quite there yet. It's easy to parse, but string handling in C is never quick to implement.

The end goal for me is to have a very retro-feeling operating system running on the mbed powered by it's Forth interpreter. Things I want to have:

A simple command shell for file management

A way to save the Forth programs you write

A simple text editor of some sort

At least one super simple game

If I remove graphics support, I can also add in network support, but I highly doubt there will be anywhere near enough RAM to be useful for Forth after including a TCP/IP stack. I believe it takes about about 16K by itself :(

Anyway, this project will eventually be released under BSD license. I want to get it half way working before I release it.

So, I recently discovered that the mbed is capable of generating VGA signals without dedicating the entire processor to the task. This is the VGA library I'm using. It has quite a few limitations.

No ethernet/USB/CAN because it uses one of the reserved RAM blocks

Monochrome only. This actually is fine for every application I have in mind.

Using the local filesystem screws it up pretty bad. Basically whenever a filehandle is open, the screen will vary from flickering to not syncing at all. After all handles are closed it acts normal though

Anyway, after I got it hooked up the first thing I wanted to get on it is a simple console. I have that now. In the picture below though I set it up to just print characters typed into a serial terminal.

Here, Taya is enjoying typing and is begging me to let her "play a game" heh. So, now I know what the next step is I suppose.

Anyway, when I get something that actually does something useful, I'll post the source code as BSD licensed.