accepts --xram-size 0 (no ext ram)
authorjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 29 Jan 2003 18:26:54 +0000 (18:26 +0000)
committerjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 29 Jan 2003 18:26:54 +0000 (18:26 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2191 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCglobl.h
src/SDCCmain.c

index 9ecd9698f1e03faf820bd128db3e82a13f5950bd..43b4ea1cf96eb1aa3e8832bd9b69c442b0c6f0cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-29  Jesus Calvino-Fraga <jesusc@ece.ubc.ca>
+
+       * src/SDCCglobl.h:   now --xram-size 0 works
+       * src/SDCCmain.c:    now --xram-size 0 works
+
 2003-01-29    <johan@balder>
 
        * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :)
index a7e4a5885b796f02989569862873b766d7f21d31..0a667f2bbd6e74b4e77a6bfe6a2c10a91a8b4e61 100644 (file)
@@ -249,8 +249,9 @@ struct options
     int data_loc;              /* interram start location       */
     int idata_loc;             /* indirect address space        */
     int code_loc;              /* code location start           */
-    int iram_size;             /* internal ram size (used only for error checking) */    
-    int xram_size;             /* external ram size (used only for error checking) */    
+    int iram_size;             /* internal ram size (used only for error checking) */   
+    int xram_size;             /* external ram size (used only for error checking) */
+       bool xram_size_set; /* since xram_size=0 is a possibility */
     int code_size;             /* code size (used only for error checking) */    
   };
 
index aeb55706020a23b77f02dd5b1605bdb31e4a274d..e30ab2077f4db52fd897d4220decafe2c639c122 100644 (file)
@@ -910,6 +910,7 @@ parseCmdLine (int argc, char **argv)
          if (strcmp (argv[i], OPTION_XRAM_SIZE) == 0)
            {
                 options.xram_size = getIntArg(OPTION_IRAM_SIZE, argv, &i, argc);
+                options.xram_size_set = TRUE;
                 continue;
            }
 
@@ -1228,7 +1229,7 @@ linkEdit (char **envp)
     fprintf (lnkfile, "-a 0x%04x\n", options.iram_size);
 
   /* if xram size specified */
-  if (options.xram_size)
+  if (options.xram_size_set)
     fprintf (lnkfile, "-v 0x%04x\n", options.xram_size);
 
   /* if code size specified */