From 6369bf8a21ab0cb52e3eb8225c3c0a6e97430910 Mon Sep 17 00:00:00 2001 From: epetrich Date: Sat, 20 Nov 2004 05:57:00 +0000 Subject: [PATCH] * 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 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3580 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 9 +++++++++ src/SDCCmain.c | 12 ++++++++++-- src/hc08/main.c | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index abde4fab..a0d611ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-11-20 Erik Petrich + + * 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 * device/lib/_gptrget.c (_gptrget), diff --git a/src/SDCCmain.c b/src/SDCCmain.c index f8c454c2..092502f7 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -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, " 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, " External Ram start location" }, { 0, OPTION_XRAM_SIZE, NULL, " External Ram size" }, { 0, OPTION_IRAM_SIZE, NULL, " 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); } diff --git a/src/hc08/main.c b/src/hc08/main.c index 5e8555c9..13a23d68 100644 --- a/src/hc08/main.c +++ b/src/hc08/main.c @@ -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 */ -- 2.30.2