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..!!
So now you have some data, you can start answering the questions I asked. Let's start with: does that segment whose address you were trying to change actually exist in your program?
Pls check this.
It's your program. Check it yourself.
But here's a hint: what might that tickbox "Use Memory Layout from Target Dialog" on the Options->LX51 tab be about?
Hey, Sorry.."CANNOT FIND SEGMENT" error is resolved for now.But wat do i do for the Error L104:Multiple Public Definitions. Pls help Thanks