tvbgone Caitsinth firmware 1.2 missing hex file

Get help and show off your TV-B-Gone kit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
mikeysklar
 
Posts: 11727
Joined: Mon Aug 01, 2016 8:10 pm

Re: tvbgone Caitsinth firmware 1.2 missing hex file

Post by mikeysklar »

It is necessary to set your PATH environment variable so the avr-gcc compiler is in a known location.

Please provide the full output (both commands and errors).

Code: Select all

$ export PATH=/home/sklarm/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin:$PATH
$ make
Confirm what your PATH is. sklarm is my username so change that portion of the PATH to your username and confirm the path to the avr-gcc binary directory. It should be similar to what I am using above.

User avatar
hasch
 
Posts: 14
Joined: Sun Sep 15, 2013 9:58 am

Re: tvbgone Caitsinth firmware 1.2 missing hex file

Post by hasch »

Code: Select all

Hans-MacBook-Pro:~ hasch$ export PATH=/home/sklarm/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin:$PATH
Hans-MacBook-Pro:~ hasch$ make
-bash: /usr/local/bin/make: Bad CPU type in executable
Hans-MacBook-Pro:~ hasch$ 

User avatar
mikeysklar
 
Posts: 11727
Joined: Mon Aug 01, 2016 8:10 pm

Re: tvbgone Caitsinth firmware 1.2 missing hex file

Post by mikeysklar »

Close. Make sure you verify the directory you are adding to your path. The one you tried has my <username> sklarm. You need to use your homedirectory and confirm the path exists.

eg. change this:

Code: Select all

export PATH=/home/sklarm/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin:$PATH
to this:

Code: Select all

export PATH=/home/hasch/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin:$PATH
Make sure that this folder exists before running make:

Code: Select all

ls export /home/hasch/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin

User avatar
hasch
 
Posts: 14
Joined: Sun Sep 15, 2013 9:58 am

Re: tvbgone Caitsinth firmware 1.2 missing hex file

Post by hasch »

Code: Select all

Hans-MacBook-Pro:~ hasch$ export PATH=/Users/hasch/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin:$PATH
Hans-MacBook-Pro:~ hasch$ ls /Users/hasch/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin
avr-addr2line	avr-elfedit	avr-gcc-ranlib	avr-ld.bfd	avr-readelf
avr-ar		avr-g++		avr-gcov	avr-man		avr-size
avr-as		avr-gcc		avr-gcov-dump	avr-nm		avr-strings
avr-c++		avr-gcc-7.3.0	avr-gcov-tool	avr-objcopy	avr-strip
avr-c++filt	avr-gcc-ar	avr-gprof	avr-objdump
avr-cpp		avr-gcc-nm	avr-ld		avr-ranlib
Hans-MacBook-Pro:~ hasch$ make
-bash: /usr/local/bin/make: Bad CPU type in executable

User avatar
mikeysklar
 
Posts: 11727
Joined: Mon Aug 01, 2016 8:10 pm

Re: tvbgone Caitsinth firmware 1.2 missing hex file

Post by mikeysklar »

Good job working out the PATH.

Use the /usr/bin/make the /usr/local/bin/make might be 32-bit or meant for some other architecture.

User avatar
hasch
 
Posts: 14
Joined: Sun Sep 15, 2013 9:58 am

Re: tvbgone Caitsinth firmware 1.2 missing hex file

Post by hasch »

OK, it nearly works but it seems not to be a makefile in the path.

Code: Select all

Hans-MacBook-Pro:~ hasch$ /usr/bin/make
make: *** No targets specified and no makefile found.  Stop.

User avatar
mikeysklar
 
Posts: 11727
Joined: Mon Aug 01, 2016 8:10 pm

Re: tvbgone Caitsinth firmware 1.2 missing hex file

Post by mikeysklar »

Make sure you are still in the caitsinth-custom directory you unzip'd when running /usr/bin/make.

Code: Select all

/Users/mikeysklar/Downloads/caitsinth-custom

User avatar
hasch
 
Posts: 14
Joined: Sun Sep 15, 2013 9:58 am

Re: tvbgone Caitsinth firmware 1.2 missing hex file

Post by hasch »

OK, I need some more help:

Code: Select all

