Skip to main content
Visitor II
March 22, 2004
Question

ST7 Visual Debug

  • March 22, 2004
  • 6 replies
  • 1132 views
Posted on March 22, 2004 at 07:03

ST7 Visual Debug

    This topic has been closed for replies.

    6 replies

    hkurtAuthor
    Visitor II
    March 16, 2004
    Posted on March 16, 2004 at 11:45

    Because I am a beginner I have some problems to use the developpement enviroment.

    My 1. Project has common files like

    STLITE2.ASM

    RAM.asm

    TABELLEN.asm

    CONSTANT.INC = all const. which are PUBLIC

    MODULE.asm = small subroutines which are used in dif.program-modules by CALL.

    and

    program-modules like

    RELAIS.asm

    MESSWRTE.asm

    TAST.asm

    .....

    e.g. in the prog.modul RELAIS.asm I have to link

    ST7LITE2

    TABELLEN

    MODULE

    RELAIS (with INC-files ST7LITE2, CONSTANT, RAM)

    all files are asm befor.

    for asm MODULE and test all the modules I must have the same INC-files.

    If I asm RELAIS, I get link-error for all constants, because there are defind firht in the MODULE.obj.

    How can I handle this?

    For all help my thanks in advance

    Kurt

    Visitor II
    March 16, 2004
    Posted on March 16, 2004 at 11:55

    I always use a main.asm where i define the register of the mcu, and all sub.asm like this:

    include ''st72inc''

    include ''define.asm''

    include ''ram.asm''

    include ''functies.asm''

    include ''duty.asm''

    include ''SCI.asm''

    include ''I2C_asm.asm''

    include ''string.asm''

    Every *.asm start with a ENTER space [No st7/]

    select the ROM or RAM space

    End with also an ENTER space [No END]

    So every *.asm will be a part of the 'big' main.asm

    [ This message was edited by: Moppie on 16-03-2004 16:26 ]

    hkurtAuthor
    Visitor II
    March 17, 2004
    Posted on March 17, 2004 at 10:29

    I am not shure what you mean with ENTER space. Is that

    ENTER (car.Ret)

    space ENTER

    ?

    I apriciate all help how to built a project with e.g. 15 files. I would like to test diff.modules separate.

    Has anybody a sample-project which he can mail to me where I can see how to manage this?

    I have experiance with MC05 and Z86 over more than 20 projects and I never have problems like with this assembler.

    regards

    Kurt

    hkurtAuthor
    Visitor II
    March 17, 2004
    Posted on March 17, 2004 at 13:57

    I have now built the firth file which exists of 6 program files. Between the program there is no ROM specification. The code is correct, but with a call instruction the SIMULATOR jmp's to the address befor, which is the end of the last module.

    GEN_INIT

    E000 AE7E ld X,#126 ;

    E002 A680 ld A,#TEMP1 ;

    E004 CDE05A call CLR_RAM ;A=0

    E007 CDE02B call INI_REG ;

    .....

    E059 81 ret ;end of last module

    E05A B780 CLR_RAM ld TEMP1,A ;beginn new module

    the call CLR_RAM jmp's to the ret address, instead to the CLR_RAM addr.

    can anybody tell me why?

    regards

    Kurt

    Visitor II
    March 22, 2004
    Posted on March 22, 2004 at 02:21

    There must be a problem in the building.

    May be all your .o files do not come from the same build? Check the list file of this asm file. Has it replaced the correct address for CLR_RAM at the call instruction?
    hkurtAuthor
    Visitor II
    March 22, 2004
    Posted on March 22, 2004 at 07:03

    This problem occurs at time of debugging in the Simulator. I have found a solution. For run an application in the Simulator there musst be only 1 file. Therefore I have copy all source files in one new big source file.

    Kurt

    Quote:

    On 2004-03-17 18:27, Habluetzel wrote:

    I have now built the firth file which exists of 6 program files. Between the program there is no ROM specification. The code is correct, but with a call instruction the SIMULATOR jmp's to the address befor, which is the end of the last module.

    GEN_INIT

    E000 AE7E ld X,#126 ;

    E002 A680 ld A,#TEMP1 ;

    E004 CDE05A call CLR_RAM ;A=0

    E007 CDE02B call INI_REG ;

    .....

    E059 81 ret ;end of last module

    E05A B780 CLR_RAM ld TEMP1,A ;beginn new module

    the call CLR_RAM jmp's to the ret address, instead to the CLR_RAM addr.

    can anybody tell me why?

    regards

    Kurt