Has anyone else tried C51 v6.20/uVision v2.20? In one of my 'C' source files with inline assembler, the new Compiler now creates an empty DATA Segment in the generated assembler. This causes the Link to fail with Error L109, "Empty Relocatable Segment" According to the online help & the PDF manual, L109 should not be a fatal error; the Segment should simply be ignored. So there are two issues here: A. Why does the new compiler generate the empty Segment? B. Why does the BL51 Link fail, when this should not be a Fatal error? (the behaviour is the same for both the v4.14 & v4.20 Linkers).
I have found the reason for this problem I have been having. I noticed that the function was declared with the directive small (small memory model):
**************** static void GenFac (unsigned char xdata *key, unsigned char xdata *fac_ptr) small ****************
I have a large code settings for my project. The following code generated L109 error: typedef union tagLONGLONG{ struct{ unsigned short hi; unsigned long lo; } LL; unsigned char bytes[6]; unsigned short words[3]; } LONGLONG; void ZeroLONGLONG(LONGLONG xdata *v) { v->LL.hi=0; v->LL.lo=0; } This fix shuts down the error: void ZeroLONGLONG(LONGLONG xdata *v) { char xdata i; //dummy fix v->LL.hi=0; v->LL.lo=0; }