Todays gcc build gives illegal opcode elpm for mcu avr5

View: New views
5 Messages — Rating Filter:   Alert me  

Todays gcc build gives illegal opcode elpm for mcu avr5

by Andy H-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm reinstall gcc toolchain under Linux from sources.

This built from todays head version. I get :

Error: illegal opcode elpm for mcu avr5

What am I doing wrong here with binutils versions?

Or is this bug 35936 that Eric just closed.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35936


/home/andy/gccbuild/obj-dir/./gcc/xgcc
-B/home/andy/gccbuild/obj-dir/./gcc/ -B/home/andy/local/var/avr/bin/
-B/home/andy/local/var/avr/lib/ -isystem
/home/andy/local/var/avr/include -isystem
/home/andy/local/var/avr/sys-include    -g -O2 -mmcu=avr51 -O2  -g -O2
-DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -DDF=SF -Dinhibit_libc
-mcall-prologues -Os -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-Dinhibit_libc  -I. -I. -I../../.././gcc -I../../../../../gccsvn/libgcc
-I../../../../../gccsvn/libgcc/. -I../../../../../gccsvn/libgcc/../gcc
-I../../../../../gccsvn/libgcc/../include  -DHAVE_CC_TLS -o
_tablejump_elpm.o -MT _tablejump_elpm.o -MD -MP -MF _tablejump_elpm.dep
-DL_tablejump_elpm -xassembler-with-cpp \
      -c ../../../../../gccsvn/libgcc/../gcc/config/avr/libgcc.S
../../../../../gccsvn/libgcc/../gcc/config/avr/libgcc.S: Assembler messages:
../../../../../gccsvn/libgcc/../gcc/config/avr/libgcc.S:876: Error:
illegal opcode elpm for mcu avr5
../../../../../gccsvn/libgcc/../gcc/config/avr/libgcc.S:877: Error:
illegal opcode elpm for mcu avr5
make[4]: *** [_tablejump_elpm.o] Error 1
make[4]: Leaving directory `/home/andy/gccbuild/obj-dir/avr/avr51/libgcc'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/home/andy/gccbuild/obj-dir/avr/libgcc'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory `/home/andy/gccbuild/obj-dir/avr/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/home/andy/gccbuild/obj-dir'
make: *** [all] Error 2
andy@Xion:~/gccbuild/obj-dir$ avr-as -v
GNU assembler version 2.18.0 (avr) using BFD version (GNU Binutils)
2.18.0.20080103 (WinAVR 20080610)

piece of LIBGCC.S

#ifdef L_tablejump_elpm
    .global __tablejump_elpm__
    .func    __tablejump_elpm__
__tablejump_elpm__:
#if defined (__AVR_HAVE_ELPM__)
#if defined (__AVR_HAVE_LPMX__)
    elpm    __tmp_reg__, Z+
    elpm    r31, Z
    mov    r30, __tmp_reg__
#if defined (__AVR_HAVE_EIJMP_EICALL__)


Andy









_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@...
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

RE: Todays gcc build gives illegal opcode elpm for mcuavr5

by Weddington, Eric :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 

> -----Original Message-----
> From:
> avr-gcc-list-bounces+eric.weddington=atmel.com@...
> [mailto:avr-gcc-list-bounces+eric.weddington=atmel.com@nongnu.
> org] On Behalf Of Andy H
> Sent: Saturday, September 12, 2009 6:33 PM
> To: avr-gcc-list@...
> Subject: [avr-gcc-list] Todays gcc build gives illegal opcode
> elpm for mcuavr5
>
> I'm reinstall gcc toolchain under Linux from sources.
>
> This built from todays head version. I get :
>
> Error: illegal opcode elpm for mcu avr5
>
> What am I doing wrong here with binutils versions?
>
> Or is this bug 35936 that Eric just closed.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35936
> andy@Xion:~/gccbuild/obj-dir$ avr-as -v
> GNU assembler version 2.18.0 (avr) using BFD version (GNU Binutils)
> 2.18.0.20080103 (WinAVR 20080610)
>

That looks familiar. Don't use binutils 2.18, use binutils 2.19 or later (and preferrably with the WinAVR patches).

AFAIK, there has been very little testing with gcc 4.4.0 or later, and definitely hardly any testing with HEAD (future 4.5). Let me know how it goes.

Thanks,
Eric Weddington


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@...
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Re: Todays gcc build gives illegal opcode elpm for mcuavr5

by Andy H-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Got it . 2.19 is ok.

Does anyone have the dejagnu setup files - in particular the make check
RUNTESTFLAGS settings to link correct exit.c and run avrtest.

I have lost instructions!


Andy


Weddington, Eric wrote:

