Thank Joerg Wunsch very much! I've solved my problem!
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Thanks all, But i can't find bug, Here is my full code
#include avr/io.h
#include avr/interrupt.h
#ifndef F_CPU
#define F_CPU 800
#endif
#include util/delay.h
volatile uint8_t first_edge = 'A';
void usart_initiation() {
UCSRA = 0; //Control register initiation, double transfer rate
(Better subscribe to the list, you might miss replies otherwise.)
Leiu tvhoa...@gmail.com wrote:
Thanks all, But i can't find bug, Here is my full code
Result : i can show 'A'! why?
Because you're using hyperterm?
I've compiled this for an ATmega16, set it up on an STK500, and
connected it
On Tue, 2010-06-01 at 14:28 +0200, Joerg Wunsch wrote:
(Better subscribe to the list, you might miss replies otherwise.)
Leiu tvhoa...@gmail.com wrote:
Thanks all, But i can't find bug, Here is my full code
Result : i can show 'A'! why?
Because you're using hyperterm?
I've
Thanks David but you miss,
i write code for tiny2313 with 2048 bytes and without use registers and
leave optimize work
my code have 3266 bytes +60%
then i make noinline for some functions and code reduce to 2666 bytes.
Secondary count memory variables in code and max counted replace with
register
max2009tiny wrote:
Ok thanks i use gcc 4.3.2
secondary question is if i remove volatile from code
register unsigned char lastrec asm(r8)
then while generate asm efficient but dont work why?
a0: 88 11 cpser24, r8
a2: ff cf rjmp.-2 ; 0xa2
max2009tiny m...@canor-audio.com wrote:
Hi everybody. I make project on Tiny2313 and use
volatile register unsigned char lastrec asm(r8)
volatile register doesn't work.
There used to be a warning for this, which has been dropped in the
past. GCC 4.4 does have the warning back:
Hi everybody. I make project on Tiny2313 and use
volatile register unsigned char lastrec asm(r8)
and lastrec is modified on rs232 rx isr.
When compile little function
__attribute__ ((noinline)) void waitACK(u08 cmack)
{
while(cmack!=lastrec) ; //wait for reply request
}
compiler make bad asm
gcc-armxxx places volatile data outside the cache... so it must be a
compiler dependent feature. Always best to examine the resulting assembly
to make sure your assumptions are correct :)
| -Original Message-
| From: [EMAIL PROTECTED] [mailto:avr-gcc-
| [EMAIL PROTECTED] On Behalf Of
Javier Almansa Sobrino [EMAIL PROTECTED] wrote:
I've noted a non volatile variable is like don't exists (I think).
A local variable can often be optimized by the compiler into a
register, and it will live there only for the short amount of time
when its value is really needed. It might not
[EMAIL PROTECTED] wrote:
Hello Javier,
Javier Almansa Sobrino wrote:
Hi everybody. I've a little stupid question
What's the differece between a volatile variable in a funcion and the
same variable not volatile?
I've noted a non volatile variable is like don't exists (I think).
David Brown wrote:
You are missing a number of points ...
Well, I think we're getting close to complete coverage now!
On the subject of volatile isn't enough and straying further from AVR,
remember that if your machine has a data cache you need to figure out how to
not have the cache between
Graham Davies wrote:
David Brown wrote:
You are missing a number of points ...
Well, I think we're getting close to complete coverage now!
Well, since we are going for complete coverage, I'll add my 2 cents, then.
Sometimes I don't use volatile at all on the variables, and just use
From: Paulo Marques [EMAIL PROTECTED]
Graham Davies wrote:
David Brown wrote:
You are missing a number of points ...
Well, I think we're getting close to complete coverage now!
Well, since we are going for complete coverage, I'll add my 2 cents, then.
You've opened some new cans of
Dave Hansen wrote:
From: Paulo Marques [EMAIL PROTECTED]
Graham Davies wrote:
David Brown wrote:
You are missing a number of points ...
Well, I think we're getting close to complete coverage now!
Well, since we are going for complete coverage, I'll add my 2 cents,
then.
You've opened
One more suggestion...
If you are using global volatiles shared between an interrupt and
mainline code, interrupt handler performance may be improved by moving
the volatile into a temporary variable.
galen
volatile uint16_t counter;
SIGNAL(TMR0_OVERFLOW)
{
uint16_t tmp;
tmp =
From: Paulo Marques [EMAIL PROTECTED]
Dave Hansen wrote:
[...]
You've opened some new cans of worms here, but I'll only make one small
comment
I was afraid of that (the cans of worms, not your comment) ;)
Thanks for noticing the implied smiley. Looking at what I wrote, I'm not
sure it
Dave Hansen wrote:
From: Paulo Marques [EMAIL PROTECTED]
[...]
But you're actually wrong about the volatile not being needed. Because
the sei instruction doesn't claim anything about memory clobbers,
without volatile the compiler would be free to re-order instructions
and do the sei before
Hi everybody. I've a little stupid question
What's the differece between a volatile variable in a funcion and the same
variable not volatile?
I've noted a non volatile variable is like don't exists (I think).
Thanks ;)
--
Nunca confies en un S.O. del que no tienes código fuente ;-)
On Thu, 14 Dec 2006, Javier Almansa Sobrino wrote:
Hi everybody. I've a little stupid question
It seems as if you should consult a book about C or not use a language
you do not have documentation for.
What's the differece between a volatile variable in a funcion and the
same variable not
On Thu, Dec 14, 2006 at 01:16:35PM +0100, Colin Paul Gloster wrote:
On Thu, 14 Dec 2006, Javier Almansa Sobrino wrote:
Hi everybody. I've a little stupid question
It seems as if you should consult a book about C or not use a language
you do not have documentation for.
No need to get
Hi, Javier!
Javier Almansa Sobrino schrieb:
Hi everybody. I've a little stupid question
Please don't expect soo nice answers for stupid questions in propably
not the right mailing-list. ;-)
I recommend asking Goole or Wikipedia such questions first because
they're really great in
Hello Javier,
Javier Almansa Sobrino wrote:
Hi everybody. I've a little stupid question
What's the differece between a volatile variable in a funcion and the
same variable not volatile?
I've noted a non volatile variable is like don't exists (I think).
Despite what some have
-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
org] On Behalf Of Larry Barello
Sent: Thursday, December 14, 2006 7:43 AM
To: [EMAIL PROTECTED]; avr-gcc-list@nongnu.org
Subject: RE: [avr-gcc-list] volatile...
This is somewhat a compiler issue since
[EMAIL PROTECTED] wrote:
Despite what some have said about this question,
I don't think it is stupid
I agree. Although this has been discussed before in this very forum, nobody
has so far provided the complete answer this time around. They have just
provided the most common example of the use
On Tue, Apr 19, 2005 at 08:53:52PM -0700, stevech wrote:
My Two Cents: Operating system functions like atomic access and mutual
exclusion and multitasking do *not* belong in a programming language
standard. The DoD tried it years ago with Ada and it was a huge failure.
Had multitasking in Ada
E. Weddington said:
Colin Paul Gloster wrote:
On Tue, Apr 19, 2005 at 08:53:52PM -0700, stevech wrote:
My Two Cents: Operating system functions like atomic access and
mutual exclusion and multitasking do *not* belong in a programming
language standard. The DoD tried it years ago with Ada and
27 matches
Mail list logo