DPRG
DPRG List  



[DPRG] Trouble getting WinAVR20070122 working

Subject: [DPRG] Trouble getting WinAVR20070122 working
From: Kipton Moravec kip at kdream.com
Date: Fri Mar 16 09:23:20 CDT 2007

I am not an expert on makefiles, but you have a problem in the makefile.
If you did not modify the makefile, change the name of your program file
to main.c.

There is a way to program C inside AVR studio, that takes care of it for
you.
Kip

On Fri, 2007-03-16 at 07:38 +0000, jl_harris at juno.com wrote:
> Let me apologize for the long post upfront...
> 
> Perhaps someone can help with a WinAVR problem.  I just upgraded to
> WinAVR20070122 (great right?) well... using my previously running code
> and the new makefile template (with the appropriate source name,
> device, etc. changes)  I can't get it to work correctly.  
> 
> 
> 
> +++++FIRST+++++
> 
> I get the following message after I click MakeAll (with either a newly
>  generated project or after a MakeClean):
> 
> 
> > "make.exe" all
> 
> -------- begin --------
> avr-gcc (GCC) 4.1.1 (WinAVR 20070122)
> Copyright (C) 2006 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> make.exe: *** No rule to make target `SRbot.o', needed by `SRbot.elf'.
>  Stop.
> 
> > Process Exit Code: 2
> 
> 
> 
> 
> 
> +++++NEXT+++++
> 
> If I put an old version of SRbot2.o in the project directory I get this
> response from WinAVR20070122:
> 
> > "make.exe" all
> 
> -------- begin --------
> avr-gcc (GCC) 4.1.1 (WinAVR 20070122)
> Copyright (C) 2006 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> 
> Linking: SRbot2.elf
> avr-gcc -mmcu=atmega168 -I. -gdwarf-2 -DF_CPU=24000000UL -Os
> -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall
> -Wstrict-prototypes -Wa,-adhlns=SRbot2.o  -std=gnu99 -Wundef -MMD -MP
> -MF .dep/SRbot2.elf.d SRbot2.o --output SRbot2.elf
> -Wl,-Map=SRbot2.map,--cref   -Wl,-u,vfprintf -lprintf_min  -lm
> avr-gcc: _spawnv: No such file or directory
> make.exe: *** [SRbot2.elf] Error 1
> 
> > Process Exit Code: 2
> 
> 
> 
> 
> 
> +++++THEN+++++
> 
> If I put old versions of these 2 files: (SRbot2.o and SRbot2.elf) in
> the project directory then I get what appears to be working...so long
> as I don't do a MakeClean.  HOWEVER, the 2 files mentioned above are
> not updated.  Also note that avr-gcc apparently doesn't recognize the
> device  (from MCU = atmega168  line in makefile I assume.)
> 
> > "make.exe" all
> 
> -------- begin --------
> avr-gcc (GCC) 4.1.1 (WinAVR 20070122)
> Copyright (C) 2006 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> 
> Size before:
> AVR Memory Usage
> ----------------
> Device: Unknown
> 
> Program:   10246 bytes
> (.text + .data + .bootloader)
> 
> Data:        608 bytes
> (.data + .bss + .noinit)
> 
> 
> 
> 
> Creating load file for Flash: SRbot2.hex
> avr-objcopy -O ihex -R .eeprom SRbot2.elf SRbot2.hex
> 
> Creating load file for EEPROM: SRbot2.eep
> avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
> --change-section-lma .eeprom=0 --no-change-warnings -O ihex SRbot2.elf
> SRbot2.eep || exit 0
> 
> Creating Extended Listing: SRbot2.lss
> avr-objdump -h -S SRbot2.elf > SRbot2.lss
> 
> Creating Symbol Table: SRbot2.sym
> avr-nm -n SRbot2.elf > SRbot2.sym
> 
> Size after:
> AVR Memory Usage
> ----------------
> Device: Unknown
> 
> Program:   10246 bytes
> (.text + .data + .bootloader)
> 
> Data:        608 bytes
> (.data + .bss + .noinit)
> 
> 
> 
> -------- end --------
> 
> 
> > Process Exit Code: 0
> 
> 
> 
> 
> 
> +++++FINALLY+++++
> 
> I wonder if there is a subtle error in the new makefile.  It appears
> that the make.exe (makefile) is doing things out of order.  Why for
> example is it Linking SRbot2.elf on a MakeAll?   There appears to be a
> rule for making SRbot2.o in the new makefile, but I'm no expert on gnu
> makefiles.   Any ideas how to get WinAVR20070122 working? 
> 
> 
> 
> Thanks for any help,
> James Harris
> 
> 
> .
> 
> 
> 
> 
> 
> ________________________________________________________________________
> Interested in getting caught up on today's news?
> Click here to checkout USA TODAY Headlines.
> http://track.juno.com/s/lc?s=198954&u=http://www.usatoday.com/news/front.htm?csp=24
> 
> 
> 
> _______________________________________________
> DPRGlist mailing list
> DPRGlist at dprg.org
> http://list.dprg.org/mailman/listinfo/dprglist
> 


More information about the DPRG mailing list

Copyright © 1984 - 2006 Dallas Personal Robotics Group. All rights reserved.
Website Design by NCC

For the latest robot news visit robots.net