This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28335 汇编程序出现错误地址

Other Parts Discussed in Thread: CONTROLSUITE

程序一旦执行到这一句就会进入死循环,而事实上这个地址不存在,C盘下根本没有ti文件夹。怎么解决?

  • 请问能否给出详细信息?

    很抱歉,对汇编不是很熟悉。您现在使用的是TI例程还是自己的程序?能否详细指出?
  • 自己的程序是这样的,应该是作除法时出了问题。

  • 您现在controlSUITE没有安装在默认位置?在我的电脑默认安装路径下可以找到

    C:\ti\controlSUITE\libs\math\FPUfastRTS\V100\source

    附上文件

    ; TI File $Revision: /main/3 $
    ; Checkin $Date: January 25, 2008   16:13:52 $
    ; ========================================================================
    ;  This software is licensed for use with Texas Instruments C28x
    ;  family DSCs.  This license was provided to you prior to installing
    ;  the software.  You may review this license by consulting a copy of
    ;  the agreement in the doc directory of this library.
    ; ------------------------------------------------------------------------
    ;          Copyright (C) 2007-2008 Texas Instruments, Incorporated.
    ;                          All Rights Reserved.
    ; ========================================================================
    ;
    ; FILE:  div_f32.asm
    ;
    ; TITLE: Fast 32-bit floating-point division for the C28x + Floating-Point Unit.
    ;
    ; DESCRIPTION:
    ;
    ;    This function computes a 32-bit floating point division A/B.
    ;
    ; FUNCTIONS:
    ;
    ;    This funciton (FS$$DIV) will be called when 32-bit floating point division 
    ;    is performed.  That is:
    ;    
    ;    float32 A,B,Y;
    ;    ...
    ;    <A & B initalized>
    ;    ...
    ;    Y = A/B;  // Call to FS$$DIV
    ;
    ; ASSUMPTIONS:
    ; 
    ;
    ; ALGORITHM:
    ;
    ;              Ye = Estimate(1/B);
    ;              Ye = Ye*(2.0 - Ye*B)
    ;              Ye = Ye*(2.0 - Ye*B)
    ;              Y  = A*Ye
    ;
    ; ###########################################################################
    ; $TI Release: C28x FPU fastRTS Library V1.00 $
    ; $Release Date: August 6, 2008 $
    ; ###########################################################################
            .page
            .global     FS$$DIV
            .text
    
    FS$$DIV:
    
            EINVF32     R2H, R1H            ; R2H = Ye = Estimate(1/B)
            CMPF32      R0H, #0.0           ; Check if A == 0
            MPYF32      R3H, R2H, R1H       ; R3H = Ye*B
            NOP
            SUBF32      R3H, #2.0, R3H      ; R3H = 2.0 - Ye*B       
            NOP        
            MPYF32      R2H, R2H, R3H       ; R2H = Ye = Ye*(2.0 - Ye*B)
            NOP
    ; Next line: if commented out: 0.0/0.0 = 0.0
    ;            if not commented: 0.0/0.0 = infinity
    ;       MOV32       R2H, R0H, EQ        ; If A == 0.0, Ye = 0.0
            MPYF32      R3H, R2H, R1H       ; R3H = Ye*B
            CMPF32      R1H, #0.0           ; Check if B == 0.0
            SUBF32      R3H, #2.0, R3H      ; R3H = 2.0 - Ye*B
            NEGF32      R0H, R0H, EQ        ; Fixes sign for A/0.0
            MPYF32      R2H, R2H, R3H       ; R2H = Ye = Ye*(2.0 - Ye*B)
            NOP
            MPYF32      R0H, R0H, R2H       ; R0H = Y = A*Ye = A/B
            LRETR
           	.endasmfunc
    ;--------------------------------------------------------------------------
    ;            Copyright (c) 2007-2008 Texas Instruments, Incorporated.
    ;                           All Rights Reserved.
    ;===========================================================================
    ;===========================================================================
    ; End of File.
    ;===========================================================================
    

  • 我是没有安装在默认位置,一定要这样做是吗?

  • 根据您反汇编的内容,应该会去到这个路径下找地址,所以还是建议安装在默认路径下。
  • 我已经重新安装了controlSUITE在默认路径下,可是代码还是会死在0x338490~0x338495这个死循环内。

    而且通常在调用函数时会出现这个问题。

  • 若是可以的话,能否上传或者私信给我您的程序?
  • 我试了一下,并没有死循环。您现在的死循环是指什么?

    我在p->Ek = p->Give- p->Feedback; 打断点,而后向下运行,之后会到main.c文件的    A_Isq1_R.Give = currentref;

  • 有时候也不是在这个地方,就是程序在连续运行时,暂停一下,会发现进入了死循环,您有这个问题吗?

  • 呃 我又试了一遍,每次暂停后的位置不同,但都没有进入死循环

    我是用28335的control card试的
  • 搞清楚了,是板子的供电电源有问题。
  • 行吧...很高兴您能解决问题