Re: avrxmega7 device-not-found

Shawn Rich <[email protected]>
Newsgroups gmane.comp.hardware.avr.gcc
Message-ID <CACN8wX9Nuy93-7wXjvOPuZy0YnJGk5WoVwJicB2Kq3Yn42Zwxw@mail.gmail.com>
The avr libc user manual shows that part under supported devices. Have you
tried it?

http://www.nongnu.org/avr-libc/user-manual/index.html


shawn

On Thu, Nov 19, 2015 at 3:56 PM, Ajay Garg <[email protected]> wrote:

> Senthil,
>
> (I am just a newest newbie, but,) Assuming your hypothesis is correct,
> what should I pass to compile the code on
> http://www.atmel.com/tools/XMEGA-A3BUXPLAINED.aspx, using *Atmel
> ATxmega256A3BU microcontroller*?
>
>
> Thanks everyone for the help so far...
>
> On Thu, Nov 19, 2015 at 9:40 PM, Werner Harbrecht <[email protected]>
> wrote:
>
>> Hi,
>> at a quick view at
>> http://www.atmel.com/products/microcontrollers/avr/avr_xmega.aspx
>> I can't find any avrxmaga7.
>> May be that’s the fault?
>>
>> Werner
>>
>>
>> >
>> > Hi All.
>> >
>> >
>> > I am trying to build a hello-world program using a linux-gcc-toolchain.
>> >
>> >
>> >
>> > Following is the program ::
>> >
>> > #####################################################
>> > /* ledblink.c, an LED blinking program */
>> >
>> > #include<avr/io.h>
>> > #include<util/delay.h>
>> > void sleep(uint8_t millisec)
>> > {
>> >         while(millisec)
>> >
>> >         {
>> >                 _delay_ms(1);/* 1 ms delay */
>> >                 millisec--;
>> >         }
>> > }
>> > main()
>> > {
>> >
>> >         DDRC |=1<<PC2;  /* PC2 will now be the output pin */
>> >         while(1)
>> >         {
>> >                 PORTC &= ~(1<<PC2);/* PC2 LOW */
>> >                 sleep(100);/* 100 ms delay */
>> >
>> >                 PORTC |=(1<<PC2); /* PC2 HIGH */
>> >                 sleep(100);/* 100 ms delay */
>> >         }
>> > }
>> > #####################################################
>> >
>> >
>> >
>> >
>> >
>> > When I compile with -mmcu=atmega8, the device is found, and the program
>> > builds fine.
>> >
>> >
>> >
>> >
>> > However with avrxmega7, it fails at the very beginning, with the error
>> > "device not found" ::
>> >
>> > #####################################################
>> > ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=avrxmega7 ledblink.c -o
>> > ledblink.o
>> > In file included from ledblink.c:2:0:
>> > /usr/lib/avr/include/avr/io.h:428:6: warning: #warning "device type not
>> > defined" [-Wcpp]
>> >  #    warning "device type not defined"
>> >       ^
>> > In file included from ledblink.c:3:0:
>> > /usr/lib/avr/include/util/delay.h:90:3: warning: #warning "F_CPU not
>> > defined for <util/delay.h>" [-Wcpp]
>> >  # warning "F_CPU not defined for <util/delay.h>"
>> >    ^
>> > /usr/lib/avr/include/util/delay.h:95:3: warning: #warning "Compiler
>> > optimizations disabled; functions from <util/delay.h> won't work as
>> > designed" [-Wcpp]
>> >  # warning "Compiler optimizations disabled; functions from
>> > <util/delay.h> won't work as designed"
>> >    ^
>> > ledblink.c: In function ‘main’:
>> > ledblink.c:16:9: error: ‘DDRC’ undeclared (first use in this function)
>> >          DDRC |=1<<PC2;  /* PC2 will now be the output pin */
>> >          ^
>> > ledblink.c:16:9: note: each undeclared identifier is reported only once
>> > for each function it appears in
>> > ledblink.c:16:19: error: ‘PC2’ undeclared (first use in this function)
>> >          DDRC |=1<<PC2;  /* PC2 will now be the output pin */
>> >                    ^
>> > ledblink.c:19:17: error: ‘PORTC’ undeclared (first use in this
>> > function)
>> >                  PORTC &= ~(1<<PC2);/* PC2 LOW */
>> > #####################################################
>> >
>> >
>> >
>> >
>> >
>> > Following are the various package-versions ::
>> >
>> > #####################################################
>> > ajay@ajay-HP-15-Notebook-PC:~$ dpkg -l | grep avr
>> > ii  avr-libc                                              1:1.8.0-4.1
>> > all          Standard C library for Atmel AVR development
>> > ii  avrdude                                               6.0.1-1
>> > i386         software for programming Atmel AVR microcontrollers
>> > ii  binutils-avr                                          2.23.1-2.1
>> > i386         Binary utilities supporting Atmel's AVR targets
>> > ii  gcc-avr                                               1:4.8-2.1
>> > i386         The GNU C compiler (cross compiler for avr)
>> > ii  gdb-avr                                               7.6-1
>> > i386         The GNU Debugger for avr
>> > ii  libavresample2:i386                                   6:11-1trusty
>> > i386         Libav audio resampling library
>> > #####################################################
>> >
>> >
>> >
>> > What am I missing?
>> >
>> >
>> >
>> > --
>> >
>> > Regards,
>> > Ajay
>>
>>
>>
>> _______________________________________________
>> AVR-GCC-list mailing list
>> [email protected]
>> https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
>>
>
>
>
> --
> Regards,
> Ajay
>
> _______________________________________________
> AVR-GCC-list mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
>
>


-- 

~/shawn

_______________________________________________
AVR-GCC-list mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.