Hi, Dmitry, > use alias for variable: > > long var1; > long var2 asm("var1"); > > Actually it doe not matter if var1 and var2 will have different sizes. >
It does matter. The RAM space will be allocated for var1. So it will not work if sizeof(var2)>sizeof(var1), right ? > P.S. if you're using variables within some 'area' declare them as local :) Usually I do so, but in this case it is a large project and different tasks should have access for particular variable, so it should be global :(. Any other ideas ? May be the custom linker script would be helpful ? Thanks, Oleg.