* src/pic16/main.c (_pic16_linkEdit,pic16_linkCmd),
authortecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 8 Sep 2006 08:06:23 +0000 (08:06 +0000)
committertecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 8 Sep 2006 08:06:23 +0000 (08:06 +0000)
* src/pic/main.c(_pic14_do_link, linkCmd): pass "-w" and "-r"
    to gplink to disable processor mismatch warning and to allow
    the use of devices with only aliased (shared) memory banks,
  (_pic16_genAssemblerPreamble): include pXXX.inc on --mplab-comp

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4371 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/pic/main.c
src/pic16/main.c

index 021a12a1444a8709d8b5f02ae9db9af5bae1591e..f022f2a71e6b283573b8abef0c97c21d00a3f2dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-09-08 Raphael Neider <rneider AT web.de>
+
+       * src/pic16/main.c (_pic16_linkEdit,pic16_linkCmd),
+       * src/pic/main.c(_pic14_do_link, linkCmd): pass "-w" and "-r"
+           to gplink to disable processor mismatch warning and to allow
+           the use of devices with only aliased (shared) memory banks,
+         (_pic16_genAssemblerPreamble): include pXXX.inc on --mplab-comp
+
 2006-09-07 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
 
        * doc/sdccman.lyx: Some re-formating plus example on using
index 7881c1c65cb2af527bebeb18ff64e8ad1b5fb680..263d5f81eda1f734b503b5732c9013273c2b2ed9 100644 (file)
@@ -419,7 +419,7 @@ MUST be terminated with a NULL.
 */
 static const char *_linkCmd[] =
 {
-       "gplink", "$l", "-o \"$2\"", "\"$1\"", "$3", NULL
+       "gplink", "$l", "-w", "-r", "-o \"$2\"", "\"$1\"", "$3", NULL
 };
 
 static const char *_asmCmd[] =
@@ -453,7 +453,7 @@ static void _pic14_do_link (void)
    *
    */
 
-  sprintf(lfrm, "{linker} {incdirs} {sysincdirs} {lflags} -o {outfile} {user_ofile} {spec_ofiles} {ofiles} {libs}");
+  sprintf(lfrm, "{linker} {incdirs} {sysincdirs} {lflags} -w -r -o {outfile} {user_ofile} {spec_ofiles} {ofiles} {libs}");
 
   shash_add(&linkValues, "linker", "gplink");
 
index c091aa2d2e0d818dacca58ae28037a5e6edd1a3a..7f77737c87f7e0371b2bfeb4c468d9fe1dd20178 100644 (file)
@@ -664,7 +664,7 @@ static void _pic16_linkEdit(void)
         * {linker} {incdirs} {lflags} -o {outfile} {spec_ofiles} {ofiles} {libs}
         *
         */
-       sprintf(lfrm, "{linker} {incdirs} {lflags} -o {outfile} {user_ofile} {ofiles} {spec_ofiles} {libs}");
+       sprintf(lfrm, "{linker} {incdirs} {lflags} -w -r -o {outfile} {user_ofile} {ofiles} {spec_ofiles} {libs}");
 
        shash_add(&linkValues, "linker", pic16_linkCmd[0]);
 
@@ -863,6 +863,10 @@ _pic16_genAssemblerPreamble (FILE * of)
        }
 
        fprintf (of, "\tlist\tp=%s\n",&name[1]);
+       if (pic16_mplab_comp) {
+         // provide ACCESS macro used during SFR accesses
+         fprintf (of, "\tinclude <p%s.inc>\n", &name[1]);
+       }
 
        if(!pic16_options.omit_configw) {
                pic16_emitConfigRegs(of);
@@ -1099,7 +1103,7 @@ oclsExpense (struct memmap *oclass)
 */
 const char *pic16_linkCmd[] =
 {
-  "gplink", "$l", "-o \"$2\"", "\"$1\"","$3", NULL
+  "gplink", "$l", "-w", "-r", "-o \"$2\"", "\"$1\"","$3", NULL
 };