go_away

Author Topic: AVR studio ELF not found  (Read 5624 times)

0 Members and 1 Guest are viewing this topic.

Offline DothosTopic starter

  • Jr. Member
  • **
  • Posts: 42
  • Helpful? 0
AVR studio ELF not found
« on: March 08, 2012, 08:14:38 AM »
I'm getting an error:


Build started 8.3.2012 at 14:04:38
/usr/bin/sh: IC:\MCU\Dev\WebBot\Webbotlib\V1\1.35: command not found
make: [fac2.o] Error 127 (ignored)
mmcu=atmega640  fac2.o   -L"C:\MCU\Dev\WebBot\Webbotlib\V1\1.35"  -lWebbot-ATmega640 -lm -lc  -o fac2.elf
/usr/bin/sh: fac2.o: command not found
make: [fac2.elf] Error 127 (ignored)
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature  fac2.elf fac2.hex
avr-objcopy: 'fac2.elf': No such file
make: *** [fac2.hex] Error 1
Build failed with 1 errors and 0 warnings...

I dont know what to do. It happens when try to not use the makefile created by the project designer so I can add another lib folder.
I need some help please.

Thanks in advance

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: AVR studio ELF not found
« Reply #1 on: March 09, 2012, 09:23:20 AM »
You are using a very old version of WebbotLib . . . download the latest 2.0x version and compile for that using the latest libraries.

Offline DothosTopic starter

  • Jr. Member
  • **
  • Posts: 42
  • Helpful? 0
Re: AVR studio ELF not found
« Reply #2 on: March 10, 2012, 02:41:34 AM »
Ok, I'll do that. but in my main pc I do it like this and it works fine. Are you sure that's the problem?

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: AVR studio ELF not found
« Reply #3 on: March 10, 2012, 06:20:30 AM »
Build started 8.3.2012 at 14:04:38
/usr/bin/sh: IC:\MCU\Dev\WebBot\Webbotlib\V1\1.35: command not found
This looks like a directory, not a command, which makes me think something was left out of the makefile.
Quote
make: [fac2.o] Error 127 (ignored)
I'm guessing this happened because the command needed to build fac2.o was missing (first error).

I'd have to guess too much for a useful answer, can you post the makefile?

Joe

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 360
  • Helpful? 10
Re: AVR studio ELF not found
« Reply #4 on: March 10, 2012, 10:07:05 AM »
Hm, I have been having this problem as well.  It happened when I tried to install AVRStudio 4, whichever is the latest version 4 but NOT version 5 (man, did I EVER screw up explaining that one :-P ) over Windows 7.  I installed AVRStudio 5 and it works like a charm.

I have no idea why it can't find the *.elf file, though, but it is apparently something to do with the makefile that's been generated.

Upside: AVRStudio 5 works swimmingly with Windows 7 and Webbotlib, although I'm using an ISP programmer rather than a bootloader.

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline DothosTopic starter

  • Jr. Member
  • **
  • Posts: 42
  • Helpful? 0
Re: AVR studio ELF not found
« Reply #5 on: March 13, 2012, 07:38:59 AM »
About the makefile. I create the code using Project Designer then I open with AVR 4 and then I uncheck the use external makefile so I can add the folder where I have my own lib... And only when I do that I get the error but I did it in my home computer and it works fine but I can't seem to do it anywhere else. What could be wrong? I tried with the version 2 of the lib and I got the same error..

Code: [Select]
###############################################################################
# Makefile for the project fac2
###############################################################################

## General Flags
PROJECT = fac2
MCU = atmega640
TARGET = fac2.elf
CC =

CPP = avr-g++

## Options common to compile, link and assembly rules
COMMON = -mmcu=$(MCU)

## Compile options common for all C compilation units.
CFLAGS = $(COMMON)
CFLAGS += -Wall -gdwarf-2 -std=gnu99      -DF_CPU=16000000UL -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d

## Assembly specific flags
ASMFLAGS = $(COMMON)
ASMFLAGS += $(CFLAGS)
ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2

## Linker flags
LDFLAGS = $(COMMON)
LDFLAGS +=  -Wl,-Map=fac2.map


## Intel Hex file production flags
HEX_FLASH_FLAGS = -R .eeprom -R .fuse -R .lock -R .signature

HEX_EEPROM_FLAGS = -j .eeprom
HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load"
HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings


## Include Directories
INCLUDES = -I"C:\MCU\Dev\Axon2_projects\factory_2\..\..\WebBot\WebbotLib\V2\2.08" -I"C:\MCU\Dev\Axon2_projects\factory_2\..\..\dothoslib"

## Library Directories
LIBDIRS = -L"C:\MCU\Dev\WebBot\WebbotLib\V2\2.08" -L"C:\MCU\Dev\dothoslib"

## Libraries
LIBS = -lWebbot-ATmega640 -lm -lc

## Objects that must be built in order to link
OBJECTS = gen_tone.o opt_TimerCompare.o opt_DeviceName.o fac2.o opt_TimerCapture.o lib_timerdef.o lib_timers.o lib_iopins.o opt_pcint.o opt_TimerOverflow.o gen_clock.o opt_scheduler.o lib_hardware.o

## Objects explicitly added by the user
LINKONLYOBJECTS =

## Build
all: $(TARGET) fac2.hex fac2.eep fac2.lss## Compile
gen_tone.o: ../lib/gen_tone.c
$(CC) $(INCLUDES) $(CFLAGS) -c -Os $<

opt_TimerCompare.o: ../lib/opt_TimerCompare.c
$(CC) $(INCLUDES) $(CFLAGS) -c -Os $<

opt_DeviceName.o: ../lib/opt_DeviceName.c
$(CC) $(INCLUDES) $(CFLAGS) -c -Os $<

fac2.o: ../fac2.c
$(CC) $(INCLUDES) $(CFLAGS) -c  $<

opt_TimerCapture.o: ../lib/opt_TimerCapture.c
$(CC) $(INCLUDES) $(CFLAGS) -c -Os $<

lib_timerdef.o: ../lib/lib_timerdef.c
$(CC) $(INCLUDES) $(CFLAGS) -c -Os $<

lib_timers.o: ../lib/lib_timers.c
$(CC) $(INCLUDES) $(CFLAGS) -c -Os $<

lib_iopins.o: ../lib/lib_iopins.c
$(CC) $(INCLUDES) $(CFLAGS) -c -Os $<

opt_pcint.o: ../lib/opt_pcint.c
$(CC) $(INCLUDES) $(CFLAGS) -c -Os $<

opt_TimerOverflow.o: ../lib/opt_TimerOverflow.c
$(CC) $(INCLUDES) $(CFLAGS) -c -Os $<

gen_clock.o: ../lib/gen_clock.c
$(CC) $(INCLUDES) $(CFLAGS) -c -Os $<

opt_scheduler.o: ../lib/opt_scheduler.c
$(CC) $(INCLUDES) $(CFLAGS) -c -Os $<

lib_hardware.o: ../lib/lib_hardware.c
$(CC) $(INCLUDES) $(CFLAGS) -c -Os $<

##Link
$(TARGET): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET)

%.hex: $(TARGET)
avr-objcopy -O ihex $(HEX_FLASH_FLAGS)  $< $@

%.eep: $(TARGET)
-avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ || exit 0

%.lss: $(TARGET)
avr-objdump -h -S $< > $@

## Clean target
.PHONY: clean
clean:
-rm -rf $(OBJECTS) fac2.elf dep/* fac2.hex fac2.eep fac2.lss fac2.map


## Other dependencies
-include $(shell mkdir dep 2>NUL) $(wildcard dep/*)


Many thanks for your help anyway.

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: AVR studio ELF not found
« Reply #6 on: March 13, 2012, 10:53:23 AM »
About the makefile. I create the code using Project Designer then I open with AVR 4 and then I uncheck the use external makefile so I can
add the folder where I have my own lib... And only when I do that I get the error but I did it in my home computer and it works fine but I
can't seem to do it anywhere else. What could be wrong? I tried with the version 2 of the lib and I got the same error..

Are you sure you're using the same makefile on both computers? The error message you gave at first doesn't appear to match this makefile.

I don't have time to look at this carefully, but it doesn't look like the makefile that generated the errors.

Joe

Offline DothosTopic starter

  • Jr. Member
  • **
  • Posts: 42
  • Helpful? 0
Re: AVR studio ELF not found
« Reply #7 on: March 13, 2012, 01:40:56 PM »
WWhat I just did in both computers was to disable the use external makefile so I can add another include directory to use my own lib.
Can someone just tell me then what I need to change in the makefile generated by the Project Designer to include another dir? Or what would be the best approach to solve this problem... I'm in kind of a hurry because I've got a robotics competition and I can only compile the code in my home computer  :-\

Thanks

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: AVR studio ELF not found
« Reply #8 on: March 13, 2012, 09:24:32 PM »
Dothos, you can add additional directories right in Project Designer . . .

go to Tools -> Generate, and then in the new window click Add at the bottom to add include folders.

Offline DothosTopic starter

  • Jr. Member
  • **
  • Posts: 42
  • Helpful? 0
Re: AVR studio ELF not found
« Reply #9 on: March 15, 2012, 02:49:17 PM »
LOL I feel so noob I don't know how I missed that but many thanks for taking time for such things.

It solved my problem ;)

 


Get Your Ad Here

data_list