Memorial day is 05/25/2015 – Orders will ship out on May 26th. There will not be any deliveries or shipping on Monday. Any order placed after 11am ET on Friday May 22nd will not start to ship out until Tuesday May 26th.

using POV to do Knight Rider effect?
Moderators: adafruit_support_bill, adafruit

Re: using POV to do Knight Rider effect?

by adafruit on Wed Jun 22, 2011 2:04 pm

just rename the cylon.c code to one of the existing code examples, that way you dont have to worry about the makefile

adafruit
 
Posts: 11904
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: using POV to do Knight Rider effect?

by Tones on Wed Jun 22, 2011 3:30 pm

That did it, thanks!

But I'd like to understand what's happening here in a little more depth. Why is it that "program-eyebeam: eyebeam.hex" works, but "program-cylon:cylon.hex" fails?
Tones
 
Posts: 16
Joined: Fri Dec 12, 2008 5:17 am

Re: using POV to do Knight Rider effect?

by Jaydmdigital on Wed Jun 22, 2011 4:30 pm

Tones wrote:That did it, thanks!

But I'd like to understand what's happening here in a little more depth. Why is it that "program-eyebeam: eyebeam.hex" works, but "program-cylon:cylon.hex" fails?

From the makefile
Code: Select all | TOGGLE FULL SIZE
# Default target.
all:    begin gccversion \
   minipov.hex all_leds.hex alt_leds.hex mypov.hex test_leds.hex \
   largeimage.hex  makefair.hex makezine.hex eyebeam.hex digg.hex make.hex \
   finished end

You have to make sure your cylon.hex is in that list. The program-cylon: is looking for that .hex file to program the AVR with, but until it's built, it won't find it.

-Jay
Jaydmdigital
 
Posts: 5
Joined: Sat Nov 21, 2009 6:38 pm

Re: using POV to do Knight Rider effect?

by Tones on Wed Jun 22, 2011 4:56 pm

I tried adding "cylon.hex" to that list, so that it looks like this:

Code: Select all | TOGGLE FULL SIZE
# Default target.
all:    begin gccversion \
   minipov.hex all_leds.hex alt_leds.hex mypov.hex test_leds.hex \
   largeimage.hex  makefair.hex makezine.hex eyebeam.hex digg.hex make.hex cylon.hex \
   finished end


But this does not solve the bug. I'm receiving the same error message as before: "No rule to make target `cylon.hex', needed by `program-cylon'. Stop."
Tones
 
Posts: 16
Joined: Fri Dec 12, 2008 5:17 am

Re: using POV to do Knight Rider effect?

by Jaydmdigital on Wed Jun 22, 2011 5:12 pm

Code: Select all | TOGGLE FULL SIZE
# Default target.
all:    begin gccversion \
   minipov.hex all_leds.hex alt_leds.hex mypov.hex test_leds.hex \
   largeimage.hex  makefair.hex makezine.hex eyebeam.hex digg.hex make.hex \
        cylon.hex \
   finished end

The \ on the end of each line means there is more than one line. I couldn't tell if you had left it off the end after make.hex, or it the BBS software wrapped that line.

-Jay
Jaydmdigital
 
Posts: 5
Joined: Sat Nov 21, 2009 6:38 pm

Re: using POV to do Knight Rider effect?

by Tones on Wed Jun 22, 2011 5:15 pm

Sorry -- yes "cylon" is on the same line as everything else, it was just wrapped by the BB software.
Tones
 
Posts: 16
Joined: Fri Dec 12, 2008 5:17 am

Re: using POV to do Knight Rider effect?

by Jaydmdigital on Wed Jun 22, 2011 6:09 pm

Ok, I should have tested it before I said anything.

I just tried the makefile only adding in the program-cylon: cylon.hex line. The makefile compiled it no problem. I suggest you upgrade your WinAVR to the latest version http://sourceforge.net/projects/winavr/files/WinAVR/ as I had to.

Code: Select all | TOGGLE FULL SIZE
C:\engineering\projects\WinAVR\sample\minipovfirmware>make -f makefile program-cylon

Compiling: cylon.c
avr-gcc -c -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -DF_CPU=8000000 -Wa,-adhlns=cylon.lst  -mmcu=attiny2313 -
In file included from cylon.c:3:
c:/engineering/projects/winavr/lib/gcc/../../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete.  Use <avr/interrupt.h>."
cylon.c:93: warning: pointer targets in initialization differ in signedness

Linking: cylon.elf
avr-gcc -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -DF_CPU=8000000 -Wa,-adhlns=cylon.o  -mmcu=attiny2313 -std=g
,-Map=.map,--cref

Jaydmdigital
 
Posts: 5
Joined: Sat Nov 21, 2009 6:38 pm

Re: using POV to do Knight Rider effect?

by Tones on Wed Jun 22, 2011 6:49 pm

I'm using the most recent version of avrdude on MacOS.
Tones
 
Posts: 16
Joined: Fri Dec 12, 2008 5:17 am

Re: using POV to do Knight Rider effect?

by Jaydmdigital on Wed Jun 22, 2011 7:06 pm

Tones wrote:I'm using the most recent version of avrdude on MacOS.

Yep, I said WinAVR :) So now that I know you have a Mac, you'll need the avr-gcc properly set up:
http://www.ladyada.net/learn/avr/setup-mac.html

You issue it not avrdude (the flash burning software) it's avr-gcc and the compiling process.
You will probably have to edit the directories that the makefile is using. Here's mine:
Code: Select all | TOGGLE FULL SIZE
# Define directories, if needed.
DIRAVR = c:/engineering/projects/winavr
DIRAVRBIN = $(DIRAVR)/bin
DIRAVRUTILS = $(DIRAVR)/utils/bin
DIRINC = .
DIRLIB = $(DIRAVR)/avr/lib
Jaydmdigital
 
Posts: 5
Joined: Sat Nov 21, 2009 6:38 pm

Re: using POV to do Knight Rider effect?

by Tones on Wed Jun 22, 2011 7:27 pm

:) OK so to be more specific I'm using the most recent AvrMacPack.

I set DIRAVR to MacPack's home:
Code: Select all | TOGGLE FULL SIZE
DIRAVR = /usr/local/CrossPack-AVR


But this has not changed the error message.

I don't think the problem is that it can't find AVR-GCC. Its home was already in my PATH.
Tones
 
Posts: 16
Joined: Fri Dec 12, 2008 5:17 am

Re: using POV to do Knight Rider effect?

by Tones on Wed Jun 22, 2011 7:43 pm

OK I've figured out ways around this by using Makefiles from other projects ... so I'm still not sure what was wrong, but it's not important anymore. Thanks for the help! :D
Tones
 
Posts: 16
Joined: Fri Dec 12, 2008 5:17 am