avrxmega7 device-not-found

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

avrxmega7 device-not-found

Ajay Garg
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
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Senthil Kumar


On 19-Nov-2015 9:10 pm, "Ajay Garg" <[hidden email]> wrote:
>
> 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" ::
>
>

avrxmega7 is not a real device - it represents a prototypical device for a variant of the xmega ISA.

The device header and peripheral macros are only available for a real device, which is why you're getting these errors.
#####################################################
> 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
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
>


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Werner Harbrecht
In reply to this post by Ajay Garg
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
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Ajay Garg
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 <[hidden email]> 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
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Shawn Rich
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 <[hidden email]> 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 <[hidden email]> 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
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--

~/shawn

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Ajay Garg
Same response Shawn ::


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=atxmega256a3bu ledblink.c -o ledblink.o | grep 256
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 */
############################################################


Clearly either I am missing something, or something is really screwed up :-\



On Fri, Nov 20, 2015 at 2:38 AM, Shawn Rich <[hidden email]> wrote:
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 <[hidden email]> 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?


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--

~/shawn



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Adisak Anusornsrirung
Did you try
-mmcu=avrxmega6
 
 
avrxmega6
“XMEGA” devices with more than 128 KiB of program memory.
mcu = atxmega128a3, atxmega128a3u, atxmega128b1, atxmega128b3, atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3b, atxmega256a3bu, atxmega256a3u, atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3.
avrxmega7
“XMEGA” devices with more than 128 KiB of program memory and more than 64 KiB of RAM.
mcu = atxmega128a1, atxmega128a1u, atxmega128a4u.
 
 
 
 
 
 
 
Sent: Friday, November 20, 2015 8:19 AM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Same response Shawn ::


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=atxmega256a3bu ledblink.c -o ledblink.o | grep 256
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 */
############################################################


Clearly either I am missing something, or something is really screwed up :-\


 
On Fri, Nov 20, 2015 at 2:38 AM, Shawn Rich <[hidden email]> wrote:
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 <[hidden email]> 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?


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--

~/shawn



--
Regards,
Ajay


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Sagar Pinjarkar
Hello,

1. Use    #F_CPU 8000000 for 8MHz before including delay.h
2. check device part no. if defined in project configuration or in any header file.


 


On Fri, Nov 20, 2015 at 8:23 AM, Adisak Anusornsrirung <[hidden email]> wrote:
Did you try
-mmcu=avrxmega6
 
 
avrxmega6
“XMEGA” devices with more than 128 KiB of program memory.
mcu = atxmega128a3, atxmega128a3u, atxmega128b1, atxmega128b3, atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3b, atxmega256a3bu, atxmega256a3u, atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3.
avrxmega7
“XMEGA” devices with more than 128 KiB of program memory and more than 64 KiB of RAM.
mcu = atxmega128a1, atxmega128a1u, atxmega128a4u.
 
 
 
 
 
 
 
Sent: Friday, November 20, 2015 8:19 AM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Same response Shawn ::


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=atxmega256a3bu ledblink.c -o ledblink.o | grep 256
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 */
############################################################


Clearly either I am missing something, or something is really screwed up :-\


 
On Fri, Nov 20, 2015 at 2:38 AM, Shawn Rich <[hidden email]> wrote:
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 <[hidden email]> 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?


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--

~/shawn



