Trouble compiling

Topics related to the API, programming discussions & questions, coding tips, bugs, etc. should go here.
Post Reply
jss
Posts: 5
Joined: Wed Jan 21, 2009 8:28 pm

Trouble compiling

Post by jss » Wed Jan 21, 2009 8:48 pm

Hi everyone,

I've also posted this over at ladyada's forum, but as it seems more UzeBox specific, I thought I'd follow up here.

I'm getting compilation errors when trying to run make on the Fuzebox hello.c demo. Currently, I'm running Mac OS X 10.5 on an Intel based MacBook with the latest version of AVR MacPack installed. I've modified the included Makefile for the programmer to CC = avr-gcc instead of CC = avr-gc.exe. Aside from that, all files are stock.

Any help would be greatly appreciated.

Thanks!

Here is the terminal output (please let me know if anything else would be helpful):

Code: Select all

avr-gcc -I.. -mmcu=atmega644 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=28636360UL -DVIDEO_MODE=1 -Os -fsigned-char -MD -MP -MT hello2.o -MF dep/hello2.o.d  -c  hello2.c
avr-gcc -I.. -mmcu=atmega644 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=28636360UL -DVIDEO_MODE=1 -Os -fsigned-char -MD -MP -MT uzeboxCore.o -MF dep/uzeboxCore.o.d  -c  ../kernel/uzeboxCore.c
../kernel/uzeboxCore.c: In function `InitConsole':
../kernel/uzeboxCore.c:102: warning: passing arg 1 of `InitMusicPlayer' discards qualifiers from pointer target type
avr-gcc -I.. -mmcu=atmega644 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=28636360UL -DVIDEO_MODE=1 -Os -fsigned-char -MD -MP -MT uzeboxSoundEngine.o -MF dep/uzeboxSoundEngine.o.d  -c  ../kernel/uzeboxSoundEngine.c
avr-gcc -I.. -mmcu=atmega644 -mmcu=atmega644 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=28636360UL -DVIDEO_MODE=1 -Os -fsigned-char -MD -MP -MT uzeboxSoundEngineCore.o -MF dep/uzeboxSoundEngineCore.o.d  -x assembler-with-cpp -Wa,-gdwarf2 -c  ../kernel/uzeboxSoundEngineCore.s
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h: Assembler messages:
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:121: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:122: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:123: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:124: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:125: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:126: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:128: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:129: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:142: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:147: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:159: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:164: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:169: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:174: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:179: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:184: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:192: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:199: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:213: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:218: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:223: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:228: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:233: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:238: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:246: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:253: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:273: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/stdint.h:278: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/inttypes.h:77: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/inttypes.h:81: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/avr/fuse.h:234: Error: unknown opcode `typedef'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/avr/fuse.h:235: Error: junk at end of line, first unrecognized character is `{'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/avr/fuse.h:236: Error: unknown opcode `unsigned'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/avr/fuse.h:237: Error: unknown opcode `unsigned'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/avr/fuse.h:238: Error: unknown opcode `unsigned'
/usr/local/AVRMacPack-20081213/lib/gcc/avr/3.4.6/../../../../avr/include/avr/fuse.h:239: Error: junk at end of line, first unrecognized character is `}'
../kernel/uzeboxSoundEngineCore.s:651: Error: bad expression
../kernel/uzeboxSoundEngineCore.s:651: Error: missing ')'
../kernel/uzeboxSoundEngineCore.s:651: Error: missing ')'
../kernel/uzeboxSoundEngineCore.s:651: Error: missing ')'
../kernel/uzeboxSoundEngineCore.s:651: Error: missing ')'
../kernel/uzeboxSoundEngineCore.s:651: Error: constant value required
../kernel/uzeboxSoundEngineCore.s:651: Error: `,' required
../kernel/uzeboxSoundEngineCore.s:651: Error: constant value required
../kernel/uzeboxSoundEngineCore.s:651: Error: garbage at end of line
../kernel/uzeboxSoundEngineCore.s:659: Error: bad expression
../kernel/uzeboxSoundEngineCore.s:659: Error: missing ')'
../kernel/uzeboxSoundEngineCore.s:659: Error: missing ')'
../kernel/uzeboxSoundEngineCore.s:659: Error: missing ')'
../kernel/uzeboxSoundEngineCore.s:659: Error: `,' required
../kernel/uzeboxSoundEngineCore.s:659: Error: constant value required
../kernel/uzeboxSoundEngineCore.s:659: Error: garbage at end of line
../kernel/uzeboxSoundEngineCore.s:719: Error: bad expression
../kernel/uzeboxSoundEngineCore.s:719: Error: missing ')'
../kernel/uzeboxSoundEngineCore.s:719: Error: missing ')'
../kernel/uzeboxSoundEngineCore.s:719: Error: missing ')'
../kernel/uzeboxSoundEngineCore.s:719: Error: missing ')'
../kernel/uzeboxSoundEngineCore.s:719: Error: constant value required
../kernel/uzeboxSoundEngineCore.s:719: Error: garbage at end of line
make: *** [uzeboxSoundEngineCore.o] Error 1

PlayerOne
Posts: 21
Joined: Mon Sep 29, 2008 8:45 pm
Location: UK

Re: Trouble compiling

Post by PlayerOne » Thu Jan 22, 2009 2:50 pm

From the error messages it seems to be trying to compile the C code as Assembly.

You'll have to wait for someone who knows what they're talking about for more than that. :)

jss
Posts: 5
Joined: Wed Jan 21, 2009 8:28 pm

Re: Trouble compiling

Post by jss » Thu Jan 22, 2009 3:21 pm

Thanks. I poked around at it all day yesterday to no avail and came to a similar conclusion.

The problem seems to lie with #include <io.h>, though it is well documented and normal in its inclusion. Thinking that it may deal with the pre-compiled AVR Toolchain I'm using, I tried installing OSX-AVR, but the same problem persists.

Anyone having luck with this on a Mac? If you wouldn't mind sharing your setup information, it may be helpful.

jss
Posts: 5
Joined: Wed Jan 21, 2009 8:28 pm

Re: Trouble compiling

Post by jss » Fri Jan 23, 2009 5:02 am

Well, the issue stemmed from the latest (12/08) AVR MacPack binaries. Recompiling the toolchain seems to have fixed everything.
Now for the fun part...

User avatar
uze6666
Site Admin
Posts: 4487
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Trouble compiling

Post by uze6666 » Fri Jan 23, 2009 9:21 pm

Would be great if you could take a few minutes and create and entry in the Wiki to describe that, or any useful thing to help Mac addicts. ;)

Uze

jss
Posts: 5
Joined: Wed Jan 21, 2009 8:28 pm

Re: Trouble compiling

Post by jss » Sat Jan 24, 2009 3:45 pm


User avatar
uze6666
Site Admin
Posts: 4487
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Trouble compiling

Post by uze6666 » Tue Jan 27, 2009 11:47 pm

Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest