| Author |
Message |
|
|
Posted: Feb 22, 2012 - 12:54 PM |
|

Joined: Aug 06, 2008
Posts: 141
Location: Montréal, QC
|
|
I always change the PATH when I test toolchain, so I know it can find the libiconv-2.dll. LTO not working may be a bug in binutils.
EDIT: binutils version is 2.22.52, not 2.23? |
|
|
| |
|
|
|
|
|
Posted: Feb 22, 2012 - 04:19 PM |
|


Joined: Jun 15, 2008
Posts: 1779
Location: North Carolina USA
|
|
|
srmeister wrote:
I compiled it under MinGW32 so didnt even know that it would work in cygwin.
Well, cygwin does not like your rm.exe during a make clean, e.g. if *.map does not exist it gives an error. I renamed it to rmbad.exe to get the winavr version. The first rm below deletes the file, the second gives an error since the file is gone:
Code:
$ rm --version
rm (GNU coreutils) 5.3.0
$ rm *.map
$ rm *.map
C:\avr-gcc47\bin\rm.exe: cannot remove `*.map': Invalid argument
|
|
|
| |
|
|
|
|
|
Posted: Feb 22, 2012 - 05:09 PM |
|


Joined: Dec 21, 2006
Posts: 1545
Location: Saar-Lor-Lux
|
|
|
|
|
|
|
Posted: Feb 22, 2012 - 06:58 PM |
|


Joined: Jun 15, 2008
Posts: 1779
Location: North Carolina USA
|
|
| Well it was the makefile that showed the error and that did use -f. But it still gives an error:
Code:
$ echo 1>test.map
$ rm -f *.map
$ rm -f *.map
C:\avr-gcc47\bin\rm.exe: cannot remove `*.map': Invalid argument
|
|
|
| |
|
|
|
|
|
Posted: Feb 22, 2012 - 07:19 PM |
|

Joined: Feb 19, 2012
Posts: 10
|
|
well, i dont understand why you're using cygwin.
These linux commandline tools are probably made with MinGW (ripped them off of AVR Studio 5), so maybe there is some incompatibility when trying to run a mingw program using cygwin.
maybe what you really need is a linux compiled version of gcc-4.7 so you wouldnt need to use cygwin to emulate the environment... idk.
people reported its working when combined with AVR Studio, when combined with WinAVR, and even standalone combined with some other IDE.
It is not intented to run in every imaginary way possible, otherwise i would have to write an installer and put a huge load of other work and research into it.
If you got THIS problem with rm.exe, just replace it with another rm.exe that works for you(or stop using cygwin). The same advice applies to any file that does not seem to be working.
Maybe it was a bad idea of me to make it "standalone" in that sense to include all these GNU command line tools. |
Last edited by srmeister on Feb 22, 2012 - 07:39 PM; edited 1 time in total
|
| |
|
|
|
|
|
Posted: Feb 22, 2012 - 07:25 PM |
|

Joined: Feb 19, 2012
Posts: 10
|
|
|
Magister wrote:
I always change the PATH when I test toolchain, so I know it can find the libiconv-2.dll. LTO not working may be a bug in binutils.
EDIT: binutils version is 2.22.52, not 2.23?
Hello Magister,
please can you specify what command line options you used. Also, what is your OS?
please copy and paste your console output.
binutils is the most recent version of its trunk. |
|
|
| |
|
|
|
|
|
Posted: Feb 22, 2012 - 07:43 PM |
|

Joined: Aug 06, 2008
Posts: 141
Location: Montréal, QC
|
|
I have XP 32 bits, I launch the make under a command prompt. I just added the -flto flag to CFLAGS
Quote:
lto1.exe: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: avr-gcc returned 1 exit status
c:/avr/tools/4.7/bin/../lib/gcc/avr/4.7.0/../../../../avr/bin/ld.exe: lto-wrapper failed
collect2.exe: error: ld returned 1 exit status
Without the -flto, everything works fine. |
|
|
| |
|
|
|
|
|
Posted: Feb 22, 2012 - 09:25 PM |
|


Joined: Dec 21, 2006
Posts: 1545
Location: Saar-Lor-Lux
|
|
|
|
|
|
|
Posted: Feb 22, 2012 - 09:41 PM |
|

