* src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 20 Nov 2004 05:57:00 +0000 (05:57 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 20 Nov 2004 05:57:00 +0000 (05:57 +0000)
  --out-fmt-s19 turning into --out-fmt-elf if s19 was already
  selected.
* src/SDCCmain.c (linkEdit): don't define SSEG for HC08
* src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
  contiguous with data

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

ChangeLog
src/SDCCmain.c
src/hc08/main.c

index abde4fab18fd22ac6b72e1d328389427a48e5669..a0d611ee7a3b7acbe9f6dad23a8aa3f6c619c62f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-11-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+       * src/SDCCmain.c (parseCmdLine, optionsTable[]): fixed bug with
+         --out-fmt-s19 turning into --out-fmt-elf if s19 was already
+         selected.
+       * src/SDCCmain.c (linkEdit): don't define SSEG for HC08
+       * src/hc08/main.c (_hc08_setDefaultOptions): default xdata to be
+         contiguous with data
+
 2004-11-19 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
 
        * device/lib/_gptrget.c (_gptrget),
index f8c454c288a6832810c35edab82940bd5c860865..092502f7c5d8821afa501cab6ea80dbf32bd028b 100644 (file)
@@ -96,6 +96,7 @@ char buffer[PATH_MAX * 2];
 
 #define OPTION_STACK_8BIT       "--stack-8bit"
 #define OPTION_OUT_FMT_IHX      "--out-fmt-ihx"
+#define OPTION_OUT_FMT_S19      "--out-fmt-s19"
 #define OPTION_LARGE_MODEL      "--model-large"
 #define OPTION_MEDIUM_MODEL     "--model-medium"
 #define OPTION_SMALL_MODEL      "--model-small"
@@ -239,7 +240,7 @@ optionsTable[] = {
     { 'L',  NULL,                   NULL, "Add the next field to the library search path" },
     { 0,    OPTION_LIB_PATH,        NULL, "<path> use this path to search for libraries" },
     { 0,    OPTION_OUT_FMT_IHX,     NULL, "Output in Intel hex format" },
-    { 0,    "--out-fmt-s19",        &options.out_fmt, "Output in S19 hex format" },
+    { 0,    OPTION_OUT_FMT_S19,     NULL, "Output in S19 hex format" },
     { 0,    OPTION_XRAM_LOC,        NULL, "<nnnn> External Ram start location" },
     { 0,    OPTION_XRAM_SIZE,       NULL, "<nnnn> External Ram size" },
     { 0,    OPTION_IRAM_SIZE,       NULL, "<nnnn> Internal Ram size" },
@@ -882,6 +883,12 @@ parseCmdLine (int argc, char **argv)
               continue;
             }
 
+          if (strcmp (argv[i], OPTION_OUT_FMT_S19) == 0)
+            {
+              options.out_fmt = 1;
+              continue;
+            }
+
           if (strcmp (argv[i], OPTION_LARGE_MODEL) == 0)
             {
               _setModel (MODEL_LARGE, argv[i]);
@@ -1474,7 +1481,8 @@ linkEdit (char **envp)
           WRITE_SEG_LOC (BIT_NAME, 0);
 
           /* stack start */
-          if ( (options.stack_loc) && (options.stack_loc<0x100) )
+          if ( (options.stack_loc) && (options.stack_loc<0x100) &&
+               !TARGET_IS_HC08)
             {
               WRITE_SEG_LOC ("SSEG", options.stack_loc);
             }
index 5e8555c9e5c06153bba8240bf43ac80cdb1cee2c..13a23d684f1fe4fb88bb7dc223b126264b942de9 100644 (file)
@@ -139,7 +139,7 @@ _hc08_setDefaultOptions (void)
 {
   options.code_loc = 0x8000;
   options.data_loc = 0x80;
-  options.xdata_loc = 0x100;
+  options.xdata_loc = 0;       /* 0 means immediately following data */
   options.stack_loc = 0x7fff;
   options.out_fmt = 1;         /* use motorola S19 output */