From 8b1f2b3651c5172eb88e2c9bca4f1f34dfd7131b Mon Sep 17 00:00:00 2001 From: jesusc Date: Wed, 29 Jan 2003 18:26:54 +0000 Subject: [PATCH 1/1] accepts --xram-size 0 (no ext ram) git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2191 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 5 +++++ src/SDCCglobl.h | 5 +++-- src/SDCCmain.c | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9ecd9698..43b4ea1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-01-29 Jesus Calvino-Fraga + + * src/SDCCglobl.h: now --xram-size 0 works + * src/SDCCmain.c: now --xram-size 0 works + 2003-01-29 * src/almosteverything: changed OP_DEFS and OP_USES from macros to functions to catch symbol abuse (a hot topic in the bug list :) diff --git a/src/SDCCglobl.h b/src/SDCCglobl.h index a7e4a588..0a667f2b 100644 --- a/src/SDCCglobl.h +++ b/src/SDCCglobl.h @@ -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) */ }; diff --git a/src/SDCCmain.c b/src/SDCCmain.c index aeb55706..e30ab207 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -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 */ -- 2.30.2