Thursday, April 29, 2010

Greatest Song Ever

Here's a screenshot of Pandora playing the greatest song ever:

Some of the things I was obsessed with in high school haven't stood the test of time, but The Smiths most definitely have.

Monday, April 12, 2010

gdb debugging using simavr

I just got debugging using gdb working with simavr. It's as simple as putting
avr->gdb_port = 1234;
avr->state = cpu_Stopped;
in the code that preceeds the simulation loop. Then, start avr-gdb (using the name of your firmware ELF file as the executable), and issue the command "target remote localhost:1234". Presto, you're debugging your firmware. Sweet.

Saturday, April 10, 2010


One of the headaches of developing code for an embedded system is the difficulty of debugging target code. I suppose you can use an ICE if you have money and expertise, but a nice simple alternative is a software simulator.

I just discovered simavr, which is an open-source software simulator for AVR microcontrollers. It is a library which simulates a variety of AVR cores, and has hooks through which you can emulate hardware (such as devices attached to I/O pins). The idea is you write a C program which defines your hook functions, and then call into the library to run the actual simulation.

I was able to get a "blinking LED" program working in a couple hours by adapting the example code. I used ANSI control sequences to visualize the pins of an output port, but you can use any kind of UI you want. It looks as though simavr supports debugging of the target firmware using gdb, which is totally awesome. I will try that next.

Fare thee well, Firefox?

Is it just me, or has firefox gotten to be intolerably slow to start up? I've timed it, and 10-15 seconds is not unusual on the computers I use.

I'm trying out Google Chrome, and I have to say, it seems a lot more responsive.

It doesn't seem all that long ago that I was trying out Phoenix (remember when it was called that?) and it was the best browser out there. I think Firefox was more or less perfect fairly early in its development. I can distinctly remember thinking, in the 2.0 days, "Why is development continuing? It already does everything it needs to do."

I suppose in 10 years I'll be posting about how bloated Chrome has become.