Re: [avr-gcc-list] Boot loader issues

2013-03-14 Thread Senthil Kumar
On Thu, Mar 14, 2013 at 10:09 AM, larry barello wrote: > I am implementing a boot-loader for the Xmega. Actually I have a working > boot-loader, but I had to do some ugly things that I am sure there are > proper ways to do if I were not so ignorant. > > Pointers to FAQ, samples or replies apprec

Re: [avr-gcc-list] String array in ROM gives error in spite of following example code.

2014-06-12 Thread Senthil Kumar
Does PGM_P const pgtmp_msg[]PROGMEM = { ptmpUP_msg, ptmpDN_msg, ptmpCLG_msg,} ; work? The array itself needs to be declared const, as progmem/flash contents cannot be modified. Regards Senthil On Thu, Jun 12, 2014 at 6:16 PM, Bob Paddock wrote: > #define FLASH /* Empty, used for IA

Re: [avr-gcc-list] ATMEGA1284P -- Flash for Data Storage

2015-10-24 Thread Senthil Kumar
Newer versions of gcc have language support for reading from flash - see https://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html On 24-Oct-2015 6:06 pm, "Raymond Moore" wrote: > http://www.nongnu.org/avr-libc/user-manual/pgmspace.html > > I suggest actually reading the manual, online or down

Re: [avr-gcc-list] avrxmega7 device-not-found

2015-11-19 Thread Senthil Kumar
On 19-Nov-2015 9:10 pm, "Ajay Garg" 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 > #include > void

Re: [avr-gcc-list] avrxmega7 device-not-found

2015-11-19 Thread Senthil Kumar
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 - t

Re: [avr-gcc-list] When does __do_copy_data get inserted

2017-09-02 Thread Senthil Kumar
Hi, The part you're missing is the avr_need_copy_data_p global. It's set to false by default, and is set to true inside hooks that gcc calls whenever it needs to put something in data related sections. The avr_file_end hook function checks the variable and emits a reference to a global "__do_cop

Re: cross compile gcc 10.1.0 on linux for avr fails

2020-07-16 Thread Senthil Kumar
That is odd - are you able to compile a bare bones C++ file with the g++ you're using to build avr-gcc? Regards Senthil On Thu, Jul 16, 2020 at 2:09 PM Klaus Rudolph wrote: > > I try to compile gcc 10.1.0 for target avr. If fails with: > > > make[2]: Entering directory > '/home/krud/git_my_check

Re: Build gcc 10.3.0 for avr on a amd64 linux host

2021-05-22 Thread Senthil Kumar
On Sat, May 22, 2021 at 1:21 AM BERTRAND Joël wrote: > > Hello, > > I'm trying to build a recent gcc to check if my issue comes from > compiler or not. Thus, I have downloaded gcc 10.3.0 sources. Of course, > on my debian/testing workstation, I have avr avr-binutils and avr-libc. >

Re: Build gcc 10.3.0 for avr on a amd64 linux host

2021-05-23 Thread Senthil Kumar
On Sun, May 23, 2021 at 12:47 PM BERTRAND Joël wrote: > > Senthil Kumar a écrit : > > On Sat, May 22, 2021 at 1:21 AM BERTRAND Joël > > wrote: > >> > >> Hello, > >> > >> I'm trying to build a recent gcc to chec

Re: Build gcc 10.3.0 for avr on a amd64 linux host

2021-05-24 Thread Senthil Kumar
On Sun, May 23, 2021 at 8:09 PM Senthil Kumar wrote: > > On Sun, May 23, 2021 at 12:47 PM BERTRAND Joël > wrote: > > > > Senthil Kumar a écrit : > > > On Sat, May 22, 2021 at 1:21 AM BERTRAND Joël > > > wrote: > > >> > > >>

Re: Memory corruption (?) I don't understand

2021-06-23 Thread Senthil Kumar
This part > a340: 68 01 movwr12, r16 > a342: ff e4 ldi r31, 0x4F ; 79 > a344: cf 1a sub r12, r31 > a346: fe ef ldi r31, 0xFE ; 254 > a348: df 0a sbc r13, r31 > a34a: e3 50 subir30, 0x03 ;

Re: Memory corruption (?) I don't understand

