Adventures with an Atmel SAM7S256

The Arduino’s I have been playing with are nice and fun, but they do not have the horsepower that I would like for my AVC robot. At work I have been using ARM processors and really like them. They are small, fast, and have a million peripherals. So I wanted to take the leap, but some issues help me back.

First is the high cost of professional tool chains. The IAR compiler that we use at work is $5K a year. Not the kind of loose change I can find in the couch cushions. The second is the relative high cost of development boards and JTAG programmers. A JLink with JFLASH license is $300.

Luckily in the last few years, the 3rd party markets have really opened up. Companies like Olimex sell cheap dev boards and JTAG pods. The open source OpenOCD project has provided drivers for those JTAG pods. And the GCC tool chain including Eclipse now support the ARM. So nearly a year ago, I purchased a SAM7S256 based dev board and an Olimex ARM-USB-OCD-H pod. Very quickly I became highly frustrated with the whole mess.

First there must be a million variants on C compilers. GCC, Yagato, and others all seem to do the same thing but differently. Tutorials I would read for one made so sense for the other. Configuration files for OpenOCD would not work. Eclipse would not integrate because they changed the way to install compilers and I could not find any examples. I pretty much though up my hands and gave up.

So a year later, I still need an ARM solution for my AVC project. So I screwed up my courage, bought a case of Mountain Dew, told my wife to hold all calls, and jumped into the learning curve. I had originally given myself 4 hours to get a blinking LED. Well that was a vast under estimate. About 40 hours later I have a stupid blinking LED example using the Yagarto compiler in command line mode (no Eclipse) and the OpenOCD tools in command line mode as well.

Now I consider myself to be fairly knowledgeable in these types of processors. At least that is what I keep telling my boss. But this was way more difficult than it should have been. By slowly building up, I was able to get OpenOCD to at least see my processor. Then I was able to make a project I hacked from various examples for the IAR compiler. Then over a few hours, I figured out the magic sauce to program the FLASH with the image.

And as I mentioned I do not even have Eclipse integrated. But I have make progress. Next will be to build under Eclipse, then run the debugger, and finally get the Micrium RTOS to compile and work. Shall I estimate another 4 hours?

This entry was posted in ARM, AVC. Bookmark the permalink.