avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] migrating from iar to gcc


From: Andy Warner
Subject: Re: [avr-gcc-list] migrating from iar to gcc
Date: Mon, 13 Sep 2004 09:55:06 -0500
User-agent: Mutt/1.2.5i

Dave Hylands wrote:
> [...]
> > I don't know how to translate this:
> > 
> > char __flash *p;
> > 
> > p is a pointer stored in default memory. The pointer
> > points to an integer in flash memory.
> > 
> > how is translated this declaration in gcc?
> [...]
> If you want to initialize p with a string, use the PSTR macro:
> 
>       prog_char *p = PSTR( "Test" );

You will also need to de-reference the pointer using special
functions/macros, not just *p. Check out the avr-libc
man page on program space string utilities:

        http://www.nongnu.org/avr-libc/user-manual/group__avr__pgmspace.html

I think you need to use similar access methods with the IAR
tools, but I am sure there will be small differences that
can cause problems.
-- 
address@hidden

Andy Warner             Voice: (612) 801-8549   Fax: (208) 575-5634


reply via email to

[Prev in Thread] Current Thread [Next in Thread]