h1

Writing “nano-curses” for microcontrollers

2010/05/24

My main contract these days is developing into a software stack that needs to both send a lot of debugging and status data, and receive commands over the serial debug port (which in the next generation will be Bluetooth…).  The problem is, I need to be able to deal with this in the main codebase in a relatively sane manner.  That means using xterm command sequences, but hiding them behind some kind of API. The obvious candidate would be curses, of course.

So, I’m developing a microcontroller version of curses, that’s intended to be as lightweight as possible given the complexity of the problem.  The first major cost is the terminal buffer, which has to be at least a byte for every character on the screen.  I might experiment later with a non-buffered curses, especially as this is not intended to run over “slow” connections in the first place (at least for my application).  The real challenge is going to be figuring out things like subwindow scrolling rules, and all the quirks like keeping track of the cursor when a tab is inserted, etc.

I plan on releasing this code as open-source once it’s reasonably usable, and I have somewhere on my as-yet-nonexistant website to put it…

Advertisements

One comment

  1. Any progress on this? I to need a ported version of curses or ncurses for microcontroller.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: