Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Avr-objcopy being passed the wrong filename (the extension)(invoking avr-objcopy has the file name extinsion from the passing code)
Avr-objcopy being passed the wrong filename (the extension) [message #1731612] Sat, 07 May 2016 21:22 Go to next message
Eclipse UserFriend
Salutations... I have a new project and when I have everything compiling I noticed that it failed to create a .hex file. here is a few lines from the console:

End of search list.
avr-objcopy -R .eeprom -R .fuse -R .lock -R .signature -O ihex ds18b20_temperature.hex "ds18b20_temperature.hex"
makefile:76: recipe for target 'ds18b20_temperature.hex' failed
Finished building: ds18b20_temperature.hex


The filename ds18b20_temperature.hex is the output file name, but somehow gets placed as the input filename also. It should be just the ds18b20_temperature.elf file that is the input. I've done it via the CLI, so it works. Where is it getting the .hex for the input??? The project name is "ds18b20_temperature", so I must have configured something erroneously. I've spent a number of days trying to figure this out and I thought I'd ask for assistance as I'm about to just re-do the project...

Thanks

Jack
Re: Avr-objcopy being passed the wrong filename (the extension) [message #1731615 is a reply to message #1731612] Sat, 07 May 2016 21:50 Go to previous messageGo to next message
Eclipse UserFriend
What plug-in are you using? Is this Arduino or something else?
Re: Avr-objcopy being passed the wrong filename (the extension) [message #1731618 is a reply to message #1731612] Sat, 07 May 2016 22:03 Go to previous messageGo to next message
Eclipse UserFriend
I was reading through the make file and had these:

# All Target
all: ds18b20_temperature.hex secondary-outputs

# Tool invocations
ds18b20_temperature.hex: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: AVR C++ Linker'
avr-g++ -Wl,-Map,ds18b20_temperature.map,--cref -mrelax -Wl,--gc-sections -L/home/jack/mnt/dev-test/eclipse/seq_led/Debug/libraries -mmcu=atmega328p -o "ds18b20_temperature.hex" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '

ds18b20_temperature.lss: ds18b20_temperature.hex
@echo 'Invoking: AVR Create Extended Listing'
-avr-objdump -h -S ds18b20_temperature.hex >"ds18b20_temperature.lss"
@echo 'Finished building: $@'
@echo ' '

ds18b20_temperature.hex: ds18b20_temperature.hex
@echo 'Create Flash image (ihex format)'
-avr-objcopy -R .eeprom -R .fuse -R .lock -R .signature -O ihex ds18b20_temperature.hex "ds18b20_temperature.hex"
@echo 'Finished building: $@'
@echo ' '

I believe the line that is

ds18b20_temperature.hex: ds18b20_temperature.hex

should be

ds18b20_temperature.hex: ds18b20_temperature.elf

The macro expansions above it are all blank, rather curious...

Also, my other builds have the following macro expansions filled in, these are actually before the above, somehow it seems right when I do it this way..?...

# Add inputs and outputs from these tool invocations to the build variables
LSS += \

FLASH_IMAGE += \

EEPROM_IMAGE += \

SIZEDUMMY += \

AVRDUDEDUMMY += \


# All Target

The all target above is the one starting the first console paste. I haven't seen anything on this, but I'm sure if I can do it, someone else can also.

Thanks again...

Jack
Re: Avr-objcopy being passed the wrong filename (the extension) [message #1731628 is a reply to message #1731615] Sun, 08 May 2016 08:08 Go to previous message
Eclipse UserFriend
I'm using the AVR plugin (for the ATmega 328p micro controller.) Not really interested in the Arduino, although it's kind of fun to toy with via their interface. Never tried the Eclipse version, I need more than the Arduino software usually does.

I have added a post since your's was posted about the macro's not expanding properly, I think. I have other code that was modified from the Arduino and had it compile and load properly. I don't know why this one won't pass the proper extension when it calls avr-objcopy.

Thanks for the assistance.

Jack

[Updated on: Sun, 08 May 2016 08:13] by Moderator

Previous Topic:ErrorParserManager inconsistent behaviour
Next Topic:FLTK based code unable to compile?
Goto Forum:
  


Current Time: Sat Jul 12 07:45:33 EDT 2025

Powered by FUDForum. Page generated in 0.25562 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top