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 microntroller treats storage classes

Status
Not open for further replies.

yosabath

Newbie level 5
Joined
Mar 18, 2009
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,341
Hi all,
I want to know about how the microcontroller distinguish local, static & global variables? I mean where it is to be stored? pls reply me.Thanks in advance.
 

They are treated by the compiler rather than the microcontroller. In most cases, they use the same type of physical memory (unless declared specificly). Some compilers assign local variables to processor registers, if available.
 

Hi all,

In my application I need to force controller to stored or create local variables on to the stack between function calls.

Default in keil compiler it is not creating onto the stack instead created somewhere in the RAM.

Please suggest me to make it.
 

Cause 8051 stack is limited to idata area, Keil hasn't the option to locate local variables on the stack, as far as I know. It has a reentrant keyword to create a specific local variable stack for functions, that need it. Check in the user manual.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top