souldiver / open9x

Automatically exported from code.google.com/p/open9x
0 stars 0 forks source link

Not able to build with non-pached avr-size #108

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run 'make' under Arch Linux

What is the expected output? What do you see instead?
I expect that source builds succesfuly. I see instead:

-------- begin --------
avr-gcc (GCC) 4.7.1
Copyright (C) 2012 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-size: unrecognized option '--mcu=atmega64'
Usage: avr-size [option(s)] [file(s)]
 Displays the sizes of sections inside binary files
 If no input file(s) are specified, a.out is assumed
 The options are:
  -A|-B     --format={sysv|berkeley}  Select output style (default is berkeley)
  -o|-d|-x  --radix={8|10|16}         Display numbers in octal, decimal or hex
  -t        --totals                  Display the total sizes (Berkeley only)
            --common                  Display total size for *COM* syms
            --target=<bfdname>        Set the binary file format
            @<file>                   Read options from <file>
  -h        --help                    Display this information
  -v        --version                 Display the program's version

avr-size: supported targets: elf32-avr elf32-little elf32-big srec symbolsrec 
verilog tekhex binary ihex
make: *** [sizebefore] Error 1

What version of the product are you using? On what operating system?
Latest trunk. My desktop runs on 64-bit Arch linux

Please provide any additional information below.
After further searches I found project which faced that issue too and fix is 
here: http://code.google.com/p/lufa-lib/source/detail?r=1435

Also it would be nice of you could do some check of 'python' because it passes 
python phase only with python 2, but many distros uses for python3 python and 
for python 2 python2. I had to create symlink from python2 into python and 
modify path so it took that symlink rather than original python binary which is 
in version 3 

Original issue reported on code.google.com by adam.bog...@gmail.com on 23 Aug 2012 at 5:39

GoogleCodeExporter commented 8 years ago
May I ask you to provide me a patch that I would only have to apply? Thanks!

Original comment by bson...@gmail.com on 23 Aug 2012 at 10:06

GoogleCodeExporter commented 8 years ago
I checked it out. If their fix is to be believed, here is the patch (also 
attached for download) and I can still compile after inserting the changes.

$ svn diff
Index: Makefile
===================================================================
--- Makefile    (revision 1266)
+++ Makefile    (working copy)
@@ -709,7 +709,9 @@
 ifeq ($(PCB), ARM)
   ELFSIZE = $(SIZE) $(TARGET).elf
 else
-  ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+  MCU_FLAG = $(shell $(SIZE) --help | grep -- --mcu > /dev/null && echo 
--mcu=$(MCU) )
+  FORMAT_FLAG = $(shell $(SIZE) --help | grep -- --format=.*avr > /dev/null && 
echo --format=avr )
+  ELFSIZE = $(SIZE) $(MCU_FLAG) $(FORMAT_FLAG) $(TARGET).elf
 endif

Original comment by gru...@gmail.com on 24 Aug 2012 at 2:55

Attachments:

GoogleCodeExporter commented 8 years ago
Note that I am NOT using avr-gcc 4.7.x though. So the OP will need to test.

Original comment by gru...@gmail.com on 24 Aug 2012 at 2:56

GoogleCodeExporter commented 8 years ago
As soon I get from work, I will try your patch and confirm whether it works, 
but IMHO it will work like a charm.

Original comment by adam.bog...@gmail.com on 24 Aug 2012 at 4:25

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Works! Now I am able to build with patched Makefile ;)

Original comment by adam.bog...@gmail.com on 24 Aug 2012 at 2:20

GoogleCodeExporter commented 8 years ago

Original comment by bson...@gmail.com on 26 Aug 2012 at 8:48

GoogleCodeExporter commented 8 years ago

Original comment by gru...@gmail.com on 28 Aug 2012 at 12:46