Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
jintingguo
PostPosted: May 07, 2006 - 09:26 PM
Rookie


Joined: Apr 29, 2006
Posts: 20


e.g. an int viable expected to be at 0x2000;

Thanks in advance.

Jinting
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Koshchi
PostPosted: May 07, 2006 - 10:32 PM
10k+ Postman


Joined: Nov 17, 2004
Posts: 13949
Location: Vancouver, BC

You could declare it as a pointer and set the address as 0x2000. But you will have to take measures to ensure that the compiler doesn't use that space for it's own purposes. Since you are using 0x2000 as an example, I am assuming that you are using external ram. There is a section in the avr-libc manual that talks about external ram and how to tell the compiler where to put global variables and heap (you want to keep the stack in internal ram).

_________________
Regards,
Steve A.

The Board helps those that help themselves.
 
 View user's profile Send private message  
Reply with quote Back to top
jintingguo
PostPosted: May 07, 2006 - 11:08 PM
Rookie


Joined: Apr 29, 2006
Posts: 20


Many thanks!

Jinting
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits