trying to compile USBTINYISP with winavr

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

trying to compile USBTINYISP with winavr

Postby ckeays » Sun Mar 28, 2010 6:23 pm

Please help, I have been trying for 6 hours to compile the code from usbtinyisp with winavr.
I am getting an error like this:
Code: Select all
> "make.exe" all
avr-gcc -Os -g -Wall -I. -I../usbtiny  -mmcu=attiny2313 -c ../usbtiny/crc.S
avr-gcc -Os -g -Wall -I. -I../usbtiny  -mmcu=attiny2313 -c ../usbtiny/int.S
avr-gcc -Os -g -Wall -I. -I../usbtiny  -mmcu=attiny2313 -c ../usbtiny/usb.c
avr-gcc -Os -g -Wall -I. -I../usbtiny  -mmcu=attiny2313 -c -o main.o main.c
avr-gcc -g -mmcu=attiny2313 -o main.elf crc.o int.o usb.o main.o
process_begin: CreateProcess(NULL, python ../usbtiny/../util/check.py main.elf 32 2048 128, ...) failed.
make (e=2): The system cannot find the file specified.

make.exe: *** [main.hex] Error 2

> Process Exit Code: 2
> Time Taken: 00:00


Can someone help me? I want to compile the code for a 90S2313 because I don't have any atiny2313.
ckeays
 
Posts: 5
Joined: Sun Mar 28, 2010 6:17 pm

Re: trying to compile USBTINYISP with winavr

Postby franklin97355 » Sun Mar 28, 2010 8:41 pm

-mmcu=attiny2313
Don't you need to change this before you make?
User avatar
franklin97355
 
Posts: 1705
Joined: Mon Apr 21, 2008 1:33 pm

Re: trying to compile USBTINYISP with winavr

Postby ckeays » Sun Mar 28, 2010 10:44 pm

franklin97355 wrote:
-mmcu=attiny2313
Don't you need to change this before you make?



The problem is it won't compile the way it is right now without changes.
ckeays
 
Posts: 5
Joined: Sun Mar 28, 2010 6:17 pm

Re: trying to compile USBTINYISP with winavr

Postby adafruit » Mon Mar 29, 2010 9:16 am

process_begin: CreateProcess(NULL, python ../usbtiny/../util/check.py main.elf 32 2048 128, ...) failed.


what on earth are you putting in for the chipburning to make it try to run " python ../usbtiny/"?
User avatar
adafruit
 
Posts: 10483
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: trying to compile USBTINYISP with winavr

Postby ckeays » Mon Mar 29, 2010 11:28 am

adafruit wrote:what on earth are you putting in for the chipburning to make it try to run " python ../usbtiny/"?


I am not sure what you mean.

I thought I would just compile it the way it is exactly as I downloaded it. (unzipped, a folder is created called usbtinyisp. I copied this folder to c:\winavr.) I did not modify the files in any way until I can compile them successfully.

FIRST I wanted to see if it would compile the way it is before I made any changes.

Of course someone compiled this because there is a hex file included, so I know it's possible!

I am using WinAVR-20081205.

Please help!
ckeays
 
Posts: 5
Joined: Sun Mar 28, 2010 6:17 pm

Re: trying to compile USBTINYISP with winavr

Postby oPossum » Mon Mar 29, 2010 12:07 pm

A Python program is used to validate the build. You could install Python or edit common.mk so it does not call check.py...

Code: Select all
Change this:

main.hex:   main.elf $(UTIL)/check.py
   @python $(UTIL)/check.py main.elf $(STACK) $(FLASH) $(SRAM)
   avr-objcopy -j .text -j .data -O ihex main.elf main.hex

to this:

main.hex:   main.elf
   avr-objcopy -j .text -j .data -O ihex main.elf main.hex


I am the Possum, and I approve of this message. Sent from MacBook Wheel Sorry for my bad German.
User avatar
oPossum
 
Posts: 634
Joined: Thu Oct 25, 2007 11:42 pm
Location: Michigan, USA

Re: trying to compile USBTINYISP with winavr

Postby ckeays » Mon Mar 29, 2010 1:05 pm

oPossum wrote:A Python program is used to validate the build. You could install Python or edit common.mk so it does not call check.py...

Code: Select all
Change this:

main.hex:   main.elf $(UTIL)/check.py
   @python $(UTIL)/check.py main.elf $(STACK) $(FLASH) $(SRAM)
   avr-objcopy -j .text -j .data -O ihex main.elf main.hex

to this:

main.hex:   main.elf
   avr-objcopy -j .text -j .data -O ihex main.elf main.hex




Thanks, that worked. HOWEVER, now the hex file is too big for the attiny2313!
here is the end of the hex file:
Code: Select all
:1007F0009F908F907F900895949A80E781BBBFDD92
:0C08000080E582BBC4DDFECFF894FFCF82
:02080C00D25ABE
:00000001FF


as you can see, its too big! I am by no means a "C" guy (obviously).
Is there a command to "optimize code" or something?

I would love to have this code in assembly!
ckeays
 
Posts: 5
Joined: Sun Mar 28, 2010 6:17 pm

Re: trying to compile USBTINYISP with winavr

Postby oPossum » Mon Mar 29, 2010 1:11 pm

An older version of AVR GCC is required to make it fit. Much of the code is already in assembly.

From http://www.xs4all.nl/~dicks/avr/usbtiny/ ...

I initially used gcc-3.4.3 with the -Os option, which generates reasonable compact code. Unfortunately, newer versions like gcc-4.1.0 generate about 10% more code, and as a result, the application code did not fit in 2K anymore. To make it fit, I had to remove the optional vendor and device strings, by undefining the USBTINY_VENDOR_NAME and USBTINY_DEVICE_NAME macros.
I am the Possum, and I approve of this message. Sent from MacBook Wheel Sorry for my bad German.
User avatar
oPossum
 
Posts: 634
Joined: Thu Oct 25, 2007 11:42 pm
Location: Michigan, USA

Re: trying to compile USBTINYISP with winavr

Postby ckeays » Mon Mar 29, 2010 1:49 pm

oPossum wrote:An older version of AVR GCC is required to make it fit. Much of the code is already in assembly.

From http://www.xs4all.nl/~dicks/avr/usbtiny/ ...

I initially used gcc-3.4.3 with the -Os option, which generates reasonable compact code. Unfortunately, newer versions like gcc-4.1.0 generate about 10% more code, and as a result, the application code did not fit in 2K anymore. To make it fit, I had to remove the optional vendor and device strings, by undefining the USBTINY_VENDOR_NAME and USBTINY_DEVICE_NAME macros.


I downloaded WinAVR-20060125 and it worked! The code now runs in a 90S2313!

IF anyone would like the hex file, I can post it (if it's okay with the mods here)

Thank you for your help!
ckeays
 
Posts: 5
Joined: Sun Mar 28, 2010 6:17 pm


Return to USBtinyISP

Who is online

Users browsing this forum: No registered users and 0 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [105]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[108]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[69]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]