; Under xxx.c
---------------------------------------------------------------
#pragma DATA_SECTION(var_name, "Cla1Ram1"); // Cla1Ram1 is mapped to RAML2 of datamemory
float var_name;
; Under clashared.h
---------------------------
extern float var_name;
; Under CLA.asm
-----------------------
.cdecls C,LIST,"CLAShared.h"
_Cla1Task1:
...
....
MMOV32 @_var_name, MR1
...
...
--------------------------------------------------------------------------------------------------
In the above pieces of code, if i don't use extern while declaring var_name, it does'nt compile...Why is this so? Can't these variables be local to some file in CLA.. Why should it be global? I went through example codes and all of them r using extern while declaring the variables.....