Proper Debugging for Energia Sketches

Moving a sketch from Energia to Code Composer Studio

Energia is a tool that brings the Arduino and Wiring framework to Texas Instruments’ MSP430 microcontrollers and the MSP430 Launchpad development board. This allows for easy development in an Arduino-like environment while targeting a different microcontroller family.

One problem with Energia and Arduino is the difficulty of debugging. Usually, we’re stuck putting a Serial.println(); and watching the serial port to trace what our program is doing. Other options include blinking LEDs, or using external displays.

Code Composer Studio, TI’s official development tool, allows for line-by-line debugging of applications. You can set breakpoints, watch the value of variables, and step through an application one instruction at a time.

The good news is that the latest version of Code Composer Studio supports importing Energia sketches. Once imported, you can step through the code and easily debug your application. This is a huge help to people developing more complex software using Energia, such as libraries.

TI gives us an overview of the new feature in a video after the break.

[Thanks to Adrian for the tip!]

[Read more...]

A Tiny Bubble Display Alarm Clock

LED

For one reason or another, we’re starting to see a lot of projects featuring some old seven-segment HP bubble displays. Yes, those displays once relegated to ancient electronic calculators are making a comeback for reasons we can’t understand why, other than speculation that someone found a bunch of NOS displays. [Markus] picked up a few of these olde tymie displays and built a very nice bubble display alarm clock.

To keep things simple, [Markus] didn’t go the usual ATMega with RTC route. Instead, he’s using an MSP430, a 32kHz crystal, and a few buttons to construct this tiny alarm clock. It’s powered by a single AAA battery, and in a nice change of pace from fancy, professionally made boards, [Markus] built this on some perfboard with a little bit of enameled wire.

It’s a neat little clock, and with the speaker and most likely extreme battery life thanks to the MSP430, a wonderful portable, classic-looking alarm clock. Video of [Markus] manipulating the time below.

[Read more...]

Multitasking on the MSP430F5529 LaunchPad

MSP430 Scheduler

What exactly is multitasking, scheduling, and context switching? This is a great question for those interested in understanding how operating systems work, even small real-time operating systems (RTOS). [Jeffrey] had the same question, so he built a multitasking scheduler for the MSP430F5529 LaunchPad.

These topics are some of the most difficult to wrap your head around in the embedded world. Choosing a project that helps you understand tough topics is a great way to learn, plus it can be very rewarding. In his post, [Jeffrey] goes over the basics of how all of these things work, and how they can be implemented on the MSP430. Overall, it is a great read and very informative. For more information on RTOS, check out a few sections in the FreeRTOS book. Be sure to see his code in action after the break.

[Jeffery] was nice enough to release all of his code as open source, so be sure to check out his repository on GitHub. “Feel free to use it and learn more. I have made the code self explanatory. Enjoy!”

via [43oh.com]

[Read more...]

Huge RGB Ring Light Clock

ring

After several months of work, [Greg] has completed one of the most polished LED clocks we’ve ever seen. It’s based on the WS2812 RGB LEDs, with an interesting PCB that allowed [Greg] to make a huge board without spending a lot of money.

The board is made of five interlocking segments, held together with the connections for power and data. Four of these boards contain only LEDs, but the fifth controller board is loaded up with an MSP430 microcontroller, a few capsense pads for a 1-D touch controller, and programming headers.

Finishing up the soldering, [Greg] had a beautiful LED ring light capable of being programmed as a clock, but no enclosure. A normal plastic case simply wouldn’t do, so [Greg] decided to try something he’d never done before: casting the PCB inside a block of resin.

A circular mold was made out of a piece of MDF and a router, and after some problems with clear resin that just wouldn’t cure, his ring light was embedded in a hard, transparent enclosure.  Conveniently stuck in the mold, of course. The MDF had absorbed a little bit of the resin, forcing [Greg] to mill the resin ring free from the wood, with a lot of finish sanding to make the clock pretty.

It’s a clock that demonstrates [Greg]‘s copious manufacturing skills, and also his ability to troubleshoot the problems that arose. While he probably won’t be casting things inside an MDF mold anymore, with the right tools [Greg] could easily scale this up for some small-scale manufacturing.

 

Low-Power Orientation Tracker and an Optimized Math Library for the MSP430

MSP430 Orientation Tracker

Orientation trackers can be used for a ton of different applications: tracking mishandled packages, theft notification of valuables, and navigation are just a few examples! A recent blog post from Texas Instruments discusses how to build a low-cost and low-power orientation tracker with the MSP430.

Based on the MSP430 LaunchPad and CircuitCo’s Educational BoosterPack, the orientation tracker is very simple to put together. It can also be made wireless using any of the wireless BoosterPacks with a Fuel Tank BoosterPack, or by using the BLE Booster Pack with a built in Lithium Battery circuitry. TI provides all the necessary code and design files in their reference application for getting your orientation tracker up and running. Be sure to see the device in action after the break! This project not only involves building a low-power orientation tracker, but also showcases IQmathLib, a library of optimized fixed point math functions on the MSP430. One of the more challenging aspects of using small MCUs such as the MSP430 or Arduino is how inefficient built in math libraries are. Check out the IQmathLib, it greatly improves upon the built in math functions for the MSP430.

It would be interesting to see this project modified to be a DIY pedometer or be used on a self-balancing robot. It would also be interesting to see the IQmathLib ported to other micros, such as the Arduino. Take a look and see how you can use this reference design in your own projects!

[Read more...]

Web Interface for the FRAM LaunchPad

webUILaunchpad The Internet of Things is here in full force. The first step when adding to the Internet of Things is obvious, adding a web interface to your project. [Jaspreet] wrote in to tell us about his project that adds a web interface to his MSP430 based project, making it easy to add any project to the internet of things.

Creating a web interface can be a bit overwhelming if you have never done it before. This project makes it easy by using a dedicated computer running Linux to handle all of the web related tasks. The LaunchPad simply interfaces with the computer using USB and Python, and the computer hosts the webpage and updates it in real time using Node.js. The result is a very professional looking interface with an impressively responsive display that can control the on-board LEDs, read analog values from the integrated ADC, and stream accelerometer data. Be sure to see it in action after the break!

We could see this project being expanded to run on the Raspberry Pi with a multitude of sensors. What will you add a web interface to next? Home automation? A weather station? Let us know!

[Read more...]

MSP430-Based CTF Hardware Hacking Challenge

Hardware 'Flag'

Hacking conferences often feature a Capture the Flag, or CTF event. Typically, this is a software hacking challenge that involves breaking into targets which have been set up for the event, and capturing them. It’s good, legal, hacking fun.

However, some people are starting to build CTFs that involve hardware hacking as well. [Balda]‘s most recent hardware hacking challenge was built for the Insomni’hack 2014 CTF. It uses an MSP430 as the target device, and users are allowed to enter commands to the device over UART via a Bus Pirate. Pull off the exploit, and the wheel rotates to display a flag.

For the first challenge, contestants had to decompile the firmware and find an obfuscated password. The second challenge was a bit more complicated. The password check function used memcpy, which made it vulnerable to a buffer overflow attack. By overwriting the program counter, it was possible to take over control of the program and make the flag turn.

The risk of memcpy reminds us of this set of posters. Only abstaining from memcpy can 100% protect you from overflows and memory disclosures!

 

Follow

Get every new post delivered to your Inbox.

Join 92,442 other followers