2021-06-23 Thread Senthil Kumar
This looks like a miscompilation to me. Specifically, in good_2.S, you have a318: f6 01 movw r30, r12 ... a33c: e3 50 subi r30, 0x03 ; 3 a33e: ff 4f sbci r31, 0xFF ; 255 a340: 01 90 ld r0, Z+ a342: f0 81 ld r31, Z a344: e0 2d mov r30, r0

Re: Memory corruption (?) I don't understand

2021-06-23 Thread Senthil Kumar
https://gcc.gnu.org/bugzilla/ You would need a reduced testcase/preprocessed file (xxx.i obtained by compiling with -save-temps) to debug the issue - the .S file isn't useful to debug the compiler. Regards Senthil On Thu, Jun 24, 2021 at 11:36 AM BERTRAND Joël wrote: > > Senthil Ku

Re: avr-gcc-12.1.0-x64-windows new warnings ?

2023-04-23 Thread Senthil Kumar
On Mon, Apr 24, 2023 at 2:28 AM Royce Pereira wrote: > Hi, > > I just tried avr-gcc 12.1.0 on an old project, and got some new warning I > can't explain. > > The code is: > > PORTC &= 0xFE ; //clear bit 0. > > and the warning is: > warning: array subscript 0 is outside array bounds of 'volatile

Re: [avr-gcc-list] avr-libc

2012-07-31 Thread Senthil Kumar Selvaraj
On Tue, Jul 31, 2012 at 02:55:39PM +0300, Kaan Akşit wrote: > Dear all, > > I have tried the sample code under this link: > http://www.nongnu.org/avr-libc/user-manual/group__demo__project.html#demo_project_src > > and here is the output: > > kaan@SAHILEVLERI ~ $ avr-gcc -g -Os -mmcu=atmega8 -c d

Re: [avr-gcc-list] avr-libc

2012-07-31 Thread Senthil Kumar Selvaraj
installed binutils directory to the PATH environment variable before building avr-gcc? Regards Senthil > > Kaan > > 2012/7/31 Senthil Kumar Selvaraj > > > On Tue, Jul 31, 2012 at 02:55:39PM +0300, Kaan Akşit wrote: > > > Dear all, > > > > > > I

Re: [avr-gcc-list] avr-libc

