Scripting Debug Sessions: Python for GDB Remote Serial Protocol

pyrsp-scripted-gdb

Are you tired of hammering out the same commands over and over again in GDB? If not, we highly encourage you take more advantage of The GNU Project Debugger, which is a fantastic way to poke around inside your microcontrollers while they’re running a program.

Back to the matter at hand. [Stef] put together a Python program that leverages GDB’s Remote Serial Protocol. He calls it pyrsp and the talk he recently gave about it can be seen below.

The core feature is the ability to add a callback in your C code that triggers the Python script. Think of this a little bit like a print statement, except you have so much more power since it’s Python and GDB doing the “printing”. Anything that can be done at a breakpoint in GDB can now be executed automatically. So if you need to check a group of registers at every loop execution for hundreds of loops your wrists are going to thank you. Better yet, you can use Python to do the sanity checks automatically, continuing when the data is good and alerting you when it’s not. Neat!

[Read more...]

Hackaday Links: September 21, 2014

hackaday-links-chain

Obviously the best way to show you’ve pwned a piece of hardware is to run Doom on it. This time around it’s not just a hardware hack but a security hack. [Michael Jordan] demonstrates a network vulnerability on a Canon printer by making it run Doom. [Thanks to all who sent this tip to us]

Fans of the photo-resist method of PCB etching will appreciate this Bromograph built from an old all-in-one-printer. When gutted, the body of the printer makes a nice enclosure for four UV Lamps. The treated copper clad goes face-down on the scanner glass with the printed transparency between the two. [Michele's] early testing shows really great results.

[Tom] sent in a link to this video biography of the rLab hackerspace. It shows off the space and its members but also tells the story of a tight-knit community. We enjoyed hearing that almost everything in the space is salvaged and repaired; a great way to acquire equipment on a tight budget while also building the skills of the members.

The bulbs in projectors can be quite expensive to replace. This hack adds an RC filter to the bulb and claims to greatly extend its life. Does this really work and why isn’t it built into the projector?

[Steve Maher] built a GRBL board that is the same form-factor as a DB25 connector housing. It’s basically an Arduino derivative that includes a USB connection, a separate jack for STOP and CYCLE START switches. If you’re not familiar, GRBL is an open source project that lets your drive parallel-port-based hardware with a machine that doesn’t have a parallel port.

Finally, have you heard of the ZofzPCB program before? It’s a way to visualize your gerber files in order to perform a final sanity check before sending your deign off for fabrication. [Thanks Boldport]

Ask Hackaday: How Would You Build a Clock Clock?

clock-clock-in-the-wild

Hotel art often elicits less than a glance from most patrons. But we have to admit if we came across a piece like this we’d be compelled to record a video for later reference. That’s actually where the video came from, this was spotted in a hotel called Ham Yard.

The concept seemed familiar to us and a bit of Google-fu brings up our previous coverage of the concept back in 2010. The display is made up of circular analog clocks and we’d wager this is a version of “a million times” by Human Since 1982, the same artist who brought us the earlier concept.

Since we’re covering this once again we thought it would be fun to ask: how would you go about building your own? There are several challenges that come to mind. First, notice both hands of the analog clocks appear to be exactly the same (there is no short hour hand). Driving the coils of a cheap clock directly (a la Lord Vetinari clock hacking) seems an obvious approach. But look closely and you’ll see the hands sometimes move in opposite directions. There must be a simple way to implement the control, or are we chasing a pipe dream of a low cost version for our workshop clock?

[Thanks Munit]

 

RGB Video Input Hack is a Master Hack for CRT Televisions

component-video-input-hackYou know those hacks that you see, and you totally understand them but are dumbfounded by how the person got there? This. This is the definition of that.

What’s shown on the screen above is about half-way through the process of hacking RGB video into a CRT television that’s not supposed to have it. The lettering is acting a bit like a layer mask, showing bits of the Super Mario Bros. start screen which is being injected from an original Famicom. [Michael J. Moffitt] figured out that he could patch his signals into the multiplexer which is responsible for overlaying the TV’s menu system. Obviously you can’t get your Mario on with this view, but the next step was as simple as finding the blanking pin and tying it 5V. Brilliant.

This particular hack is worthy of recognition. But read through [Michael's] write up and it’s obvious that he knows the driver circuitry beyond the realm of normal curiosity. If you ever get stuck while trying to do something custom, we’d recommend pinging him with your questions (sorry [Michael] but with great knowledge comes great responsibility).

 

Low-Level Computing with Entry-Level Difficulty: DUO Light

simple-computer-helps-encourage-learning-low-level

The hardware can’t get much simpler. The DUO Light uses an ATmega328 (commonly found on Arduino boards) along with an external SRAM chip to provide a low-level computer programming experience that will suit those new to programming and some more experienced tinkerers.

At the time of writing the modest Kickstarter goal of $1100 was just $18 shy of success. We’d wager that this is partly due to the availability of so much support material on [Jack's] website. (fyi- a lot of the links on that page are zip files)

The SD card slot accepts a FAT16 card with byte code for the programs. The available Psuedo C compiler, and assembler let you pick your poison, or you can simply dig into the byte code directly. We didn’t see a schematic, but the firmware and BOM are both available. You should be able to easily figure out connections from those.

We’ve been a fan of [Jack's] work for quite some time. His TTL computer and 16-core ATmega-based offerings are sure to delight, even if you remember seeing them go by the first time. This isn’t his first stab at educational models either. Though we still found his logic chip computer a bit daunting.

 

Munich: Help Plan Hackaday’s First European Event

Munich PartyHackaday in Europe!

On Thursday, November 13th we’ve rented a huge hall in Munich, Germany and plan to host a hacking event followed by a celebration.

You need to take the day off of work and join us. Better yet, convince your boss that this is professional development and that attending is good for the company!

We’re not taking the space shuttle across the pond, this illustration reflects the connection with The Hackaday Prize. This trip will mark the end of the contest and the unveiling of the Grand Prize winner.

 

What do *you* want to hack?

The big question we have right now, is what kind of hands-on hardware hacking do you want to do? We published a page over on Hackaday.io to discuss the possibilities. Let your imagination run wild and we’ll do our best to make it all happen. We know from James’ hackerspace tour last year that there are a ton of Hackaday community members within reasonable travel distance from Munich. Here’s our chance to get everyone together for an Epic day of building and night of partying.

PSP Lithium Hack Could Be Called the Franken-Cell

psp-battery-replacement

You assume that you’ll be able to get parts forever… after all: The Internet. But what if you can’t justify paying the price for them? [Cristi C.] was in this situation, not wanting to fork over $30+ for a replacement PSP battery. The handheld gaming rig itself was just discontinued this year but supposedly the batteries have been out of production for some time. What you see above is the controller board from an original battery, with the cell from a camera battery.

The key is protection. The chemistry in Lithium cells of several types brings a working voltage of around 3.7V. Swapping the cells — even if they are different capacities — should work as protection circuits generally measure current, voltage, and sometimes temperature as they charge in order to know when the cell is full. With this in mind [Christi] cracked open a used Canon NB-6L type battery and grabbed the prismatic cell as a replacement for the pouch cell in the Sony S110 case (PDF). The Canon cell is enclosed in a metal case and is just a bit smaller than the pouch was. This means with careful work it fit back inside the original plastic enclosure.

On a somewhat related note, be careful when sourcing brand-x batteries. Some manufacturers implement checks for OEM equipment but there are ways around that.

Follow

Get every new post delivered to your Inbox.

Join 96,459 other followers