2014-12-04 13:12 GMT+01:00 Simon Cook <simon.c...@embecosm.com>:
>
> In general, I would expect using neither -j nor -R would in most cases
> produce a working file, but there may be some cases where it is useful to
> know which of these to use. When you need them, -j is for when only a list
> of known sections are needed, and -R is for keeping everything except a
> given section.
>

Yes, probably:
$(OBJCOPY) -O ihex $(PROJECT).out $(PROJECT).hex
is good enough, I just copied "-R .eeprom" from one of my projects,
where I use the eeprom but don't want to have it in my hex file.
(I'm just lazy ;) )

You should also look what's the difference between these two files (with a
simple editor):
$(OBJCOPY) -O binary $(PROJECT).out $(PROJECT).bin
and
$(OBJCOPY) -j .text -O binary $(PROJECT).out
$(PROJECT).text_section_only.bin

and of course you should look at:
avr-objdump -D $(PROJECT).out > $(PROJECT).asm
the "__do_copy_data" part is the most interesting one.

Best Regards,
Paweł
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to