Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to stop IAR from putting anything in quotes in RAM ?

Status
Not open for further replies.

ron

Junior Member level 3
Joined
Dec 24, 2001
Messages
31
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
173
I*A*R for AVR Problem...

Hi all.
Am currently using I*A*R C compiler for AVR AT90S8515 and have a problem.
When I call one of my routines with for example the line:

lcd_print("This is a test message");

I am finding that the compiler is using up 1 byte of RAM for every character in the message. In my program I am displaying many messages using the above format, and am therefore finding that I have no RAM left, and the compiler is therefore saying so too !
How can I stop the compiler from putting anything in quotes in RAM too, and just keep it in the Flash ??? I need my RAM back !!!

Have tried messing about with the project options but cant seem to cure the problem by the way.

Hope you can help.

Thanks.
Ron. :eek: :eek:
 

Re: I*A*R for AVR Problem...

Under Project/Options/ICCAVR/Code check "Place aggregate initializers in flash memory".

I also define all my strings as __flash to make it clear that I want them to reside inside the flash memory see example below.

__flash char PLUS_CMGL_DP[]="+CMGL:";

hope this helps
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top