Re: avrxmega7 device-not-found

Sagar Pinjarkar <[email protected]>
Newsgroups gmane.comp.hardware.avr.gcc
Message-ID <CAFC_15vLFC0xaQv6YDMzdmWFNmnD2BNfYKb7Tt6LF+0-Gm6iPw@mail.gmail.com>
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 <[email protected]>
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.
>
>
> Credits: https://gcc.gnu.org/onlinedocs/gcc/AVR-Options.html
>
>
>
>
>
> *From:* Ajay Garg <[email protected]>
> *Sent:* Friday, November 20, 2015 8:19 AM
> *To:* Shawn Rich <[email protected]>
> *Cc:* [email protected]
> *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 <[email protected]> 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 <[email protected]>
>> wrote:
>>
>>> Senthil,
>>>
>>> (I am just a newest newbie, but,) Assuming your hypothesis is correct,
>>> what should I pass to compile the code on
>>> http://www.atmel.com/tools/XMEGA-A3BUXPLAINED.aspx, using *Atmel
>>> ATxmega256A3BU microcontroller*?
>>>
>>>
>>> _______________________________________________
>>> AVR-GCC-list mailing list
>>> [email protected]
>>> https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
>>>
>>>
>>
>>
>> --
>>
>> ~/shawn
>>
>
>
>
> --
> Regards,
> Ajay
>
> ------------------------------
> _______________________________________________
> AVR-GCC-list mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
>
>
> _______________________________________________
> AVR-GCC-list mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
>
>

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