Hi All, Am trying to re-write a code in PLM51 to embedded C. There is a statement in PLM51 as below.
DECLARE TASK(17) STRUCTURE(PNTR BYTE,STATUS BYTE,DELAY WORD); DECLARE DELAY_HEAD BYTE AT (.TASK(0).PNTR); //ERROR LINE//
What i have understood from this is-- DELAY_HEAD is a byte variable which resides at the same location as that of TASK(0).PNTR.(From the PLM51 manual)
I have rewritten the same into C as below.
struct tsk { unsigned char PNTR ; unsigned char STATUS; unsigned int DELAY; }TASK[17]; unsigned char DELAY_HEAD _at_ &TASK[0].PNTR ;
But its giving error 221:non-constant case/dim expression. Plss help..!!
Hey, CONTROL1 is a variable used in one of the functions which would be called in the main loop in the initialisation stage.It is used in the Checksum function.The microcontroller used here is 80552 which is a ROMless version and hence using external EEPROM. Thanks.
"CONTROL1 is a variable used in one of the functions which would be called in the main loop"
Why do you say, "would be" there?
Is it called, or isn't it??
Hey, Yes,The function(Named as test_hardw) is called in the main loop..!But CONTROL1 is a local variable inside the function,test_hardw.I dont know if that makes a difference. CONTROL1 takes the value 0xFFFF and has to be located in code memory location 0x7FFE.
Thanks
Hey, How do i know which linker to use??BL51 or LX51.I am using 80552 microcontroller.