A Shell For The Stellaris & Tiva

cli

When [antoker] is working on a microcontroller project, he often has to write short bits of test code to make sure everything in his circuit is working properly. This is a time-consuming task, and a while back he started on a small side project. It’s a command line interface for a microcontroller that allows him to send short commands to the uC over a serial connection to play around with the ADC, UART, and GPIO pins.

[antoker]’s tiny Unix-like environment is based on modules  that can keep track of the time, print the current commands and stack to a terminal, and query things like the current speed of the uC and the available Flash and RAM.

This tiny shell also has scripting capabilities and a jump function, making this a true programming language, however minimal it is. Right now [antoker]’s work is available for the TI Stellaris and Tiva series microcontrollers, and a video of a scripted Larson scanner is available below.

http://www.youtube.com/watch?v=sBu9Q8zHPFk

5 thoughts on “A Shell For The Stellaris & Tiva

  1. I have done something similar on 8-bit processors: Z8, Z180, 8051,
    68HC908 and ATmega. It evolved from a ROM monitor and runs as a
    “task” in a big event loop whenever the serial port collects a line of
    text. It has bare editing and doesn’t bother with anything beyond
    read/print hex. Anything else is luxury on a 8-bitter as it takes up
    about 1.5k byte of code space and minimal RAM in additional to the line
    buffer.

    It is very useful to toggle I/O, set/dump memory or run small functions
    in the background while the rest of the code is running.

  2. Or you could use something like eLua (a scripting language for microcontrollers, interactive so can type commands or small programs).
    Runs on various hosts (STM32, LM3S), Stellaris launchpad port has been done, though not part of official version yet.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.