Re: [avr-gcc-list] Converting string to uint32_t

2014-10-14 Thread Wim Lewis
On 10/13/14 2:57 PM, Andreas Höschler wrote: > void putLong_in_serial_trans_buffer(uint32_t value) > { >char char_buffer[10]; >utoa(value, char_buffer, 10); The truncation is probably happening here--- utoa() takes an unsigned int, which is 16 bits on this architecture. Try using ultoa()

Re: [avr-gcc-list] String declaration query

2014-07-07 Thread Wim Lewis
On 7/6/14 10:48 PM, Royce Pereira wrote: > Thank you, Johann, > > So for the 1st myString , both pointer and elements are in ROM. > But for the 2nd, the pointer is in RAM and the elements in ROM. Close: in the 1st example, there is no pointer, only the array of elements. This is a distinction th

Re: [avr-gcc-list] maybe a bug in gcc-avr?

2012-12-01 Thread Wim Lewis
On 12/1/12 9:59 AM, lbuch...@hsr.ch wrote: > I've been thinking about something for the last days. Atm I guess the > bug of my problem is in the avr-gcc. That does seem like a bug (I have only quickly looked at the output though). What version of gcc are you using? (What does "gcc -v" print?) _

Re: [avr-gcc-list] Parm to application

2012-08-26 Thread Wim Lewis
On 8/25/12 10:35 PM, Parthasaradhi Nayani wrote: > Hello all, > I have a boot loader and an application on a Mega168. As boot loader and > application are two different entities, is there any way the boot loader > can pass a parameter to application code? Would like something like main > (int argc,

Re: [avr-gcc-list] Want to place __func__ in program memory

2012-04-29 Thread Wim Lewis
On 4/29/12 2:29 PM, Wim Lewis wrote: > On 4/29/12 11:46 AM, Alex Iljin wrote: >> In the same way I define DEBUG_ASSERT_PROGMEM macro. >> It is OK, but I want to use many trace and assert functions, so there >> is a question. >> Is there way to place function name in pro

Re: [avr-gcc-list] Want to place __func__ in program memory

2012-04-29 Thread Wim Lewis
On 4/29/12 11:46 AM, Alex Iljin wrote: > In the same way I define DEBUG_ASSERT_PROGMEM macro. > It is OK, but I want to use many trace and assert functions, so there > is a question. > Is there way to place function name in program memory? > Maybe there are specific __FUNC_PROGMEM__ marco, or some

Re: [avr-gcc-list] Confusing volatile behaviour with 4.6.2

2011-11-29 Thread Wim Lewis
On 11/28/11 5:33 AM, Andy Warner wrote: > What is it about this construct that makes the compiler feel free to reorder ? > I assume this must be a very specific use case I've tripped over, if > volatiles were being reordered wholesale in 4.6.2, I'd expect there to > be many, many problems surfacing

Re: [avr-gcc-list] [avr-libc-dev] [bug #28837] using PSTR with c++ produces warnings

2011-11-06 Thread Wim Lewis
On 11/5/11 2:09 PM, Volker Kuhlmann wrote: > Is it useful to compile the ppl and cloog libraries into gcc as well? > It's a bit unclear what they do with respect to gcc, and avr-gcc. PPL and CLooG are used for some loop optimizations: http://gcc.gnu.org/wiki/Graphite The motivation for those o

Re: [avr-gcc-list] Can enumerator values be used in a #if preprocessordirective?

2011-08-29 Thread Wim Lewis
On Mon, 29 Aug 2011, Weddington, Eric wrote: For the preprocessor purposes, I would bet that somehow "last" evaluates to 0, so of course the condition will always be true. Yes, I think this is part of the language standard (for better or worse). I don't have a standard cite but it's described

Re: [avr-gcc-list] How can I find avr-libc/crt1/gcrt1.S ?

2010-10-22 Thread Wim Lewis
On Fri, 22 Oct 2010, Dave Nadler wrote: I need to review the startup code. IIUC, the source is avr-libc/crt1/gcrt1.S Its not in the WinAVR distribution I am using; You can download the source distribution, and find it there. Or just look at that particular file in the source repository browser

RE: [avr-gcc-list] Specification of AVR ELF format?

2010-09-23 Thread Wim Lewis
On Thu, 23 Sep 2010, Weddington, Eric wrote: I don't think that there is any documentation on the ELF format, other than what is in the source code (and patches). Certainly any documentation in this area would be welcome. What kind of tool are you planning on writing? I want to add ELF suppo

[avr-gcc-list] Specification of AVR ELF format?

2010-09-23 Thread Wim Lewis
Does documentation exist anywhere on the ELF format used by AVR toolchains? For most architectures, there's a "processor supplement" document describing the necessary magic numbers, relocation types, and so on. I can find no documentation at all for AVR, however, except for the binutils source