Reverse Engineering ST-Link/V2 Firmware

reverse-engineering-stlink-v2

The chip seen just above the center of this image is an ARM Cortex-M3. It provides the ability to interface and program the main chip on the STM32F3 Discovery board. The protocol used is the ST-Link/V2 which has become the standard for ST Microelectronics development boards. The thing is, that big ARM chip near the bottom of the image has multiple UARTs and bridging a couple of solder points will connect it to the ST-Link hardware. [Taylor Killian] wanted to figure out if there is built-in firmware support to make this a USB-to-serial converter and his path to the solution involved reverse engineering the ST-Link/V2 firmware.

The first part of the challenge was to get his hands on a firmware image. When you download the firmware update package the image is not included as a discrete file. Instead he had to sniff the USB traffic during a firmware update. He managed to isolate the file and chase down the encryption technique which is being used. It’s a fun read to see how he did this, and we’re looking forward to learning what he can accomplish now that’s got the goods he was after.

This Day In Hack A Day History: January 1st 2005

TIMEHAX

A new feature that we’re playing with is an occasional look back at this day in Hack a Day history. While we’re still hotly disputing exactly what, when, and how to show, we thought today would be a great day to introduce the idea.

So, in on this day in Hack a Day history we’re reaching back to our very first January 1, which was 2005.  There are some interesting things to consider when reading this post. At this point in time, we were still sort of  a growth off the side of engadget like [Kuato] from the 1990 version of Total Recall.  We were less than a year old and still hadn’t completely developed our style, we didn’t really share much information about the project, and yep, the very first comment is “not a hack”.

Continue reading “This Day In Hack A Day History: January 1st 2005”

Hackaday Links: December 13th, 2012

Cardboard box computer

links-cardboard-box-computer

[Alistair] chapman had a Laptop with a broken screen sitting in his parts bin. He knew he had an LCD panel on hand that would probably work with it, but it wouldn’t fit in the case. His solution was to transplant all the computer parts into a cardboard box from a motherboard.

This violin is garbage

links-landfill-instruments

The kids in this orchestra live in a villiage built on top of a landfill. But they make the most out of what they have. This orchestra is composed of instruments built from garbage and they seem to work pretty well. [Thanks Bruce]

More LED mystery puzzles

links-led-puzzle

[Henryk] is at it again. He puts together some very impressive circuits that play tricks on your engineering mind. His latest is three LEDs in series. Look closely and you’ll see they’re not performing as expected. Watching the solution to one of his previous puzzles will help you figure out how he’s doing it. His work is simply amazing.

Netbook framed as a dedicated weather station

links-netbook-weather-display

Not wanting to get rid of old but still working hardware, [Retro Toaster] built a dedicated weather station by mounting the screen, keyboard, and track pad in a picture frame.

Current and voltage testing your USB projects

links-USBTesterFront

This dev board is a pass-through for USB devices. It makes voltage and current testing your device quite simple.

ARM Powered Rack Mount USB Test Equipment

developing-rack-mount-pcb-testing-tools

This is a device which [Limpkin] has been developing at his day job. It’s a high-speed testing interface for use with Physics experiments. We find it interesting because it uses an ARM microcontroller to implement CDC and MSD over USB.

The design is in two parts to make it work in a rack-mount situation. That big white connector allows cards to be swapped out. You can see the board on the right has a USB-A connector. When plugged in this enumerates as a control device (CDC) and a mass storage device (MSD) using fat32 as a file system.

The platform is being developed with open hardware and open source software in mind. If you’re working on a project that uses either of these USB functionalities this makes a swell reference. The ARM Cortex-M3 chip that he’s using is an AT91SAM3U but it should not be too hard to port the code for other similarly-capable ARM processors.

Mass Storage Bootloader For Stellaris Launchpad

mass-storage-bootloader-ti-stellaris-launchpad

[Andrzej Surowiec] liked the functionality of the mass storage bootloader available on some NXP LPC development boards. His latest project was to write a mass storage bootloader for the Stellaris Launchpad. It allows you to flash your compiled firmware to the chip simply by mounting the board as a USB storage device and copying over the binary file. The chip has plenty of flash memory (the bootloader itself takes up 16 KB of the available 256 KB), and the board is already set up for use as USB hardware.

There is a precompiled binary available at the linked page above or you can get the source code from his github repository. We think this project is a good stepping off point for others. For instance, it should be relatively easy to use [Andzej’s] work as the base for implementing filesystem-based I/O control like we saw in the phatIO project.

Hackaday Links: November 29th, 2012

EMC2 CNC keyboard labels

If you’ve got a dedicated computer running EMC2 for CNC control you may be interested in these keyboard labels. [Rich] mentions that they use the labels for their engraver at the Connecticut Hackerspace. Just print them out and glue them in the face of the keys.

Dev board seminars and freebies

[Mike] wrote in to tell us STM is giving away samples of the STM32 F3 Discovery again. But you can also get in on some free seminars. One is an online webinar for TI’s Launchpad family, the other is for the F3 Discovery board and is being held all around the US.

Replacing batteries with USB power

[Johan] didn’t want to use batteries for the light on the microscope he uses when working with SMT parts. He added a few components with let him power the device from USB instead.

MSP430 VU meter uses FFT

Here’s an MSP430 using Fast Fourier Transform for signal processing. There’s very little explanation, but apparently this collection of FFT related material was used heavily in the project. [via Reddit]

Cell Racr

If you’re looking for a new office game you might consider Cell Racr. It pits your cellphone’s vibrating motor against everyone else’s. Just place the phone on an incline and repeatedly dial its number to advance toward the finish line.

PhatIO Uses File System To Control External Hardware

[Andrew Smallbone] wrote in with a link to his latest open source project. This is phatIO, a USB I/O device that uses a mass storage file system for control. The idea is that any operating system can manipulate files on a USB storage device. This enumerates as mass storage, and any alterations you make to its file system will result in pin manipulation on the I/O header.

We’ve long been Linux advocates and enjoy the fact that everything on a *nix system is a file. This simply extends the idea across multiple platforms. [Andrew’s] guide for the hardware gives an overview of how the system is structured. The top ‘io’ directory contains sub-directories called mode, pins, status, and a few others. Inside the directories are files for each pin. Writing to these files has much the same effect as writing to a data direction register, port register, or reading a pin register on a microcontroller.

The board is not yet in production and the github link to his hardware files gives us a 404 error. But there is code available for several software demos. After the break we’ve included video of the phatIO driving a Larson scanner.

Continue reading “PhatIO Uses File System To Control External Hardware”