///////////////////////////////////////////////////////////////////////////////// //This is for the debugger rom on the M3A-7535 ES1 developement board. / //The main difference is apparently that the code starts at 0x3080 / // - lnk740.xcl - / // / // XLINK 4.44, or higher, command file to be used with the 740 / // C-compiler V1.xx / // Usage: xlink your_file(s) -f lnk740 / // / // $Id: lnk740.xcl 1.4 2001/07/16 14:14:59Z IJON Exp $ / // / // IMPORTANT: 1. Use a COPY of this file. / // 2. Select a C library at the end of this file / // that matches the compilation switches. / // 3. If you use the 37600, see note about the / // INTVEC segment futher down. / ///////////////////////////////////////////////////////////////////////////////// //First: define CPU -c740 ///////////////////////////////////////////////////////////////////////////////// //the kd38 debugger tool want these options set -ylmba ///////////////////////////////////////////////////////////////////////////////// //Setup all read-only segments (PROM) at address 8000 -Z(CODE)RCODE,Z_CDATA,N_CDATA,C_ICALL,C_RECFN,CSTR,CCSTR,CODE,CONST=3080-FEFF ///////////////////////////////////////////////////////////////////////////////// //Setup "bit" segments (always zero if there is no need to reserve //bit variable space for some other purpose) -Z(BIT)BITVARS=200 //address 40 (only) ///////////////////////////////////////////////////////////////////////////////// // Setup "ZPAGE" segments. // We allocate 41-FF for zero page by default. It is assumed that // 00-3F is for SFRs while 40 is for a few "bit" variables. // The following segment defintions (EXPR_STACK, INT_EXPR_STACK and // CSTACK) that do not have an address given must fit inside the // "41-FF" address range. // If you have the CSTACK (processor stack) segment outside zero page, // you have to give it an address and XLINK will no longer try to // fit it within zero page. -Z(ZPAGE)ZPAGE,C_ARGZ,Z_UDATA,Z_IDATA=41-FF ///////////////////////////////////////////////////////////////////////////////// // Setup "EXPR_STACK" segment. This zero page located stack is used // to hold temporary when evaluating complex expressions. // It is set to 20(hex) below. -Z(ZPAGE)EXPR_STACK+20 ///////////////////////////////////////////////////////////////////////////////// // Setup "INT_EXPR_STACK" segment. This zero page located stack is used // to hold temporary when evaluating complex expressions for interrupt // routines written in C. It is set to 0 below. // You must give this stack space if you have C written interrupts that // need an expression stack. -Z(ZPAGE)INT_EXPR_STACK+0 ///////////////////////////////////////////////////////////////////////////////// // Setup "CSTACK" segment. This is the CPU stack. Note that this can // either reside in page 0 or 1 -Z(ZPAGE)CSTACK+40 ///////////////////////////////////////////////////////////////////////////////// // Setup "NPAGE" segments at address 1000-7FFF -Z(NPAGE)NPAGE,C_ARGN,N_UDATA,N_IDATA,ECSTR=1000-7FFF ///////////////////////////////////////////////////////////////////////////////// // Setup "RF_STACK" segment. This stack is used for recursive function. // It is by default given a size of 256 bytes by the library. By giving // a non-zero size below, you _expand_ the stack by that amount. -Z(NPAGE)RF_STACK+0 ///////////////////////////////////////////////////////////////////////////////// // Setup the "INTVEC" interrupt segment. // If you are using the 37600 (chip group -v2) and the default cstartup // reset vector, you must change the INTVEC line below to: // -Z(CODE)INTVEC=FFC0-FFFF // // If you have a tiny chip derivative that does not have the interrupt // vectors in page FF, you can change the page of the addresses below. // CSTARTUP inserts the reset vector relative to INTVEC start which // means that you can change the page without any problems: // -Z(CODE)INTVEC=1FE0-1FFF // -Z(CODE)C_FNT=1F00 -Z(CODE)INTVEC=FFE0-FFFF -Z(CODE)C_FNT=FF00 ///////////////////////////////////////////////////////////////////////////////// // See configuration section concerning printf/sprintf -e_small_write=_formatted_write ///////////////////////////////////////////////////////////////////////////////// // See configuration section concerning scanf/sscanf -e_medium_read=_formatted_read ///////////////////////////////////////////////////////////////////////////////// // This example files selects the default library which is // tiny memory model and a 740 with MUL/DIV. // If you want to use another library, you can do it by // removing the comments around it and adding comments around // the default library. // cl7400t //-v0 -mt // cl7400l //-v0 -ml // cl7401t //-v1 -mt // cl7401l //-v1 -ml // cl7402t //-v2 -mt // cl7402l //-v2 -ml cl7400t //Code will now reside on file aout.a31 in INTEL-STANDARD format