[McHUG] Butterfly update.
n3sb at qis.net
n3sb at qis.net
Sat Mar 15 19:10:04 EST 2008
Hi Rich;
If you send me a copy of your source code & makefile I'll give it a try and see
if I can figure out what's going on.
Today I started experimenting with a Freescale DSP56F8323 based Demonstration
Board. The IDE is CodeWarrior Special Edition (a free version with a 32Kb code
limit - which is equivalent to the amount of flash memory on the device.) The
IDE downloads code into the chip via a parallel port cable, which makes a JTAG
connection to the chip for programming and debugging. After programming, the
debugger can single step through the source code, examine variables, set
breakpoints, inspect registers, etc. It's nice!
Unfortunately these 56F8300DEMO boards are no longer available. I was able to
get a pair of them on an internet auction website. They are not very complex so
it may be possible to lay out a PC Board and make one from scratch.
I hope to be able to develop some filtering algorithms, and eventually have an
entire signal processing back-end for a SoftRock receiver. I have a lot of
things to figure out between now and then.
73; Steve, N3SB
Quoting Rich Mitchell <geobra at att.net>:
> At the February club meeting Steve gave me a Butterfly and Joe Pardue's book
> on
> programming the Butterfly in C using WinAVR. The Butterfly was the name tag
>
> thing I was demoing at the March club meeting and was also the door prize.
> Well, this weekend I began a very interesting project. The book and its CD
> were
> based on WinAVR from April 2004. I installed the most recent WinAVR from
> December 2007 and tried to run my demo program.
>
> The compiler bombed because it couldn't recognize some of the pin/port names.
>
> Over the past three and a half years several of the names have changed. What
>
> you had to do was find the iom169.h file from 2004 and compare it with the
> 2007
> file to find the updated names and change these in the program.
>
> Once that was done, the compiler started complaining about sbi() and cbi().
>
> Joe, in his book, mentioned that these were deprecated but said we'd use them
>
> anyway. Well, in 2007 they weren't just deprecated, they were gone! A
> little
> surfing showed it was a very simple replacement. sbi stood for set bit and
> cbi
> for clear bit. (set interrupt sei() and clear interrupt cli() still work.)
>
> Here's how I updated the code.
> ADCSRA &= _BV(ADEN); //cbi (ADCSRA, ADEN);
> ADCSRA |= _BV(ADEN); //sbi (ADCSRA, ADEN);
>
> With these changes made my code compiled, but built a module for AVR Studio
> with
> errors. I use AVR Studio to load the code into the microcontroller. I ended
> up
> loading the .hex file into AVR Studio, not the .coff and was able to program
> the
> Butterfly. I tried to program the Butterfly using AVRDUDE but there is some
>
> kind of problem:
>
> C:\AVR Programs\NameTag2b>make program
> avrdude -p atmega169 -P com2 -c butterfly -v -v -U flash:w:Demo.hex
> . . . . . . .
> Programmer Type : avr910
> Description : Atmel Butterfly Development Board
>
> Connecting to programmer: .
> Found programmer: Id = ""; type = H
> Software Version = +. ; Hardware Version = .j
> avrdude: error: buffered memory access not supported. Maybe it isn't
> a butterfly/AVR109 but a AVR910 device?
> make: *** [program] Error 1
>
> Steve, if you have any ideas let me know. I'm still modifying the original
> file. I have not tried the facility that creates a new make file.
>
> WHY IS THIS IMPORTANT???? If we can compile our code and program the
> microcontroller using just the command line, we can use some very simple
> (old)
> computers to develop our code - certainly dumpster grade, maybe landfill
> grade.
> And then we can use that tool chain to process our Arduino code, which means
> we
> won't have to rely on their Java IDE. The Arduino libraries will hide the C
>
> complexities while the command line tool chain would allow us to use old
> machines. Also you would be able to switch between Windows and Linux and
> still
> have the same development process. And yet if you needed to, or wanted to,
> you
> could develop in straight C.
>
> If we can get a command line tool chain working, you would build and deploy
> your code with just 3 commands:
> make clean
> make all
> make program
> The trick is to get the parameters in the make file right.
>
> Welcome to Dick K3KWL who joined us last night. We are now 7:
> Dick K3KWL
> Bill W3STG
> John K3KWO
> Chuck KJ4GU
> Steve N3SB
> Pete W3GVX
> Rich N3III
>
> 73,
> Rich, N3III
> --
> McHUG - Physical Computing ;)
> MicroController Ham User Group
> ______________________________________________________________
> McHUG mailing list
> Home: http://mailman.qth.net/mailman/listinfo/mchug
> Help: http://mailman.qth.net/mmmain.htm
> Post: mailto:McHUG at mailman.qth.net
>
More information about the McHUG
mailing list