2012-08-01 Thread Senthil Kumar Selvaraj
vr/lib/avr2' > >> make[3]: *** [all-recursive] Error 1 > >> make[3]: Leaving directory > >> `/var/pisi/avr-libc-1.8.0-5/work/avr-libc-1.8.0/avr/lib' > >> make[2]: *** [all-recursive] Error 1 > >> make[2]: Leaving directory > >> `/var/pis

Re: [avr-gcc-list] avr-libc

2012-08-01 Thread Senthil Kumar Selvaraj
On Wed, Aug 01, 2012 at 12:35:47PM +0300, Kaan Akşit wrote: > I am using below code to configure avr-gcc, I don't understand what is > wrong with it: > > ../configure --target=avr --mandir=/usr/share/man --datadir=/usr/share > --prefix=/usr/share/avr --enable-languages="c,c++" --disable-nls > --di

Re: [avr-gcc-list] avr-libc

2012-08-01 Thread Senthil Kumar Selvaraj
pecify the same prefix for all three configure invocations. Hope this helps. Regards Senthil > > Kaan > > 2012/8/1 Senthil Kumar Selvaraj > > > On Wed, Aug 01, 2012 at 12:35:47PM +0300, Kaan Akşit wrote: > > > I am using below code to configure avr-gcc, I d

Re: [avr-gcc-list] avr-libc

2012-08-02 Thread Senthil Kumar Selvaraj
c/avr/4.7.1/.././../../avr/bin/ > LIBRARY_PATH=/usr/local/lib/gcc/avr/4.7.1/avr4/:/usr/local/lib/gcc/avr/4.7.1/:/usr/local/lib/gcc/ar/4.7.1/../../../../avr/lib/ > COLLECT_GCC_OPTIONS='-mmcu=atmega8' '-v' '-c' > > Is there anything I might be missing something?

Re: [avr-gcc-list] avr-libc

2012-08-03 Thread Senthil Kumar Selvaraj
On Fri, Aug 03, 2012 at 11:32:37AM +0300, Kaan Akşit wrote: > 2012/8/3 Senthil Kumar Selvaraj > > > On Thu, Aug 02, 2012 at 04:06:19PM +0300, Kaan Akşit wrote: > > > Dear Senthil, > > > > > > Unfortunately, I still have the same error in avr-libc compilati

[avr-gcc-list] Potential stack corruption in naked functions at -O0

2012-08-07 Thread Senthil Kumar Selvaraj
Hi, When tracking down a different (but related) bug, I noticed that, at -O0, code to copy function parameters from registers to the stack is generated at the start of the function. This is done even for naked functions (__attribute__((naked))), which I guess is wrong, as those functions don't h

Re: [avr-gcc-list] Potential stack corruption in naked functions at -O0

2012-08-08 Thread Senthil Kumar Selvaraj
On Tue, Aug 07, 2012 at 07:41:04PM +0200, Georg-Johann Lay wrote: > Senthil Kumar Selvaraj schrieb: > >Hi, > > > >When tracking down a different (but related) bug, I noticed that, > >at -O0, code to copy function parameters from registers to the > >stack is gener

[avr-gcc-list] [Patch, avr] Shrink interrupt vector table down to last used entry

2013-02-14 Thread Senthil Kumar Selvaraj
Hi, This patch tries to shrink the interrupt vector table by deleting unused entries at the end of the table as part of linker relaxation. The motivation for this patch is that, currently, the full interrupt vector table is being placed in the linked executable, regardless of the number of inter

Re: [avr-gcc-list] [Patch, avr] Shrink interrupt vector table down to last used entry

2013-02-14 Thread Senthil Kumar Selvaraj
On Thu, Feb 14, 2013 at 10:38:11PM +0530, Weddington, Eric wrote: > Hi All, > > I open to suggestions on such a feature, but let's talk about it in AVR > community first and leave the binutils mailing list out of it until we arrive > at a consensus. > Like the others said, the patch does not c

Re: [avr-gcc-list] [Patch, avr] Shrink interrupt vector table down to last used entry

2013-02-15 Thread Senthil Kumar Selvaraj
On Fri, Feb 15, 2013 at 08:31:42AM +0100, Georg-Johann Lay wrote: > Senthil Kumar Selvaraj wrote: > > > >Like the others said, the patch does not change the default behavior > >for unhandled interrupts - they still branch to __bad_interrupt. The > >user would have to

Re: [avr-gcc-list] [Patch, avr] Shrink interrupt vector table down to last used entry

2013-02-28 Thread Senthil Kumar Selvaraj
15.02.13 15:41, Senthil Kumar Selvaraj wrote: > > On Fri, Feb 15, 2013 at 08:31:42AM +0100, Georg-Johann Lay wrote: > > > Does this really need binutils changes, or could it be achieved by > > > linker script improvements, e.g. start .text after the last .vector? > >

Re: [avr-gcc-list] [Patch, avr] Shrink interrupt vector table down to last used entry

2013-03-01 Thread Senthil Kumar Selvaraj
On Fri, Mar 01, 2013 at 04:05:53PM +0100, Georg-Johann Lay wrote: > Senthil Kumar Selvaraj wrote: > > >> Granted, the (saved memory) reward for the effort is small, but if the > >> user would specify the number of the highest used vector, then gas > >> condi

Re: [avr-gcc-list] Boot loader issues

2013-03-14 Thread Senthil Kumar Selvaraj
On Thu, Mar 14, 2013 at 11:48:44AM +0100, Georg-Johann Lay wrote: > Senthil Kumar wrote: > >On Thu, Mar 14, 2013 at 10:09 AM, larry barello wrote: > >[...] > > Would you please use plain text messages on the lists? Thanks. > > And please, don't quote email addre

Re: [avr-gcc-list] Interrupts - the hard way

2013-04-04 Thread Senthil Kumar Selvaraj
On Wed, Apr 03, 2013 at 11:07:11PM -0300, Diego Izidoro wrote: > Hi, > > Is there any document, reference (beyond the datasheet) in which i can > learn about how the compiler creates/generates code for interrupts and how > could i create within my c/c++ program create an interrupt without the help

Re: [avr-gcc-list] Interrupts - the hard way

2013-04-05 Thread Senthil Kumar Selvaraj
On Thu, Apr 04, 2013 at 08:40:58AM -0300, Diego Izidoro wrote: > Compiling with "-nodefaultlibs" should do the trick to remove the interrupt > code generation, that's the easy part. What i want is to manually build the > interrupt vector and implement the ISRs (complete with context saving and I

Re: [avr-gcc-list] ATMega 2560 + RAMPZ + 128Kplus and the real problem on GCC

2013-04-06 Thread Senthil Kumar Selvaraj
On Fri, Apr 05, 2013 at 03:59:02PM -0300, Carlos Delfino wrote: > Hello everyone, I'm new here on the list and went in search of knowledge, > learn from the questions and answers posted here. > > Reading the AVR datasheets, User Manuals GCC and AVR-LibC sources of the, > still could not find the n

Re: [avr-gcc-list] ATMega 2560 + RAMPZ + 128Kplus and the realproblem on GCC

2013-04-06 Thread Senthil Kumar Selvaraj
On Sat, Apr 06, 2013 at 12:26:05PM +0200, Jan Waclawek wrote: > >Starting with gcc 4.7.x, code > >beyond 128 KB works right away provided you link with relaxation turned > >on > > Why would relaxation needed to be turned on? > That was because of PR 14058, which, I just realized, is already fixe

Re: [avr-gcc-list] uint8_t SRAM variable for ATmega328p allocated at 0x060 (instead of 0x0100) in avr-gcc 4.6.2, 7.3.2

2013-04-17 Thread Senthil Kumar Selvaraj
On Wed, Apr 17, 2013 at 08:52:57PM -0400, Kirill Shklovsky wrote: > Dear avr-gcc-ers: > > It appears that a global SRAM uint8_t variable is placed at address > 0x060 by avr-gcc versions 4.6.2 and 7.3.2. The avr-gcc compiler was > compiled on cygwin. For example, given the followign AVR cpp code: >

Re: [avr-gcc-list] uint8_t SRAM variable for ATmega328p allocated at 0x060 (instead of 0x0100) in avr-gcc 4.6.2, 7.3.2

2013-04-18 Thread Senthil Kumar Selvaraj
On Thu, Apr 18, 2013 at 01:34:41AM -0400, Kirill Shklovsky wrote: > Senthil Kumar Selvaraj wrote: > > > I don't see the problem when I tried compiling the below code with 4.6.2. > > Can you paste the command line you used, with -v and -Wl,--verbose turned > > on? &g

Re: [avr-gcc-list] uint8_t SRAM variable for ATmega328p allocated at 0x060 (instead of 0x0100) in avr-gcc 4.6.2, 7.3.2

2013-04-18 Thread Senthil Kumar Selvaraj
On Thu, Apr 18, 2013 at 10:41:26AM -0400, Kirill Shklovsky wrote: > > Could you pass -v and -Wl,--verbose to the link command line as well and > > show us the output? That'll tell us if avr-gcc passed the right VMA for > > .data, and will also print the linker script used, so we can see if > > you

Re: [avr-gcc-list] IVT for Atmega644ap missing Vectors > __vector_20

2013-04-23 Thread Senthil Kumar Selvaraj
On Tue, Apr 23, 2013 at 12:36:30PM -0700, Eastman Hackney wrote: > > > I'm stumped & some help would be GREATLY appreciated. Weening myself from > Windows and AVR Studio (after realizing that it uses avr-gcc!). I apologize if > this posting is verbose - but I wanted to be thorough. > > > Using

Re: [avr-gcc-list] PICIE0/1 incorrect define in iom165a.h?

2013-08-13 Thread Senthil Kumar Selvaraj
> I assume it's a known item, but I thought I would mention it in case > anyone is having fits with PCINTs on the M165A line and using AVR > GCC > Thanks for the report. I've filed a bug in the avr-libc bug tracker (https://savannah.nongnu.org/bugs/index.php?39779) as well as our internal tracker

Re: [avr-gcc-list] Is there a reason why avr-gcc does not support constructor priority (both in C and C++ worlds)?

2014-03-18 Thread Senthil Kumar Selvaraj
On Tue, Mar 18, 2014 at 11:51:33AM +, David Fernandez wrote: > Hi there, > > I've been trying to use both the attributes "init_priority" for C++, and > "constructor" for C, with priority numbers, in atxmega{16,32}a4u, and the > compiler complains saying "error: 'init_priority' attribute is not

[avr-gcc-list] avr_rtx_cost for DImode values?

2014-03-18 Thread Senthil Kumar Selvaraj
Hi, I see that the avr_rtx_costs_1 function returns relative costs for a variety of RTL codes, but only for non-DImode operands. For DImode, it returns false, and gcc uses its idea of the cost plus the costs of operands (found by recursing into the RTL expression) instead. Is there a re

Re: [avr-gcc-list] avr_rtx_cost for DImode values?

2014-03-19 Thread Senthil Kumar Selvaraj
On Wed, Mar 19, 2014 at 03:50:47PM +0100, Georg-Johann Lay wrote: > Am 03/18/2014 06:33 PM, schrieb Senthil Kumar Selvaraj: > >Hi, > > > >I see that the avr_rtx_costs_1 function returns relative costs for a > >variety of RTL codes, but only for non-DImode operands. For

Re: [avr-gcc-list] Is there a reason why avr-gcc does not support constructor priority (both in C and C++ worlds)?

2014-03-19 Thread Senthil Kumar Selvaraj
On Tue, Mar 18, 2014 at 05:51:48PM +, David Fernandez wrote: > > On 18/03/14 17:19, Senthil Kumar Selvaraj wrote: > >On Tue, Mar 18, 2014 at 11:51:33AM +, David Fernandez wrote: > >>Hi there, > >> > >>I've been trying to use both

Re: [avr-gcc-list] avr/bin/ld: skipping incompatible /usr/lib/gcc/avr/4.9.0/libgcc.a when searching for -lgcc

2014-03-24 Thread Senthil Kumar Selvaraj
On Sat, Mar 22, 2014 at 01:29:56PM +0100, Paolo Patruno wrote: > I want try to use gcc 4.9. > Starting from a working toolchain of Fedora 19 with avr-gcc 4.8; I get > the last snapshot and buid it inside rpm build system with: > ../gcc-4.9/configure --prefix=/usr --mandir=/usr/share/man > --infodir

Re: [avr-gcc-list] String array in ROM gives error in spite of following example code.

2014-06-12 Thread Senthil Kumar Selvaraj
it expects the array itself to be declared const (in addition to the array elements). Regards Senthil > On Thu, Jun 12, 2014 at 9:30 PM, Senthil Kumar > wrote: > > Does > > > > PGM_P const pgtmp_msg[]PROGMEM = > >{ ptmpUP_msg, ptmpDN_msg, ptmpCLG_msg,}

Re: [avr-gcc-list] String array in ROM gives error in spite of following example code.

2014-06-13 Thread Senthil Kumar Selvaraj
On Fri, Jun 13, 2014 at 12:02:58PM +0530, Royce Pereira wrote: > Thanks, Joerg, > > This is news to me :) ! > > I googled for '__flash qualifier in AVR-GCC' and I understand that > using __flash eliminates the need for 'pgm_read_byte(&flashLocation)' > ? It reads as many bytes as necessary. > >

Re: [avr-gcc-list] How to handle paths with spaces?

2014-07-17 Thread Senthil Kumar Selvaraj
On Thu, Jul 17, 2014 at 12:43:47PM +0530, Royce Pereira wrote: > Hi, > > In my makefile i have included a folder in the 'extra include directories' > line. > > But one folder in this path has a space. I tried to enclose the path and > then the folder in single quotes as well as double quotes, but

Re: [avr-gcc-list] GCC plugin for avr-gcc

2014-07-24 Thread Senthil Kumar Selvaraj
On Wed, Jul 23, 2014 at 10:38:48PM -0400, Sandeep K Chaudhary wrote: > Hi Guys, > > I wish to implement a GCC plugin that can work with avr-gcc. I came to > realize that the latest avr-gcc or avr-g++ is based off GCC 4.8.2. > However, the whole GCC plugin APIs were introduced in 4.9.0. > Therefore

Re: [avr-gcc-list] What does "error: expected expression before '/' token" really mean?

2014-07-24 Thread Senthil Kumar Selvaraj
On Wed, Jul 23, 2014 at 03:22:06PM -0400, Bob Paddock wrote: > Can someone tell me please what this error really means?: > > "error: expected expression before '/' token" > > Googling says it is from using C++ style comments, in C code, which is > not the case here. > > I can find no place wher

Re: [avr-gcc-list] GCC plugin for avr-gcc

2014-07-29 Thread Senthil Kumar Selvaraj
cc you checked appears to be the native compiler, not the one target for AVR. Is that correct? > > Yes, it would be great if you can please share a build off latest gcc > with plugin support enabled. Sure, will do and send you the link. > > Thanks again, > Sandeep Chaudhary.

Re: [avr-gcc-list] GCC plugin for avr-gcc

2014-07-30 Thread Senthil Kumar Selvaraj
On Tue, Jul 29, 2014 at 03:23:24PM -0400, Sandeep K Chaudhary wrote: > Hi Senthil, > > Thanks again for your quick response ! > > On Tue, Jul 29, 2014 at 3:45 AM, Senthil Kumar Selvaraj < > senthil_kumar.selva...@atmel.com> wrote: > > > On Mon, Jul 28, 20

Re: [avr-gcc-list] Building code

2014-10-08 Thread Senthil Kumar Selvaraj
On Thu, Oct 09, 2014 at 12:54:48AM +0200, Andreas Höschler wrote: > Hi all, > > I have just got my avr tool chain running on Solaris, established > communication of avrdude with the USB programmer and am now trying to > recompile my first program (one that I wrote years ago on another machine).

Re: [avr-gcc-list] Allocating code to separate sections

2014-10-08 Thread Senthil Kumar Selvaraj
On Thu, Oct 09, 2014 at 07:32:51AM +0200, Alistair Gadd wrote: > Hi Everybody, > > I'm hoping this is an easy one for someone out there. > > I'm putting together a bootloader for an ATmega328P using Atmel Studio 6.2 > and I would just like to ask if there is an easy way configure the IDE so > tha

Re: [avr-gcc-list] Building code

2014-10-09 Thread Senthil Kumar Selvaraj
On Thu, Oct 09, 2014 at 11:16:19AM +0200, Andreas Höschler wrote: > Hi Senthil, > > > The compiler is not able to find header files supplied by avr-libc. Did > > you build both of them with the same install prefix? Can you paste the > > output of running avr-gcc with -v? > > > See below: > > -b

Re: [avr-gcc-list] Allocating code to separate sections

2014-10-09 Thread Senthil Kumar Selvaraj
On Thu, Oct 09, 2014 at 08:49:27AM +0200, Alistair Gadd wrote: > > On 2014/10/09 08:29 AM, Senthil Kumar Selvaraj wrote: > >On Thu, Oct 09, 2014 at 07:32:51AM +0200, Alistair Gadd wrote: > >>Hi Everybody, > >> > >>I'm hoping this is an easy one for some

Re: [avr-gcc-list] New avr-gcc device specific specs are breaking the toolchain

2014-10-17 Thread Senthil Kumar Selvaraj
On Tue, Oct 14, 2014 at 11:35:00AM +0200, Georg-Johann Lay wrote: > Buildling / installing current avr-gcc from trunk, same for avr-libc, yields > for any program: > > INSTALL/lib/gcc/avr/5.0.0/../../../../avr/bin/ld: cannot find > dev/atmega128/crt1.o: No such file or directory > INSTALL/lib/gcc/

Re: [avr-gcc-list] hard to find the correct include files at compile time

2014-11-25 Thread Senthil Kumar Selvaraj
On Tue, Nov 25, 2014 at 02:57:31PM +0100, Ivaylo Ganchev wrote: > Hello, > > I have a strange behavior while compiling an avr project with code-blocks. > In my code I include the . The file is situated in > /usr/lib/avr/include/avr/pgmspace.h > > The pgmspace.h includes . The problem is that at c

Re: [avr-gcc-list] avr-gcc and char strings

2014-12-03 Thread Senthil Kumar Selvaraj
On Thu, Dec 04, 2014 at 03:45:20AM +0530, Andreas Höschler wrote: > Hi Wouter, > > here is the assembler file generated with > > avr-gcc -mmcu=atmega2560 -Wall -O2 -S -I /usr/local/avr/include -I./ -o > toggle_led.out main.c > > > Thanks!! > > Andreas > + > > Could you post the assembler out

Re: [avr-gcc-list] avr-gcc still broken because of new device specific specs and libs

2015-02-22 Thread Senthil Kumar Selvaraj
On Fri, Feb 20, 2015 at 12:56:59PM +0100, Georg-Johann Lay wrote: > avr-gcc is still broken and fails to compile trivial programs: > > > $ avr-gcc-5.0 -mmcu=atmega8 main.c > /local/gnu/install/gcc-5.0/lib/gcc/avr/5.0.0/../../../../avr/bin/ld: cannot > find dev/atmega8/crt1.o: No such file or dire

Re: [avr-gcc-list] Broken R_AVR_16 relocation? Or is my compiler wrong?

2016-01-11 Thread Senthil Kumar Selvaraj
On Thu, Jan 07, 2016 at 10:55:33PM +1300, Dylan McKay wrote: > Hello there, > > I am generating AVR executables with my own compiler, but linking them with > AVR-GCC. > > Here is an example of a C file, which avr-as compiles fine. I made sure to > first use my compiler to generate assembly from t

Re: [avr-gcc-list] Broken R_AVR_16 relocation? Or is my compiler wrong?

2016-01-12 Thread Senthil Kumar Selvaraj
Dylan McKay writes: > Hello there, > > I am generating AVR executables with my own compiler, but linking them with > AVR-GCC. > > Here is an example of a C file, which avr-as compiles fine. I made sure to > first use my compiler to generate assembly from this file, and then > assemble this using

Re: [avr-gcc-list] interrupt in AVR-libc support ATmega32U4 ?

2016-04-22 Thread Senthil Kumar Selvaraj
Hi, ATmega32u4 does have INT0_vect - the disassembly for your program, compiled with $ avr-gcc led.c -mmcu=atmega32u4 -DF_CPU=180 -Os $ avr-objdump -S a.out a.out: file format elf32-avr Disassembly of section .text: <__vectors>: 0: 0c 94 56 00 jmp 0xac

Re: [avr-gcc-list] gcc-avr 4.9.2 -Os messes with interrupt vectors

2016-05-08 Thread Senthil Kumar Selvaraj
a...@tuta.io writes: > No, I will try to explain where my problem is. The code I posted before > should turn the LED connected to PB5 on. The code also contains an ISR, but > it is empty and as I never enable interrupts, it should never be called. I guess you're not linking in the crt file for

Re: [avr-gcc-list] GCC 6.1.0, strings and PROGMEM

2016-05-15 Thread Senthil Kumar Selvaraj
Alan Burlison writes: > I've just updated my toolchain to use GCC 6.1.0 and I notice that > constant C strings seem to be being placed automatically in PROGMEM, > rather than requiring the use of the PSTR macro as in the past. This > caused me some confusion because call such as printf("foo") sta

Re: [avr-gcc-list] GCC 6.1.0, strings and PROGMEM

2016-05-16 Thread Senthil Kumar Selvaraj
Senthil Kumar Selvaraj writes: > Alan Burlison writes: > >> I've just updated my toolchain to use GCC 6.1.0 and I notice that >> constant C strings seem to be being placed automatically in PROGMEM, >> rather than requiring the use of the PSTR macro as in the

Re: [avr-gcc-list] GCC 6.1.0, strings and PROGMEM

2016-05-19 Thread Senthil Kumar Selvaraj
Alan Burlison writes: > On 16/05/2016 18:13, Senthil Kumar Selvaraj wrote: > >> Filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71151 to track this. > > Thanks :-) I see from the bug there's a workaround. Are there any > compelling features in 6.x that make it

Re: [avr-gcc-list] objdump disassembly lacking RAM symbol names

2016-05-25 Thread Senthil Kumar Selvaraj
Paul LeoNerd Evans writes: > (First off, this is a binutils question, not really gcc itself; hoping > this is still the appropriate mailing list - if not let me know where > it should go instead). > > I find that `objdump -d` doesn't give me RAM symbol names when > disassembling `ld` or `st` inst

Re: [avr-gcc-list] 24 bits (u)ints

2016-11-30 Thread Senthil Kumar Selvaraj
Diogo Martins Silva writes: > Hello all. > > The avr-gcc wiki (https://gcc.gnu.org/wiki/avr-gcc) lists 24 bits > (u)ints as an extension since version 4.7. How do I use them? Use __uint24 as the type. Like so $ cat test.c volatile __uint24 x; int main() { x++; x--; } $ avr-gcc -S test.c -

Re: [avr-gcc-list] LLVM 4.0 AVR backend

2017-03-16 Thread Senthil Kumar Selvaraj
David Brown writes: > It might be a little heretical to ask here, but has anyone tried out the > experimental AVR backend in the latest llvm/clang release? I have not > made much use of clang, but it's been good for gcc to have a bit of > friendly competition. I think it will be interesting to