#define OPTION_PRINT_SEARCH_DIRS "--print-search-dirs"
#define OPTION_MSVC_ERROR_STYLE "--vc"
#define OPTION_USE_STDOUT "--use-stdout"
#define OPTION_PRINT_SEARCH_DIRS "--print-search-dirs"
#define OPTION_MSVC_ERROR_STYLE "--vc"
#define OPTION_USE_STDOUT "--use-stdout"
#endif
#if !OPT_DISABLE_DS390 || !OPT_DISABLE_MCS51
{ 0, "--parms-in-bank1", &options.parms_in_bank1,"MCS51/DS390 - use Bank1 for parameter passing"},
#endif
#if !OPT_DISABLE_DS390 || !OPT_DISABLE_MCS51
{ 0, "--parms-in-bank1", &options.parms_in_bank1,"MCS51/DS390 - use Bank1 for parameter passing"},
+ { 0, OPTION_STACK_SIZE, NULL,"MCS51/DS390 - Tells the linker to allocate this space for stack"},
+ { 0, OPTION_PACK_IRAM, &options.pack_iram,"MCS51/DS390 - Tells the linker to pack variables in internal ram"},
#endif
{ 0, OPTION_NO_XINIT_OPT, &options.noXinitOpt, "don't memcpy initialized xram from code"},
{ 0, OPTION_NO_CCODE_IN_ASM, &options.noCcodeInAsm, "don't include c-code as comments in the asm file"},
{ 0, OPTION_ICODE_IN_ASM, &options.iCodeInAsm, "include i-code as comments in the asm file"},
#endif
{ 0, OPTION_NO_XINIT_OPT, &options.noXinitOpt, "don't memcpy initialized xram from code"},
{ 0, OPTION_NO_CCODE_IN_ASM, &options.noCcodeInAsm, "don't include c-code as comments in the asm file"},
{ 0, OPTION_ICODE_IN_ASM, &options.iCodeInAsm, "include i-code as comments in the asm file"},
{ 0, OPTION_PRINT_SEARCH_DIRS, &options.printSearchDirs, "display the directories in the compiler's search path"},
{ 0, OPTION_MSVC_ERROR_STYLE, &options.vc_err_style, "messages are compatible with Micro$oft visual studio"},
{ 0, OPTION_USE_STDOUT, &options.use_stdout, "send errors to stdout instead of stderr"},
{ 0, OPTION_PRINT_SEARCH_DIRS, &options.printSearchDirs, "display the directories in the compiler's search path"},
{ 0, OPTION_MSVC_ERROR_STYLE, &options.vc_err_style, "messages are compatible with Micro$oft visual studio"},
{ 0, OPTION_USE_STDOUT, &options.use_stdout, "send errors to stdout instead of stderr"},
options.stack_loc = getIntArg(OPTION_STACK_LOC, argv, &i, argc);
continue;
}
options.stack_loc = getIntArg(OPTION_STACK_LOC, argv, &i, argc);
continue;
}
/* first we need to create the <filename>.lnk file */
SNPRINTF (scratchFileName, sizeof(scratchFileName),
"%s.lnk", dstFileName);
/* first we need to create the <filename>.lnk file */
SNPRINTF (scratchFileName, sizeof(scratchFileName),
"%s.lnk", dstFileName);
if (TARGET_IS_Z80 || TARGET_IS_GBZ80)
{
fprintf (lnkfile, "--\n-m\n-j\n-x\n-%c %s\n",
if (TARGET_IS_Z80 || TARGET_IS_GBZ80)
{
fprintf (lnkfile, "--\n-m\n-j\n-x\n-%c %s\n",
- fprintf (lnkfile, "-myux%c\n", (options.out_fmt ? 's' : 'i'));
+ fprintf (lnkfile, "-myux%c\n", out_fmt);
+ if(options.pack_iram)
+ fprintf (lnkfile, "-Y\n");
/* if xram size specified */
if (options.xram_size_set)
fprintf (lnkfile, "-v 0x%04x\n", options.xram_size);
/* if xram size specified */
if (options.xram_size_set)
fprintf (lnkfile, "-v 0x%04x\n", options.xram_size);
|| TARGET_IS_HC08)) /*Not for the z80, gbz80*/
{ /*Why the z80 port is not using the standard libraries?*/
fprintf (lnkfile, "-l %s\n", STD_LIB);
|| TARGET_IS_HC08)) /*Not for the z80, gbz80*/
{ /*Why the z80 port is not using the standard libraries?*/
fprintf (lnkfile, "-l %s\n", STD_LIB);