Re: [avr-gcc-list] foo++, subi vs inc?

2008-11-11 Thread Gre7g Luterman
Does it really matter which instruction the compiler chooses? Both constructs consume the same amount of memory and execution time. I understand your concern that potentially more time and memory could be used if the compiler resisted the use of inc and the register was below R16, but unless

Re: AW: [avr-gcc-list] ATMEGA88 Automotive supported?

2008-11-05 Thread Gre7g Luterman
Muahahahahha... Welcome to the asylum. (Sorry, couldn't resist.) Gre7g From: Schnarrenberger, Mathias [EMAIL PROTECTED] To: Weddington, Eric [EMAIL PROTECTED]; avr-gcc-list@nongnu.org Sent: Wednesday, November 5, 2008 8:35:50 AM Subject: AW: [avr-gcc-list]

Re: [avr-gcc-list] How to handle interrupt vectors ?

2008-10-29 Thread Gre7g Luterman
From: Charalampos Alexopoulos [EMAIL PROTECTED] To: avr-gcc-list@nongnu.org Sent: Wednesday, October 29, 2008 12:12:00 PM Subject: Re: [avr-gcc-list] How to handle interrupt vectors ? I was asking for information about interrupt vector's not for ISR. Yes i have seen the code for the ISR and

Re: [avr-gcc-list] Link script question

2008-10-10 Thread Gre7g Luterman
From: Dave N6NZ [EMAIL PROTECTED] To: Gre7g Luterman [EMAIL PROTECTED] Cc: avr-gcc-list@nongnu.org Sent: Thursday, October 9, 2008 8:56:07 PM Subject: Re: [avr-gcc-list] Link script question I would take very slightly different approach.  Make that a section of it's own, and put

[avr-gcc-list] Link script question

2008-10-10 Thread Gre7g Luterman
From: Dave N6NZ [EMAIL PROTECTED] To: Gre7g Luterman [EMAIL PROTECTED] Cc: avr-gcc-list@nongnu.org Sent: Friday, October 10, 2008 11:02:21 AM Subject: Re: [avr-gcc-list] Link script question That would work, of course, but I'd have to designate a constant address for the block, right

Re: [avr-gcc-list] Link script question

2008-10-10 Thread Gre7g Luterman
I freakin' hate Yahoo! mail. Here's the attachment I was trying to include. /* Default linker script, for normal executables */ OUTPUT_FORMAT(elf32-avr,elf32-avr,elf32-avr) OUTPUT_ARCH(avr:1) MEMORY { text (rx) : ORIGIN = 0x00, LENGTH = 0x7D00 changes (rx) : ORIGIN =

Re: [avr-gcc-list] Link script question

2008-10-10 Thread Gre7g Luterman
Freakin' awesome. Thanks, tons! Gre7g - Original Message From: Dave Hylands [EMAIL PROTECTED] To: Gre7g Luterman [EMAIL PROTECTED] Cc: avr-gcc-list@nongnu.org Sent: Friday, October 10, 2008 2:12:21 PM Subject: Re: [avr-gcc-list] Link script question Gu Gre7g, Try this version

[avr-gcc-list] Link script question

2008-10-09 Thread Gre7g Luterman
I've got an avrgcc application that uses free Flash blocks to hold user code. To maximize the space available for the user, I start this area at the beginning of the first block following my application code. To locate this, I added the following to my linker script: --- mega32.orig 2008-10-09

Re: [avr-gcc-list] cbr and negative numbers

2008-09-12 Thread Gre7g Luterman
- Original Message From: Ruud Vlaming [EMAIL PROTECTED] To: avr-gcc-list@nongnu.org Sent: Friday, September 12, 2008 8:23:23 AM Subject: Re: [avr-gcc-list] cbr and negative numbers So have a look at my OS for the AVR, sources included (GPLv3) http://www.femtoos.org/ ;-) There's an OS

Re: [avr-gcc-list] C code calling ASM functions

2008-01-25 Thread Gre7g Luterman
--- David Brown [EMAIL PROTECTED] wrote: You really should do some basic search, and read the avr gcc and avr-libc documentation before posting - you might not find all your answers, but it will cover most things. http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_reg_usage

Re: [avr-gcc-list] local variables in ddd

2008-01-21 Thread Gre7g Luterman
--- Javier Almansa Sobrino [EMAIL PROTECTED] wrote: Hi everyone. I'm trying to simulate and trace a program developed with avr-gcc, but I'm not able to see the value of any local variable with ddd or avr-gdb. This is a common problem that is not simply solved. gcc is optimizing your code

Re: Simulator for GCC Testing [was: RE: [Fwd: Re: [avr-gcc-list] GCC-AVR Register optimisations]]

2008-01-12 Thread Gre7g Luterman
Writing this sounds intriguing and amusing to me. If you need more coders, add me to the list. I'd be interested in contributing. Gre7g --- Paulo Marques [EMAIL PROTECTED] wrote: Quoting Weddington, Eric [EMAIL PROTECTED]: So, I don't think I'm reinventing the wheel here. This is getting

Re: [avr-gcc-list] dev and mod may not be optimized

2007-12-12 Thread Gre7g Luterman
--- Paulo Marques [EMAIL PROTECTED] wrote: Actually after a few more digging, we can do this all in plain C, by using a smaller reciprocal multiplier: snipped Wow, that's freakin' inspired! And you're right it does optimize nicely. Here's a 20 byte version that executes in 12 cycles:

Re: [avr-gcc-list] dev and mod may not be optimized

2007-12-11 Thread Gre7g Luterman
--- Dmitry K. [EMAIL PROTECTED] wrote: Alas, the usage of div() function is more space and more time expansive. The reason is that div() uses an another function: __divmodhi4(), i.e. 16-bits. Compare two programs: prog1: 150 bytes, 238 clocks prog2: 212 bytes, 316 clocks Well if

RE: [avr-gcc-list] avr-gcc-4 TinyOs

2007-10-13 Thread Gre7g Luterman
--- Eric Weddington [EMAIL PROTECTED] wrote: The best thing to do is to go ask the TinyOS people directly: http://www.tinyos.net/scoop/special/support#mailing-lists But if you find out, could you report back here? I'd be curious to know and others may be too. It could be kind'a neat. Gre7g

Re: [avr-gcc-list] Order of bytes

2007-10-07 Thread Gre7g Luterman
AVR is a little-endian processor family, so the first byte in memory of a multi-byte value is the LSB. That would be by0 in your example since union will not re-arrange anything on you. by3 would be the MSB. HTH, Gre7g --- Royce Pereira [EMAIL PROTECTED] wrote: Hi, Sorry for my rusty C,

Re: [avr-gcc-list] Warning message

2007-10-03 Thread Gre7g Luterman
--- Royce Pereira [EMAIL PROTECTED] wrote: What does the following warning mean? warning: comparison is always true due to limited range of data type It means the if will always happen. #define CHK_1307 0x55 uint8 twi_read(void) if(twi_read() != ~CHK_1307) ok= 0; CHK_1307

[avr-gcc-list] Missing Section

2007-10-03 Thread Gre7g Luterman
Can anyone tell me what I'm doing wrong? I'm creating a .hex file with avr-objcopy.exe (like I've always done in the past), but one of my sections is disappearing. From cygwin, I can type: $ avr-objdump.exe -V GNU objdump 2.17 + coff-avr-patch (20050630) Copyright 2005 Free Software Foundation,

Re: [avr-gcc-list] Missing Section

2007-10-03 Thread Gre7g Luterman
--- Gre7g Luterman [EMAIL PROTECTED] wrote: $ avr-objcopy.exe -j .update RIO-15C/temp1.elf temp.hex BFD: RIO-15C/temp1.elf: warning: Empty loadable segment detected, is this intentional ? snipped Sorry, I neglected to specify the file format: $ avr-objcopy.exe -O ihex -j .update RIO-15C

Re: [avr-gcc-list] I have met a problem.....

2007-08-13 Thread Gre7g Luterman
Yes, I've had this problem as well, and it is a PITA! The core of the problem is that AVR Studio can't handle loading .elf files with multiple sections of Flash. The workaround is no joy either. What I do, is I use gcc to compile the files to .hex and .eep, burn them into the AVR, and then set

Re: [avr-gcc-list] stack(?) problems

2007-08-06 Thread Gre7g Luterman
--- Tobias Pflug [EMAIL PROTECTED] wrote: int test; int *p; int main() { test = 0; p = test; ... } (gdb) print p $1 = (int *) 0x80 (gdb) print test $2 = (int *) 0x804020 1. Do an avr-objdump to figure out which address is correct, 0x80 or 0x804020. 2. Look through

Re: [avr-gcc-list] Assembly language help

2007-07-28 Thread Gre7g Luterman
--- Parthasaradhi Nayani [EMAIL PROTECTED] wrote: Hello Group, I am writing an assembly language function in which I need to get the address of a sub-routine into a register pair. How can I do it? A sample code is given below. func1: nop nop ldi r24, lo8(label1) ldi

RE: [avr-gcc-list] Clobber list isn't working

2007-07-25 Thread Gre7g Luterman
--- Eric Weddington [EMAIL PROTECTED] wrote: Can you provide your real test case instead of the degenerate case above? Huh? But that's the whole point of making a simple test case. That way I don't have to make you slog through hundreds of pages of code and I don't have to put my customer's

[avr-gcc-list] Clobber list isn't working

2007-07-24 Thread Gre7g Luterman
I suppose I could be misunderstanding how the clobber list of an inline asm statement is supposed to work, but it doesn't seem to be working for me. I specify that I'm using r28 and r29, but the code following my asm statement continues to use Y as if it was untouched. To demonstrate, I've

Re: [avr-gcc-list] Missing dll file

2007-06-18 Thread Gre7g Luterman
I haven't used that part of the toolset, so I can't speak authoritatively, but a quick websearch shows the libusb0 is a SourceForge project. Try downloading it at http://tinyurl.com/yo5nrq and see if that makes things happier. Gre7g --- David L. Gordon [EMAIL PROTECTED] wrote: Hello I am

RE: [avr-gcc-list] Linker error with gcc WinAVR

2007-05-09 Thread Gre7g Luterman
--- Schwichtenberg, Knut [EMAIL PROTECTED] wrote: Are you using the default linker script? If so the problem is based there. The following copy is from the avr5.x file: } text .data : AT (ADDR (.text) + SIZEOF (.text)) { Which means: The .data segment starts after the

[avr-gcc-list] Linker error with gcc WinAVR

2007-05-08 Thread Gre7g Luterman
I'm using the latest WinAVR and I'm trying to fit my code into the tiny atmega8515. The code does fit, but I am trying to force certain sections of code to be hard-coded to certain locations. I am trying to do this with the --section-start option when linking. This technique worked fine with the

Re: [avr-gcc-list] Linker error with gcc WinAV

2007-05-08 Thread Gre7g Luterman
--- Dave Hylands [EMAIL PROTECTED] wrote: The times I've use section start, I've used an address like 0x1B00 rather than just 1B00. Many thanks, Dave, but I just tried changing that and I still get the exact same error. At least it's reassuring that I'm not the only one using