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.

tms320F2812的can调节问题?

看了比较多的关于F2812的资料后,终于想动手一下,于是写了看上去超简单的一个程序,其实也真的很简单。

asm文件:

.GLOBAL _c_int00

       .text

_c_int00:              

       ADD ACC,#1

       .end

cmd文件:

MEMORY

{

  PAGE 0 : PROG : origin=0x3f8000,length=0x1fff

}

SECTIONS

{

  .text : >PROG,PAGE=0

}

编译->load program->run

出现以下错误:

Trouble running Target CPU: Can't write to data MEMORY 0x801, check MEMORY config [-2184]

ACC是加1了,在按run,出现以下错误:

Can't Run Target CPU: Can't write to data MEMORY 0x803, check MEMORY config [-2184]

这次ACC没有加1,再按run也没有其他反应了(地址加2->0x805,以此类推)

我看了,0x800-0xD00是不可以随便用的,但我好像没有招惹它,为什么会有这样的问题?请高手指点迷路

  • 您好!

    首先不要轻易改写Code Start Branch 文件。

    您要做的任务是在TI的头文件等基础上改写。

    关于你的问题:

    Begin Section是 0x3F8000, 而且必须是2个word。

    因为CodeStart里面放了一个长跳转指令LB,刚好是2个word。

       .sect "codestart"

    code_start:

       .if WD_DISABLE == 1

           LB wd_disable       ;Branch to watchdog disable code

       .else

           LB _c_int00         ;Branch to start of boot.asm in RTS library

       .endif

    SECTIONS

    {

      /* Setup for "boot to H0" mode:

         The codestart section (found in DSP28_CodeStartBranch.asm)

         re-directs execution to the start of user code.  

         Place this section at the start of H0  */

      codestart        : > BEGIN,       PAGE = 0

    .

    .

    .

    }