Re: [avr-gcc-list] avrxmega7 device-not-found
Hello, 1. Use#F_CPU 800 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 Anusornsrirungwrote: > 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 > *Sent:* Friday, November 20, 2015 8:19 AM > *To:* Shawn Rich > *Cc:* avr-gcc-list@nongnu.org > *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 " [-Wcpp] > # warning "F_CPU not defined for " >^ > /usr/lib/avr/include/util/delay.h:95:3: warning: #warning "Compiler > optimizations disabled; functions from won't work as > designed" [-Wcpp] > # warning "Compiler optimizations disabled; functions from > won't work as designed" >^ > ledblink.c: In function ‘main’: > ledblink.c:16:9: error: ‘DDRC’ undeclared (first use in this function) > DDRC |=1< ^ > 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< ^ > ledblink.c:19:17: error: ‘PORTC’ undeclared (first use in this function) > PORTC &= ~(1< > > > Clearly either I am missing something, or something is really screwed up > :-\ > > > > On Fri, Nov 20, 2015 at 2:38 AM, Shawn Rich 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 >> 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 >>> AVR-GCC-list@nongnu.org >>> https://lists.nongnu.org/mailman/listinfo/avr-gcc-list >>> >>> >> >> >> -- >> >> ~/shawn >> > > > > -- > Regards, > Ajay > > -- > ___ > AVR-GCC-list mailing list > AVR-GCC-list@nongnu.org > https://lists.nongnu.org/mailman/listinfo/avr-gcc-list > > > ___ > AVR-GCC-list mailing list > AVR-GCC-list@nongnu.org > https://lists.nongnu.org/mailman/listinfo/avr-gcc-list > > ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Re: [avr-gcc-list] avrxmega7 device-not-found
Refer this file for support http://www.atmel.com/Images/avr8-gnu-toolchain-3.5.0.1662-readme.pdf 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 <ajaygargn...@gmail.com> 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 < > adi...@fitel.co.th> wrote: > >> you need to add your mcu type in ave/io.h file. >> >> please see the link >> http://stackoverflow.com/questions/30525866/avr-gcc-atmega164pa-error-port-undeclared >> >> >> *From:* Ajay Garg <ajaygargn...@gmail.com> >> *Sent:* Friday, November 20, 2015 12:05 PM >> *To:* Adisak Anusornsrirung <adi...@fitel.co.th> >> *Cc:* Shawn Rich <rich.sh...@gmail.com> ; avr-gcc-list@nongnu.org >> *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 " [-Wcpp] >> # warning "F_CPU not defined for " >>^ >> /usr/lib/avr/include/util/delay.h:95:3: warning: #warning "Compiler >> optimizations disabled; functions from won't work as >> designed" [-Wcpp] >> # warning "Compiler optimizations disabled; functions from >> 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 < >> adi...@fitel.co.th> 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 <ajaygargn...@gmail.com> >>> *Sent:* Friday, November 20, 2015 8:19 AM >>> *To:* Shawn Rich <rich.sh...@gmail.com> >>> *Cc:* avr-gcc-list@nongnu.org >>> *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 incl
Re: [avr-gcc-list] avrxmega7 device-not-found
try this http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORLINUX.aspx -- Thanks & Regards, Sagar Pinjarkar Embedded Project Lead. MEIS Pvt. Ltd On Fri, Nov 20, 2015 at 11:41 AM, Senthil Kumar <senthil.theco...@gmail.com> 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 <ajaygargn...@gmail.com> > 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 < >> adi...@fitel.co.th> wrote: >> >>> you need to add your mcu type in ave/io.h file. >>> >>> please see the link >>> http://stackoverflow.com/questions/30525866/avr-gcc-atmega164pa-error-port-undeclared >>> >>> >>> *From:* Ajay Garg <ajaygargn...@gmail.com> >>> *Sent:* Friday, November 20, 2015 12:05 PM >>> *To:* Adisak Anusornsrirung <adi...@fitel.co.th> >>> *Cc:* Shawn Rich <rich.sh...@gmail.com> ; avr-gcc-list@nongnu.org >>> *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 " [-Wcpp] >>> # warning "F_CPU not defined for " >>>^ >>> /usr/lib/avr/include/util/delay.h:95:3: warning: #warning "Compiler >>> optimizations disabled; functions from won't work as >>> designed" [-Wcpp] >>> # warning "Compiler optimizations disabled; functions from >>> 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 < >>> adi...@fitel.co.th> wrote: >>> >>>> Did you try >>>> -mmcu=avrxmega6 >>>> >>>> >>>> avrxmega6 “XMEGA” devices with more than 128 KiB of program memory
Re: [avr-gcc-list] ATMEGA1284P -- Flash for Data Storage
Thanks for the response. There might be some sequencing of the functions to be used. Where can I get that ?? -- Thanks & Regards, Sagar Pinjarkar Embedded Project Lead. MEIS Pvt. Ltd On Sat, Oct 24, 2015 at 5:35 PM, Raymond Moore <r...@bethnray.com> wrote: > try avr-libc > > http://www.nongnu.org/avr-libc/user-manual/group__avr__pgmspace.html > > the pgmspace section is made for that. > > Ray Moore > > > On Sat, Oct 24, 2015 at 6:35 AM, Sagar Pinjarkar < > development.sa...@gmail.com> wrote: > >> Hi all, >> >>I am using ATMEGA1284P with 128K of flash. I want to use it for data >> storage & not for programming. But Atmel provided AVR106 pdf doc with >> sample files in zip. >> >> But these files are based on IAR compiler.I am using Atmel studio 6.2 >> with AVR gcc compiler. How to port it on gcc. >> >> There are several intrinsic functions which are not available in gcc >> based 1284p header files. >> >> >> >> Thanks in advance. >> >> ___ >> AVR-GCC-list mailing list >> AVR-GCC-list@nongnu.org >> https://lists.nongnu.org/mailman/listinfo/avr-gcc-list >> >> > ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-gcc-list