>  
>
>  
>> -----Original Message-----
>> From:
>> avr-gcc-list-bounces+eric.weddington=atmel.com@...
>> [mailto:avr-gcc-list-bounces+eric.weddington=atmel.com@nongnu.
>> org] On Behalf Of Andy H
>> Sent: Saturday, September 12, 2009 6:33 PM
>> To: avr-gcc-list@...
>> Subject: [avr-gcc-list] Todays gcc build gives illegal opcode
>> elpm for mcuavr5
>>
>> I'm reinstall gcc toolchain under Linux from sources.
>>
>> This built from todays head version. I get :
>>
>> Error: illegal opcode elpm for mcu avr5
>>
>> What am I doing wrong here with binutils versions?
>>
>> Or is this bug 35936 that Eric just closed.
>>
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35936
>> andy@Xion:~/gccbuild/obj-dir$ avr-as -v
>> GNU assembler version 2.18.0 (avr) using BFD version (GNU Binutils)
>> 2.18.0.20080103 (WinAVR 20080610)
>>
>>    
>
> That looks familiar. Don't use binutils 2.18, use binutils 2.19 or later (and preferrably with the WinAVR patches).
>
> AFAIK, there has been very little testing with gcc 4.4.0 or later, and definitely hardly any testing with HEAD (future 4.5). Let me know how it goes.
>
> Thanks,
> Eric Weddington
>
>
> _______________________________________________
> AVR-GCC-list mailing list
> AVR-GCC-list@...
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
>  


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@...
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Running testsuite

by Andy H-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I found the  instructions and thought it worth reposting for future
reference.

Get avr-gcc, binutils and avr-libc built from sources and working.
Install dejagnu, expect and TCL

- unpack the avrtest tar file from WINAVR sources top "someplace".

- run "make" inside /someplace/avrtest which will build executable from
avrtest.c
- copy /someplace/.dejagnurc to your $HOME and change the path inside to
point to directory where "board file is located".
(This is dejagnuboards subdirectory of avrtest files.)

set board dir /someplace/avrtest/dejagnuboards

- edit /someplace/avrtest/dejagnuboards/atmega128-sim.exp and replace
"/home/pmarques" etc to point to correct location of files for simulator
(avrtest executable) and exit.c

 set result [exec /someplace/avrtest/avrtest -m  2000000000 $prog ]
 set board_info ldflags "/someplace/avrtest/dejagnuboards/exit.c"
-Wl,-u,vfprintf......................

Run the tests from your avr-gcc build directory.

make -k check RUNTESTFLAGS="--target_board=atmega128-sim"

Look under ./gcc/testsuite for logged results or you can add -all switch
to see it working 1 test at a time.

make -k check RUNTESTFLAGS="--target_board=atmega128-sim -all"

voila!



Andy H wrote:

> Got it . 2.19 is ok.
>
> Does anyone have the dejagnu setup files - in particular the make
> check RUNTESTFLAGS settings to link correct exit.c and run avrtest.
>
> I have lost instructions!
>
>
> Andy
>
>
> Weddington, Eric wrote:
>>  
>>
>>  
>>> -----Original Message-----
>>> From: avr-gcc-list-bounces+eric.weddington=atmel.com@...
>>> [mailto:avr-gcc-list-bounces+eric.weddington=atmel.com@nongnu.
>>> org] On Behalf Of Andy H
>>> Sent: Saturday, September 12, 2009 6:33 PM
>>> To: avr-gcc-list@...
>>> Subject: [avr-gcc-list] Todays gcc build gives illegal opcode elpm
>>> for mcuavr5
>>>
>>> I'm reinstall gcc toolchain under Linux from sources.
>>>
>>> This built from todays head version. I get :
>>>
>>> Error: illegal opcode elpm for mcu avr5
>>>
>>> What am I doing wrong here with binutils versions?
>>>
>>> Or is this bug 35936 that Eric just closed.
>>>
>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35936
>>> andy@Xion:~/gccbuild/obj-dir$ avr-as -v
>>> GNU assembler version 2.18.0 (avr) using BFD version (GNU Binutils)
>>> 2.18.0.20080103 (WinAVR 20080610)
>>>
>>>    
>>
>> That looks familiar. Don't use binutils 2.18, use binutils 2.19 or
>> later (and preferrably with the WinAVR patches).
>>
>> AFAIK, there has been very little testing with gcc 4.4.0 or later,
>> and definitely hardly any testing with HEAD (future 4.5). Let me know
>> how it goes.
>>
>> Thanks,
>> Eric Weddington
>>
>>
>> _______________________________________________
>> AVR-GCC-list mailing list
>> AVR-GCC-list@...
>> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
>>  
>
>
> _______________________________________________
> AVR-GCC-list mailing list
> AVR-GCC-list@...
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@...
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

RE: Todays gcc build gives illegal opcode elpm formcuavr5

by Weddington, Eric :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 

> -----Original Message-----
> From:
> avr-gcc-list-bounces+eric.weddington=atmel.com@...
> [mailto:avr-gcc-list-bounces+eric.weddington=atmel.com@nongnu.
> org] On Behalf Of Andy H
> Sent: Saturday, September 12, 2009 10:08 PM
> Cc: avr-gcc-list@...
> Subject: Re: [avr-gcc-list] Todays gcc build gives illegal
> opcode elpm formcuavr5
>
> Got it . 2.19 is ok.
>
> Does anyone have the dejagnu setup files - in particular the
> make check
> RUNTESTFLAGS settings to link correct exit.c and run avrtest.
>
> I have lost instructions!
>

I sent you the files off-list.


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@...
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list