串口中断出现错误

2019-07-21 19:45发布

在以前别人做的DSP程序上扩展功能,主要是串口中断和定时器中断,中断设置确定没有问题,由于功能需要,主程序中switch语句和if语句较多,功能没有全部实现时,使用编译器的1级优化,勾选优化代码大小,程序正常运行,但是使用更高级别的优化时,串口中断就出现错误
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
19条回答
jiajs
2019-07-22 04:15

MEMORY
{
PAGE 0:    /* Program Memory */
ZONE0  : origin = 0x002000, length = 0x002000     /* XINTF zone 0 */
ZONE1  : origin = 0x004000, length = 0x002000     /* XINTF zone 1 */
ZONE2  : origin = 0x080000, length = 0x080000     /* XINTF zone 2 */
ZONE6  : origin = 0x100000, length = 0x080000     /* XINTF zone 6 */
OTP  : origin = 0x3D7800, length = 0x000800     /* on-chip OTP */
FLASHD  : origin = 0x3EC000, length = 0x004000     /* on-chip FLASH */
FLASHC  : origin = 0x3F0000, length = 0x004000     /* on-chip FLASH */
FLASHB  : origin = 0x3F4000, length = 0x002000     /* on-chip FLASH */
FLASHA  : origin = 0x3F6000, length = 0x001F80     /* on-chip FLASH */
CSM_RSVD : origin = 0x3F7F80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
BEGIN  : origin = 0x3F7FF6, length = 0x000002     /* Part of FLASHA.  Used for "boot to Flash" bootloader mode. */
CSM_PWL  : origin = 0x3F7FF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA */
RAMH0  : origin = 0x3F8000, length = 0x002000     /* on-chip RAM block H0 */
RAML0  : origin = 0x008000, length = 0x001000     /* on-chip RAM block L1 */
/*ZONE7  : origin = 0x3FC000, length = 0x003FC0     // XINTF zone 7 available if MP/MCn=1*/
ROM  : origin = 0x3FF000, length = 0x000FC0     /* Boot ROM available if MP/MCn=0 */
RESET  : origin = 0x3FFFC0, length = 0x000002     /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */
VECTORS  : origin = 0x3FFFC2, length = 0x00003E     /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */
PAGE 1 :   /* Data Memory */
BOOT_RSVD : origin = 0x000000, length = 0x000080     /* Part of M0, BOOT rom will use this for stack */
RAMM0  : origin = 0x000080, length = 0x000380     /* on-chip RAM block M0 */
RAMM1  : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
RAML1  : origin = 0x009000, length = 0x001000     /* on-chip RAM block L1 */
FLASHJ  : origin = 0x3D8000, length = 0x002000     /* on-chip FLASH */
FLASHI  : origin = 0x3DA000, length = 0x002000     /* on-chip FLASH */
FLASHH  : origin = 0x3DC000, length = 0x004000     /* on-chip FLASH */
FLASHG  : origin = 0x3E0000, length = 0x004000     /* on-chip FLASH */
FLASHF  : origin = 0x3E4000, length = 0x004000     /* on-chip FLASH */
FLASHE  : origin = 0x3E8000, length = 0x004000     /* on-chip FLASH */
}

SECTIONS
{
/*** Code Security Password Locations ***/
csmpasswds : > CSM_PWL      PAGE = 0  /* Used by file CSMPasswords.asm */
csm_rsvd : > CSM_RSVD     PAGE = 0  /* Used by file CSMPasswords.asm */
/*** User Defined Sections ***/
    codestart : > BEGIN,  PAGE = 0        /* Used by file CodeStartBranch.asm */
    wddisable : > FLASHA,  PAGE = 0  /* Used by file CodeStartBranch.asm */
   copysections : > FLASHA,  PAGE = 0  /* Used by file SectionCopy.asm */
.reset  : > RESET,       PAGE = 0, TYPE = DSECT
vectors  : > VECTORS      PAGE = 0, TYPE = DSECT
/*** Uninitialized Sections ***/
    .stack  : > RAMM1        PAGE = 1
    .ebss  : > RAML1        PAGE = 1
    .esysmem : > RAML1        PAGE = 1
.sysmem  : > RAML1        PAGE = 1
/*** Initialized Sections ***/
ramfuncs : LOAD = FLASHC,
     RUN = RAML0,
     LOAD_START(_RamfuncsLoadStart),
     LOAD_END(_RamfuncsLoadEnd),
     RUN_START(_RamfuncsRunStart),
     PAGE = 0
.text  : LOAD = FLASHC, PAGE = 0
     RUN = RAMH0, PAGE = 0
     LOAD_START(_text_loadstart),
     RUN_START(_text_runstart),
     SIZE(_text_size)
.cinit  : LOAD = FLASHC, PAGE = 0
     RUN = RAMH0, PAGE = 0
     LOAD_START(_cinit_loadstart),
     RUN_START(_cinit_runstart),
     SIZE(_cinit_size)
.pinit  : LOAD = FLASHC, PAGE = 0
     RUN = RAMH0, PAGE = 0
     LOAD_START(_pinit_loadstart),
     RUN_START(_pinit_runstart),
     SIZE(_pinit_size)
.switch   :   LOAD = FLASHC, PAGE = 0
                  RUN = RAMH0, PAGE = 0
                  LOAD_START(_switch_loadstart),
                  RUN_START(_switch_runstart),
      SIZE(_switch_size)
/*.const   :   LOAD = FLASHJ, PAGE = 0
                  RUN = RAML0L1, PAGE = 0
                  LOAD_START(_const_loadstart),
                  RUN_START(_const_runstart),
      SIZE(_const_size)*/
.econst   :   LOAD = FLASHJ, PAGE = 1
                  RUN = RAML1, PAGE = 1
                  LOAD_START(_econst_loadstart),
                  RUN_START(_econst_runstart),
      SIZE(_econst_size)
/*** IQmath ***/
IQmath   :   LOAD = FLASHC, PAGE = 0
                  RUN = RAMH0, PAGE = 0
                  LOAD_START(_IQmath_loadstart),
                  RUN_START(_IQmath_runstart),
      SIZE(_IQmath_size)
IQmathTables : > ROM    PAGE = 0, TYPE = NOLOAD   /* Math Tables In ROM */
IQmathTablesRam :   LOAD = FLASHJ, PAGE = 1
                  RUN = RAML1, PAGE = 1
                  LOAD_START(_IQmathTablesRam_loadstart),
                  RUN_START(_IQmathTablesRam_runstart),
      SIZE(_IQmathTablesRam_size)
.cio    : > FLASHA,  PAGE = 0
}

一周热门 更多>