Hi, Philipp.

Well, in support.c the 'config' line is missing the '__code' qualifier.

The attached patch will provide backwards compatibility in this case too.

El Mon, 7 Oct 2019 11:57:10 +0200
Philipp Klaus Krause <p...@spth.de> escribió:

> Am 06.10.19 um 08:13 schrieb Gonzalo Pérez de Olaguer Córdoba:
> > Hi, Philipp.
> > 
> > Here's the attached patch. Now the pic14 branch remains backwards compatible
> > with the trunk.
> > 
> > I made a mistake in my explanation: the code to handle the configuration
> > words must be moved to pic14_emitStaticSeg, not to pic14_emitRegularMap.
> > 
> > Regards.
> >   
> 
> Thanks. I applied the patch to the branch.
> However, I do see a serious pic14 regression on regression testing:
> 
> philipp@notebook5:~/sdcc-branches/pic14/sdcc/support/regression$ make
> test-pic14
> Running pic14 regression tests
> gen/pic14/support.asm:64:Warning[205] Found directive in column 1:
> "__config"
> gen/pic14/support.asm:64:Error[128]   Missing argument(s).
> gen/pic14/support.asm:64:Warning[205] Found directive in column 1:
> "__config"
> gen/pic14/support.asm:64:Error[128]   Missing argument(s).
> gen/pic14/support.o: No such file or directory
>                                     (f:  0, t:   0, c:  0, b:      0, T:
>        0)
> gen/pic14/support.asm:64:Warning[205] Found directive in column 1:
> "__config"
> gen/pic14/support.asm:64:Error[128]   Missing argument(s).
> gen/pic14/support.o: No such file or directory
> gen/pic14/support.o: No such file or directory
>                                     (f:  0, t:   0, c:  0, b:      0, T:
>        0)
> gen/pic14/support.asm:64:Warning[205] Found directive in column 1:
> "__config"
> gen/pic14/support.asm:64:Error[128]   Missing argument(s).
> gen/pic14/support.o: No such file or directory
>                                     (f:  0, t:   0, c:  0, b:      0, T:
>        0)
> gen/pic14/support.asm:64:Warning[205] Found directive in column 1:
> "__config"
> gen/pic14/support.asm:64:Error[128]   Missing argument(s).
> 


-- 
   Gonzalo Pérez de Olaguer Córdoba       s...@gpoc.es
  -=- buscando empleo desde 1988 -=-       www.gpoc.es 

PGP: 3F87 CCE7 8B35 8C06 E637  2D57 5723 9984 718C A614
Index: src/pic14/glue.c
===================================================================
--- src/pic14/glue.c	(revisión: 11420)
+++ src/pic14/glue.c	(copia de trabajo)
@@ -2096,6 +2096,29 @@
       DBG_SYMBOL ("symbol", sym);
       DBG_ENTRY ();
 
+      if (SPEC_ABSA (sym->etype))
+        {
+          int addr = SPEC_ADDR (sym->etype);
+  
+          /* handle CONFIG words here */
+          if (IS_CONFIG_ADDRESS (addr))
+            {
+              //fprintf( stderr, "%s: assignment to CONFIG@0x%x found\n", __FUNCTION__, addr );
+              //fprintf( stderr, "ival: %p (0x%x)\n", sym->ival, (int)list2int( sym->ival ) );
+              if (sym->ival)
+                {
+                  DBG_MSG ("config word addr 0x%04X value 0x%04X", addr, (int) list2int (sym->ival));
+                  pic14_assignConfigWordValue (addr, (int) list2int (sym->ival));
+                }
+              else
+                {
+                  fprintf (stderr, "ERROR: Symbol %s, which is covering a __CONFIG word must be initialized!\n", sym->name);
+                }
+              DBG_EXIT ();
+              continue;
+            }
+        }
+
       /* if allocation required check is needed
          then check if the symbol really requires
          allocation only for local variables */

Attachment: pgpAdL72x8hG3.pgp
Description: Firma digital OpenPGP

_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to