I'm trying to define some char variables which MUST not be initialized to 0 at startup. THe micro I'm using is ST92F Please can you help me, providing an example? Many thanks in advance. Aragorn
If you just want the variable for not being equal to 0 at the time of
Startup, probably you can equate it to some other value at the time of startup e.g. unsigned int i = 10 [ This message was edited by: chaps on 21-10-2003 13:51 ]
If I have understood you well , then you want to define a variable which does not lose its value on reset. To achieve this your variable should lie in .bss section (data Section for uninitialized data) which should be located in RAM (to be defined in linker (.ld) file). And by default any global variable which you don't initalize lies in .bss section. So as long as you are defining your .bss section to lie in RAM your uninitialized variable should not lose its value till you go for power off.