Hans-MacBook-Pro:~ hasch$ cd /Users/hasch/Documents/Arduino/BANNED-custom 
Hans-MacBook-Pro:BANNED-custom hasch$ /usr/bin/make
set -e; avr-gcc -MM -mmcu=attiny85 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -DF_CPU=8000000 -Wa,-adhlns=util.lst  -std=gnu99 -DNA_CODES util.c \
	| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > util.d; \
	[ -s util.d ] || rm -f util.d
sh: /usr/local/bin/avr-gcc: Bad CPU type in executable
set -e; avr-gcc -MM -mmcu=attiny85 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -DF_CPU=8000000 -Wa,-adhlns=WORLDcodes.lst  -std=gnu99 -DNA_CODES WORLDcodes.c \
	| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > WORLDcodes.d; \
	[ -s WORLDcodes.d ] || rm -f WORLDcodes.d
sh: /usr/local/bin/avr-gcc: Bad CPU type in executable

-------- begin --------
sh: /usr/local/bin/avr-gcc: Bad CPU type in executable
make: *** [gccversion] Error 126

User avatar
mikeysklar
 
Posts: 11727
Joined: Mon Aug 01, 2016 8:10 pm

Re: tvbgone Caitsinth firmware 1.2 missing hex file

Post by mikeysklar »

Set your path for the compiler you need to do this each time you open a new Terminal session.

You are in the right directory for the source code, but your default PATH is trying to call /usr/local/bin/avr-gcc instead of the Arduino installed cross-compiler.

Code: Select all

cd /Users/hasch/Documents/Arduino/caitsinth-custom 
export PATH=/Users/hasch/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin:$PATH
/usr/bin/make

User avatar
hasch
 
Posts: 14
Joined: Sun Sep 15, 2013 9:58 am

Re: tvbgone Caitsinth firmware 1.2 missing hex file

Post by hasch »

OK, I did:

Code: Select all

Hans-MacBook-Pro:BANNED-custom hasch$ export PATH=/Users/hasch/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin:$PATH
Hans-MacBook-Pro:BANNED-custom hasch$ /usr/bin/make
set -e; avr-gcc -MM -mmcu=attiny85 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -DF_CPU=8000000 -Wa,-adhlns=util.lst  -std=gnu99 -DNA_CODES util.c \
	| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > util.d; \
	[ -s util.d ] || rm -f util.d
set -e; avr-gcc -MM -mmcu=attiny85 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -DF_CPU=8000000 -Wa,-adhlns=WORLDcodes.lst  -std=gnu99 -DNA_CODES WORLDcodes.c \
	| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > WORLDcodes.d; \
	[ -s WORLDcodes.d ] || rm -f WORLDcodes.d

-------- begin --------
avr-gcc (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or BANNED FOR A PARTICULAR PURPOSE.

make: *** No rule to make target `main.o', needed by `tvbgone.elf'.  Stop.

User avatar
mikeysklar
 
Posts: 11727
Joined: Mon Aug 01, 2016 8:10 pm

Re: tvbgone Caitsinth firmware 1.2 missing hex file

Post by mikeysklar »

Thats good. You got the compiler and path worked out.

This error looks like you might have modified the Makefile or src code. Start with a fresh unzip of the caitinth-custom and do the PATH setup and make again.

User avatar
hasch
 
Posts: 14
Joined: Sun Sep 15, 2013 9:58 am

Re: tvbgone Caitsinth firmware 1.2 missing hex file

Post by hasch »

This error looks like you might have modified the Makefile or src code.
Sure, I renamed main.c into BANNED-custom.ino to be able to compile using Arduino IDE. With the freshly unzipped file it works.
But isn't there a handy possibility to get it work in Arduino IDE, too?

User avatar
mikeysklar
 
Posts: 11727
Joined: Mon Aug 01, 2016 8:10 pm

Re: tvbgone Caitsinth firmware 1.2 missing hex file

Post by mikeysklar »

I don't know how to this with the Arduino IDE. It has three different source files (main, worldcodes and util) that need to all compiled and linked. Had caitsinth been released as an Arduino Library then main would just be a .INO sketch same as everything else. You can research library.properties and see how much of the code can be reformatted for Arduino use.

Post Reply
Please be positive and constructive with your questions and comments.

Return to “TV-B-Gone Kit”