--
Regards,
Ajay


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Ajay Garg
In reply to this post by Adisak Anusornsrirung
"avrxmega6" does not work either :(


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=avrxmega6 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 */
############################################################


On Fri, Nov 20, 2015 at 8:23 AM, Adisak Anusornsrirung <[hidden email]> wrote:
Did you try
-mmcu=avrxmega6
 
 
avrxmega6
“XMEGA” devices with more than 128 KiB of program memory.
mcu = atxmega128a3, atxmega128a3u, atxmega128b1, atxmega128b3, atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3b, atxmega256a3bu, atxmega256a3u, atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3.
avrxmega7
“XMEGA” devices with more than 128 KiB of program memory and more than 64 KiB of RAM.
mcu = atxmega128a1, atxmega128a1u, atxmega128a4u.
 
 
 
 
 
 
 
Sent: Friday, November 20, 2015 8:19 AM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Same response Shawn ::


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=atxmega256a3bu ledblink.c -o ledblink.o | grep 256
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 */
############################################################


Clearly either I am missing something, or something is really screwed up :-\


 
On Fri, Nov 20, 2015 at 2:38 AM, Shawn Rich <[hidden email]> wrote:
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 <[hidden email]> 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?


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--

~/shawn



--
Regards,
Ajay


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Adisak Anusornsrirung
Can you show your makefile?
 
 
Sent: Friday, November 20, 2015 12:05 PM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
"avrxmega6" does not work either :(


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=avrxmega6 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 */
############################################################

 
On Fri, Nov 20, 2015 at 8:23 AM, Adisak Anusornsrirung <[hidden email]> wrote:
Did you try
-mmcu=avrxmega6
 
 
avrxmega6
“XMEGA” devices with more than 128 KiB of program memory.
mcu = atxmega128a3, atxmega128a3u, atxmega128b1, atxmega128b3, atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3b, atxmega256a3bu, atxmega256a3u, atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3.
avrxmega7
“XMEGA” devices with more than 128 KiB of program memory and more than 64 KiB of RAM.
mcu = atxmega128a1, atxmega128a1u, atxmega128a4u.
 
 
 
 
 
 
 
Sent: Friday, November 20, 2015 8:19 AM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Same response Shawn ::


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=atxmega256a3bu ledblink.c -o ledblink.o | grep 256
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 */
############################################################


Clearly either I am missing something, or something is really screwed up :-\


 
On Fri, Nov 20, 2015 at 2:38 AM, Shawn Rich <[hidden email]> wrote:
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 <[hidden email]> 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?


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--

~/shawn



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Adisak Anusornsrirung
In reply to this post by Ajay Garg
you need to add your mcu type in ave/io.h file.
 
 
 
Sent: Friday, November 20, 2015 12:05 PM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
"avrxmega6" does not work either :(


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=avrxmega6 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 */
############################################################

 
On Fri, Nov 20, 2015 at 8:23 AM, Adisak Anusornsrirung <[hidden email]> wrote:
Did you try
-mmcu=avrxmega6
 
 
avrxmega6
“XMEGA” devices with more than 128 KiB of program memory.
mcu = atxmega128a3, atxmega128a3u, atxmega128b1, atxmega128b3, atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3b, atxmega256a3bu, atxmega256a3u, atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3.
avrxmega7
“XMEGA” devices with more than 128 KiB of program memory and more than 64 KiB of RAM.
mcu = atxmega128a1, atxmega128a1u, atxmega128a4u.
 
 
 
 
 
 
 
Sent: Friday, November 20, 2015 8:19 AM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Same response Shawn ::


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=atxmega256a3bu ledblink.c -o ledblink.o | grep 256
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 */
############################################################


Clearly either I am missing something, or something is really screwed up :-\


 
On Fri, Nov 20, 2015 at 2:38 AM, Shawn Rich <[hidden email]> wrote:
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 <[hidden email]> 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?


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--

~/shawn



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Ajay Garg
Yep, I can understand what the issue is; it is just that I don't know how to resolve it.

The point is, using "avr-gcc --target-help" lists "avrxmega6" as one of the supported targets, then I fail to understand why the "device not found" error is emitted.

More strangely, things work fine for some targets ("atmega8" for example), but not for others ("avrxmega6" for example).


So, I will be grateful if someone could explicitly tell me what to do to get things working for "avrxmega6" target.



Thanks and Regards,
Ajay

On Fri, Nov 20, 2015 at 10:58 AM, Adisak Anusornsrirung <[hidden email]> wrote:
you need to add your mcu type in ave/io.h file.
 
 
 
Sent: Friday, November 20, 2015 12:05 PM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
"avrxmega6" does not work either :(


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=avrxmega6 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 */
############################################################

 
On Fri, Nov 20, 2015 at 8:23 AM, Adisak Anusornsrirung <[hidden email]> wrote:
Did you try
-mmcu=avrxmega6
 
 
avrxmega6
“XMEGA” devices with more than 128 KiB of program memory.
mcu = atxmega128a3, atxmega128a3u, atxmega128b1, atxmega128b3, atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3b, atxmega256a3bu, atxmega256a3u, atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3.
avrxmega7
“XMEGA” devices with more than 128 KiB of program memory and more than 64 KiB of RAM.
mcu = atxmega128a1, atxmega128a1u, atxmega128a4u.
 
 
 
 
 
 
 
Sent: Friday, November 20, 2015 8:19 AM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Same response Shawn ::


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=atxmega256a3bu ledblink.c -o ledblink.o | grep 256
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 */
############################################################


Clearly either I am missing something, or something is really screwed up :-\


 
On Fri, Nov 20, 2015 at 2:38 AM, Shawn Rich <[hidden email]> wrote:
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 <[hidden email]> 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?


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--

~/shawn



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



--
Regards,
Ajay



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Sagar Pinjarkar
check for support of gcc, if it supports that part no. or update the same.

-- 

Thanks & Regards,
Sagar Pinjarkar
Embedded Project Lead.
MEIS Pvt. Ltd

 


On Fri, Nov 20, 2015 at 11:14 AM, Ajay Garg <[hidden email]> wrote:
Yep, I can understand what the issue is; it is just that I don't know how to resolve it.

The point is, using "avr-gcc --target-help" lists "avrxmega6" as one of the supported targets, then I fail to understand why the "device not found" error is emitted.

More strangely, things work fine for some targets ("atmega8" for example), but not for others ("avrxmega6" for example).


So, I will be grateful if someone could explicitly tell me what to do to get things working for "avrxmega6" target.



Thanks and Regards,
Ajay

On Fri, Nov 20, 2015 at 10:58 AM, Adisak Anusornsrirung <[hidden email]> wrote:
you need to add your mcu type in ave/io.h file.
 
 
 
Sent: Friday, November 20, 2015 12:05 PM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
"avrxmega6" does not work either :(


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=avrxmega6 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 */
############################################################

 
On Fri, Nov 20, 2015 at 8:23 AM, Adisak Anusornsrirung <[hidden email]> wrote:
Did you try
-mmcu=avrxmega6
 
 
avrxmega6
“XMEGA” devices with more than 128 KiB of program memory.
mcu = atxmega128a3, atxmega128a3u, atxmega128b1, atxmega128b3, atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3b, atxmega256a3bu, atxmega256a3u, atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3.
avrxmega7
“XMEGA” devices with more than 128 KiB of program memory and more than 64 KiB of RAM.
mcu = atxmega128a1, atxmega128a1u, atxmega128a4u.
 
 
 
 
 
 
 
Sent: Friday, November 20, 2015 8:19 AM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Same response Shawn ::


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=atxmega256a3bu ledblink.c -o ledblink.o | grep 256
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 */
############################################################


Clearly either I am missing something, or something is really screwed up :-\


 
On Fri, Nov 20, 2015 at 2:38 AM, Shawn Rich <[hidden email]> wrote:
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 <[hidden email]> 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?


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--

~/shawn



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



--
Regards,
Ajay



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Senthil Kumar
In reply to this post by Ajay Garg
Hi Ajay,

Like I said, avrxmega6 (or 7) are not real devices and don't have device headers that define memory addresses for the various peripherals. They only represent variants of the AVR architectecture (different ISA, memory map etc..). Yes, the compiler can generate code targeting avrxmega6 - try compiling code that doesn't use any device specific details and you'll see that it does work.

You really should pass the actual device you're using to -mmcu. That is, you should be passing -mmcu=atxmega256a3bu. You most likely are using an old compiler that still has the bug this commit (https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=fa5a8e68df5b1d683dd94ce81b7e0a471f4de610) fixed a while back. 

Atmel publishes a Linux toolchain - can you give that a try? You can download it from http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORLINUX.aspx

Regards
Senthil

On Fri, Nov 20, 2015 at 11:14 AM, Ajay Garg <[hidden email]> wrote:
Yep, I can understand what the issue is; it is just that I don't know how to resolve it.

The point is, using "avr-gcc --target-help" lists "avrxmega6" as one of the supported targets, then I fail to understand why the "device not found" error is emitted.

More strangely, things work fine for some targets ("atmega8" for example), but not for others ("avrxmega6" for example).


So, I will be grateful if someone could explicitly tell me what to do to get things working for "avrxmega6" target.



Thanks and Regards,
Ajay

On Fri, Nov 20, 2015 at 10:58 AM, Adisak Anusornsrirung <[hidden email]> wrote:
you need to add your mcu type in ave/io.h file.
 
 
 
Sent: Friday, November 20, 2015 12:05 PM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
"avrxmega6" does not work either :(


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=avrxmega6 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 */
############################################################

 
On Fri, Nov 20, 2015 at 8:23 AM, Adisak Anusornsrirung <[hidden email]> wrote:
Did you try
-mmcu=avrxmega6
 
 
avrxmega6
“XMEGA” devices with more than 128 KiB of program memory.
mcu = atxmega128a3, atxmega128a3u, atxmega128b1, atxmega128b3, atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3b, atxmega256a3bu, atxmega256a3u, atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3.
avrxmega7
“XMEGA” devices with more than 128 KiB of program memory and more than 64 KiB of RAM.
mcu = atxmega128a1, atxmega128a1u, atxmega128a4u.
 
 
 
 
 
 
 
Sent: Friday, November 20, 2015 8:19 AM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Same response Shawn ::


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=atxmega256a3bu ledblink.c -o ledblink.o | grep 256
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 */
############################################################


Clearly either I am missing something, or something is really screwed up :-\


 
On Fri, Nov 20, 2015 at 2:38 AM, Shawn Rich <[hidden email]> wrote:
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 <[hidden email]> 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?


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--

~/shawn



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



--
Regards,
Ajay



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Sagar Pinjarkar

-- 

Thanks & Regards,
Sagar Pinjarkar
Embedded Project Lead.
MEIS Pvt. Ltd

 


On Fri, Nov 20, 2015 at 11:41 AM, Senthil Kumar <[hidden email]> wrote:
Hi Ajay,

Like I said, avrxmega6 (or 7) are not real devices and don't have device headers that define memory addresses for the various peripherals. They only represent variants of the AVR architectecture (different ISA, memory map etc..). Yes, the compiler can generate code targeting avrxmega6 - try compiling code that doesn't use any device specific details and you'll see that it does work.

You really should pass the actual device you're using to -mmcu. That is, you should be passing -mmcu=atxmega256a3bu. You most likely are using an old compiler that still has the bug this commit (https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=fa5a8e68df5b1d683dd94ce81b7e0a471f4de610) fixed a while back. 

Atmel publishes a Linux toolchain - can you give that a try? You can download it from http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORLINUX.aspx

Regards
Senthil

On Fri, Nov 20, 2015 at 11:14 AM, Ajay Garg <[hidden email]> wrote:
Yep, I can understand what the issue is; it is just that I don't know how to resolve it.

The point is, using "avr-gcc --target-help" lists "avrxmega6" as one of the supported targets, then I fail to understand why the "device not found" error is emitted.

More strangely, things work fine for some targets ("atmega8" for example), but not for others ("avrxmega6" for example).


So, I will be grateful if someone could explicitly tell me what to do to get things working for "avrxmega6" target.



Thanks and Regards,
Ajay

On Fri, Nov 20, 2015 at 10:58 AM, Adisak Anusornsrirung <[hidden email]> wrote:
you need to add your mcu type in ave/io.h file.
 
 
 
Sent: Friday, November 20, 2015 12:05 PM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
"avrxmega6" does not work either :(


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=avrxmega6 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 */
############################################################

 
On Fri, Nov 20, 2015 at 8:23 AM, Adisak Anusornsrirung <[hidden email]> wrote:
Did you try
-mmcu=avrxmega6
 
 
avrxmega6
“XMEGA” devices with more than 128 KiB of program memory.
mcu = atxmega128a3, atxmega128a3u, atxmega128b1, atxmega128b3, atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3b, atxmega256a3bu, atxmega256a3u, atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3.
avrxmega7
“XMEGA” devices with more than 128 KiB of program memory and more than 64 KiB of RAM.
mcu = atxmega128a1, atxmega128a1u, atxmega128a4u.
 
 
 
 
 
 
 
Sent: Friday, November 20, 2015 8:19 AM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Same response Shawn ::


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=atxmega256a3bu ledblink.c -o ledblink.o | grep 256
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 */
############################################################


Clearly either I am missing something, or something is really screwed up :-\


 
On Fri, Nov 20, 2015 at 2:38 AM, Shawn Rich <[hidden email]> wrote:
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 <[hidden email]> 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?


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--

~/shawn



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



--
Regards,
Ajay



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Adisak Anusornsrirung
In reply to this post by Ajay Garg
This because you include file avr/io.h and in the file avr/io.h is not have your device in the list.
 
this is some part in avr/io.h
 
 
Sent: Friday, November 20, 2015 12:44 PM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Yep, I can understand what the issue is; it is just that I don't know how to resolve it.

The point is, using "avr-gcc --target-help" lists "avrxmega6" as one of the supported targets, then I fail to understand why the "device not found" error is emitted.

More strangely, things work fine for some targets ("atmega8" for example), but not for others ("avrxmega6" for example).


So, I will be grateful if someone could explicitly tell me what to do to get things working for "avrxmega6" target.



Thanks and Regards,
Ajay
 
On Fri, Nov 20, 2015 at 10:58 AM, Adisak Anusornsrirung <[hidden email]> wrote:
you need to add your mcu type in ave/io.h file.
 
 
 
Sent: Friday, November 20, 2015 12:05 PM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
"avrxmega6" does not work either :(


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=avrxmega6 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 */
############################################################

 
On Fri, Nov 20, 2015 at 8:23 AM, Adisak Anusornsrirung <[hidden email]> wrote:
Did you try
-mmcu=avrxmega6
 
 
avrxmega6
“XMEGA” devices with more than 128 KiB of program memory.
mcu = atxmega128a3, atxmega128a3u, atxmega128b1, atxmega128b3, atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3b, atxmega256a3bu, atxmega256a3u, atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3.
avrxmega7
“XMEGA” devices with more than 128 KiB of program memory and more than 64 KiB of RAM.
mcu = atxmega128a1, atxmega128a1u, atxmega128a4u.
 
 
 
 
 
 
 
Sent: Friday, November 20, 2015 8:19 AM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Same response Shawn ::


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=atxmega256a3bu ledblink.c -o ledblink.o | grep 256
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 */
############################################################


Clearly either I am missing something, or something is really screwed up :-\


 
On Fri, Nov 20, 2015 at 2:38 AM, Shawn Rich <[hidden email]> wrote:
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 <[hidden email]> 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?


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--

~/shawn



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



--
Regards,
Ajay



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Adisak Anusornsrirung
Sorry, This is my mistaken.
 
Sent: Saturday, November 21, 2015 8:28 AM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
This because you include file avr/io.h and in the file avr/io.h is not have your device in the list.
 
this is some part in avr/io.h
 
 
Sent: Friday, November 20, 2015 12:44 PM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Yep, I can understand what the issue is; it is just that I don't know how to resolve it.

The point is, using "avr-gcc --target-help" lists "avrxmega6" as one of the supported targets, then I fail to understand why the "device not found" error is emitted.

More strangely, things work fine for some targets ("atmega8" for example), but not for others ("avrxmega6" for example).


So, I will be grateful if someone could explicitly tell me what to do to get things working for "avrxmega6" target.



Thanks and Regards,
Ajay
 
On Fri, Nov 20, 2015 at 10:58 AM, Adisak Anusornsrirung <[hidden email]> wrote:
you need to add your mcu type in ave/io.h file.
 
 
 
Sent: Friday, November 20, 2015 12:05 PM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
"avrxmega6" does not work either :(


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=avrxmega6 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 */
############################################################

 
On Fri, Nov 20, 2015 at 8:23 AM, Adisak Anusornsrirung <[hidden email]> wrote:
Did you try
-mmcu=avrxmega6
 
 
avrxmega6
“XMEGA” devices with more than 128 KiB of program memory.
mcu = atxmega128a3, atxmega128a3u, atxmega128b1, atxmega128b3, atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3b, atxmega256a3bu, atxmega256a3u, atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3.
avrxmega7
“XMEGA” devices with more than 128 KiB of program memory and more than 64 KiB of RAM.
mcu = atxmega128a1, atxmega128a1u, atxmega128a4u.
 
 
 
 
 
 
 
Sent: Friday, November 20, 2015 8:19 AM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Same response Shawn ::


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=atxmega256a3bu ledblink.c -o ledblink.o | grep 256
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 */
############################################################


Clearly either I am missing something, or something is really screwed up :-\


 
On Fri, Nov 20, 2015 at 2:38 AM, Shawn Rich <[hidden email]> wrote:
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 <[hidden email]> 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?


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--

~/shawn



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



--
Regards,
Ajay



--
Regards,
Ajay


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Adisak Anusornsrirung
In reply to this post by Ajay Garg
This because you include file avr/io.h and in the file avr/io.h is not have your device in the list.
 
This is some part in avr/io.h
 
#elif defined (__AVR_ATxmega256A3__)
#  include <avr/iox256a3.h>
#elif defined (__AVR_ATxmega256A3B__)
#  include <avr/iox256a3b.h>
#elif defined (__AVR_ATxmega256D3__)
#  include <avr/iox256d3.h>
 
Can you see the line #elif defined (__AVR_ATxmega256A3B__) in your avr/io.h file? If you can not found this line the compiler will show "device type not defined", So, you will need to find new(or may be old) version of your avr-gcc compiler.
 
simply use avr-gcc -mmcu=atxmega256a3u for you device.
 
 
Adisak A.
 
 
 
 
Sent: Friday, November 20, 2015 12:44 PM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Yep, I can understand what the issue is; it is just that I don't know how to resolve it.

The point is, using "avr-gcc --target-help" lists "avrxmega6" as one of the supported targets, then I fail to understand why the "device not found" error is emitted.

More strangely, things work fine for some targets ("atmega8" for example), but not for others ("avrxmega6" for example).


So, I will be grateful if someone could explicitly tell me what to do to get things working for "avrxmega6" target.



Thanks and Regards,
Ajay
 
On Fri, Nov 20, 2015 at 10:58 AM, Adisak Anusornsrirung <[hidden email]> wrote:
you need to add your mcu type in ave/io.h file.
 
 
 
Sent: Friday, November 20, 2015 12:05 PM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
"avrxmega6" does not work either :(


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=avrxmega6 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 */
############################################################

 
On Fri, Nov 20, 2015 at 8:23 AM, Adisak Anusornsrirung <[hidden email]> wrote:
Did you try
-mmcu=avrxmega6
 
 
avrxmega6
“XMEGA” devices with more than 128 KiB of program memory.
mcu = atxmega128a3, atxmega128a3u, atxmega128b1, atxmega128b3, atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3b, atxmega256a3bu, atxmega256a3u, atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3.
avrxmega7
“XMEGA” devices with more than 128 KiB of program memory and more than 64 KiB of RAM.
mcu = atxmega128a1, atxmega128a1u, atxmega128a4u.
 
 
 
 
 
 
 
Sent: Friday, November 20, 2015 8:19 AM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Same response Shawn ::


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=atxmega256a3bu ledblink.c -o ledblink.o | grep 256
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 */
############################################################


Clearly either I am missing something, or something is really screwed up :-\


 
On Fri, Nov 20, 2015 at 2:38 AM, Shawn Rich <[hidden email]> wrote:
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 <[hidden email]> 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?


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--

~/shawn



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



--
Regards,
Ajay



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Reply | Threaded
Open this post in threaded view
|

Re: avrxmega7 device-not-found

Adisak Anusornsrirung
In reply to this post by Ajay Garg
sorry again,
can you use avr-gcc -mmcu=atxmega256a3b instead of avr-gcc -mmcu=atxmega256a3bu
 
 
 
Sent: Saturday, November 21, 2015 8:47 AM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
This because you include file avr/io.h and in the file avr/io.h is not have your device in the list.
 
This is some part in avr/io.h
 
#elif defined (__AVR_ATxmega256A3__)
#  include <avr/iox256a3.h>
#elif defined (__AVR_ATxmega256A3B__)
#  include <avr/iox256a3b.h>
#elif defined (__AVR_ATxmega256D3__)
#  include <avr/iox256d3.h>
 
Can you see the line #elif defined (__AVR_ATxmega256A3B__) in your avr/io.h file? If you can not found this line the compiler will show "device type not defined", So, you will need to find new(or may be old) version of your avr-gcc compiler.
 
simply use avr-gcc -mmcu=atxmega256a3u for you device.
 
 
Adisak A.
 
 
 
 
Sent: Friday, November 20, 2015 12:44 PM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Yep, I can understand what the issue is; it is just that I don't know how to resolve it.

The point is, using "avr-gcc --target-help" lists "avrxmega6" as one of the supported targets, then I fail to understand why the "device not found" error is emitted.

More strangely, things work fine for some targets ("atmega8" for example), but not for others ("avrxmega6" for example).


So, I will be grateful if someone could explicitly tell me what to do to get things working for "avrxmega6" target.



Thanks and Regards,
Ajay
 
On Fri, Nov 20, 2015 at 10:58 AM, Adisak Anusornsrirung <[hidden email]> wrote:
you need to add your mcu type in ave/io.h file.
 
 
 
Sent: Friday, November 20, 2015 12:05 PM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
"avrxmega6" does not work either :(


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=avrxmega6 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 */
############################################################

 
On Fri, Nov 20, 2015 at 8:23 AM, Adisak Anusornsrirung <[hidden email]> wrote:
Did you try
-mmcu=avrxmega6
 
 
avrxmega6
“XMEGA” devices with more than 128 KiB of program memory.
mcu = atxmega128a3, atxmega128a3u, atxmega128b1, atxmega128b3, atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3b, atxmega256a3bu, atxmega256a3u, atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3.
avrxmega7
“XMEGA” devices with more than 128 KiB of program memory and more than 64 KiB of RAM.
mcu = atxmega128a1, atxmega128a1u, atxmega128a4u.
 
 
 
 
 
 
 
Sent: Friday, November 20, 2015 8:19 AM
Subject: Re: [avr-gcc-list] avrxmega7 device-not-found
 
Same response Shawn ::


############################################################
ajay@ajay-HP-15-Notebook-PC:~$ avr-gcc -mmcu=atxmega256a3bu ledblink.c -o ledblink.o | grep 256
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 */
############################################################


Clearly either I am missing something, or something is really screwed up :-\


 
On Fri, Nov 20, 2015 at 2:38 AM, Shawn Rich <[hidden email]> wrote:
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 <[hidden email]> 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?


_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list




--

~/shawn



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list



--
Regards,
Ajay



--
Regards,
Ajay

_______________________________________________
AVR-GCC-list mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list