Joined: Aug 06, 2008
Posts: 141
Location: Montréal, QC
|
|
Not a lot of useful info, lto1.exe does a sigsegv
Quote:
COLLECT_GCC_OPTIONS='-c' '-mmcu=atmega168' '-mmcu=atmega168' '-fno-move-loop-inv
ariants' '-fno-tree-loop-optimize' '-funsigned-char' '-fpack-struct' '-ffunction
-sections' '-fdata-sections' '-fno-inline-small-functions' '-mcall-prologues' '-
mstrict-X' '-v' '-save-temps' '-gstabs' '-D' 'F_CPU=16000000' '-D' 'GRAPHIC' '-O
s' '-L.' '-Lcanlib/src' '-dumpdir' './' '-dumpbase' 'obduino3.elf.wpa' '-fltrans
-output-list=obduino3.elf.ltrans.out' '-fwpa' '-fresolution=-lcan.res'
c:/avr/tools/4.7/lib/gcc/../../libexec/gcc/avr/4.7.0/lto1.exe -quiet -dumpdir .
/ -dumpbase obduino3.elf.wpa -mmcu=atmega168 -mmcu=atmega168 -mcall-prologues -m
strict-X -auxbase obduino3 -gstabs -Os -version -fno-move-loop-invariants -fno-t
ree-loop-optimize -funsigned-char -fpack-struct -ffunction-sections -fdata-secti
ons -fno-inline-small-functions -fltrans-output-list=obduino3.elf.ltrans.out -fw
pa -fresolution=-lcan.res @C:\DOCUME~1\Frederic\LOCALS~1\Temp\ccce08yy
GNU GIMPLE (GCC) version 4.7.0 20120217 (experimental) (avr)
compiled by GNU C version 4.6.2, GMP version 5.0.4, MPFR version 3.1.0,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU GIMPLE (GCC) version 4.7.0 20120217 (experimental) (avr)
compiled by GNU C version 4.6.2, GMP version 5.0.4, MPFR version 3.1.0,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
lto1.exe: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: avr-gcc returned 1 exit status
[Leaving LTRANS obduino3.elf.ltrans.out]
[Leaving LTRANS C:\DOCUME~1\Frederic\LOCALS~1\Temp\cc6oPJ8t.args]
c:/avr/tools/4.7/bin/../lib/gcc/avr/4.7.0/../../../../avr/bin/ld.exe: lto-wrappe
r failed
collect2.exe: error: ld returned 1 exit status
|
|
|
| |
|
|
|
|
|
Posted: Feb 22, 2012 - 10:29 PM |
|

Joined: Feb 19, 2012
Posts: 10
|
|
either, it is caused by wrong PATH setting, or there is a real bug.
Maybe it is loading some libs from a wrong dir. Could you try setting your PATH in such a way, that the Toolchain dir is first dir, eg. PATH=/toolchain-4.7/bin:$PATH (or its windows equivalent).
If we do deal here with a real bug, im no expert at that, but im sure SprinterSB will try:) |
|
|
| |
|
|
|
|
|
Posted: Feb 22, 2012 - 11:11 PM |
|


Joined: Jun 15, 2008
Posts: 1779
Location: North Carolina USA
|
|
|
srmeister wrote:
well, i dont understand why you're using cygwin.
There are several other toolchains I use which are easy installations under cygwin, which also tries very hard to use installed windows applications. I have not been able to get Perl serialport.pm working in any other shell, possibly this is a 64 bit .dll problem.
But the rm error is trivial and I am happy to have the 4.7.0 build option. |
|
|
| |
|
|
|
|
|
Posted: Feb 22, 2012 - 11:40 PM |
|


Joined: Dec 21, 2006
Posts: 1545
Location: Saar-Lor-Lux
|
|
The only way (for me) to track it down is to reproduce this on linux host. IF it works there I have no idea.
Is there still segmentation fault without -fdata-sections? |
_________________ avr-gcc News • ABI • Options • 4.8-Windows • Inline Asm
|
| |
|
|
|
|
|
Posted: Feb 22, 2012 - 11:58 PM |
|

Joined: Feb 12, 2005
Posts: 16545
Location: Wormshill, England
|
|
@srmeister,
Thankyou very much. You have compiled avrdude-5.11.1 for Windows.
And it works nicely with usbasp and TPI devices !!
David. |
|
|
| |
|
|
|
|
|
Posted: Feb 23, 2012 - 12:15 AM |
|

Joined: Aug 06, 2008
Posts: 141
Location: Montréal, QC
|
|
|
SprinterSB wrote:
The only way (for me) to track it down is to reproduce this on linux host. IF it works there I have no idea.
Is there still segmentation fault without -fdata-sections?
Yes, I even removed "-ffunction-sections -fdata-sections -Wl,--relax,--gc-sections" and it still sigsegv |
|
|
| |
|
|
|
|
|