MBED Debug Shell

Recently I have been using an  mbed micro-controllers. These are a great way to rapidly prototype micro-controller projects.  One of the great features of the boards is that they provide a serial-over-usb port that can be used to communicate with the board.

The boards have a good range of on-board peripherals (a:d d:a,pwm,rtc, counters), and can read/write to usb, connect to ethernet.

One of the problems I encounter when moving to new dev tools and micro-controllers is the lack of on-board debugging. An alternative can be to hook something up to a serial port so that you can “talk” to your board, read values from variables and ports.

When working on a new project I like to have the command shell available on the device as well as the program I am working on.

http://mbed.org/users/jont/code/JonsDebugTerminal/ uses the serial over usb port and provides a very simple command “shell”. It can be extended to support the functions you need. As it is, it allows setting of the real time clock, interrogation the A:D converters and the control a few port lines on.

The code is not robust, or neat, or K&R, 🙂 the code has a *lot* of scope for improvement. Its old code I wrote in the 90’s for another micro.

But its good enough to allow you to play with the board and can be help when developing a new project.

This entry was posted in coding, computing, MBED, Raspberry Pi and tagged , , . Bookmark the permalink.

Comments are closed.