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.

求助程序跳转到固定地址的方法 28033,在线等



使用的是28033芯片,之前用的CCS3.1 使用asm("LB #3F6FFCH");代码就能直接跳转到3F6FFCH地址运行,现在我使用的是CCS6,怎么编译不过啊。。报错(

[E0002] Invalid mnemonic specification
LB 3F6FFCH

。后来使用这个方法:

#define C28begin (void(*)(void))0x3F6FFC

试图在希望跳转时运行(*C28begin )();还是跳不到

哪位达人知道怎么让程序直接跳转到固定FLASH地址的方法啊,汇编或者C都行,谢谢啊。。在线等

  • CCS6下面用是可以的,在引号与LB之间加个空格或者Tab试试看。

    asm("空格或者TabLB #0x003F7F7E");

  • 参考写

    WD_DISABLE .set 1 ;set to 1 to disable WD, else set to 0

    .ref _c_int00
    .global code_start

    ***********************************************************************
    * Function: codestart section
    *
    * Description: Branch to code starting point
    ***********************************************************************

    .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

    ;end codestart section

    不行直接间隔asm文件写