TI中文支持网
TI专业的中文技术问题搜集分享网站

有关6678 EMIF16 nor flash启动问题

我的CMD文件是:

-stack 0x400
-heap 0x400

MEMORY
{
BOOT (R): o = 0x70000000 l = 0x00000100
INTVEC (R): o = 0x70000100 l = 0x00001000 /* 512kB LOCAL L2/SRAM */
LOCAL_L2_SRAM: o = 0x00800000 l = 0x00080000 /* 512kB LOCAL L2/SRAM */
LOCAL_L1P_SRAM: o = 0x00E00000 l = 0x00008000 /* 32kB LOCAL L1P/SRAM */
LOCAL_L1D_SRAM: o = 0x00F00000 l = 0x00008000 /* 32kB LOCAL L1D/SRAM */
EMIF16_CS2 (R): o = 0x70001100 l = 0x003FE000
SHRAM (RWIX): o = 0x0C000000 l = 0x00400000 /* 4MB Multicore shared Memory */

EMIF16_CS3: o = 0x74000000 l = 0x04000000 /* 64MB EMIF16 CS3 Data Memory */
EMIF16_CS4: o = 0x78000000 l = 0x04000000 /* 64MB EMIF16 CS4 Data Memory */
EMIF16_CS5: o = 0x7C000000 l = 0x04000000 /* 64MB EMIF16 CS5 Data Memory */

DDR3: o = 0x80000000 l = 0x80000000 /* 2GB CE0 and CE1 external DDR3 SDRAM */
}

SECTIONS
{
.boot > BOOT
{
-l rts6600_elf.lib <boot.obj> (.text)
}
.vecs > INTVEC
.csl_vect > INTVEC
.text > EMIF16_CS2
.stack > SHRAM
.bss > SHRAM
.cio > SHRAM
.const > EMIF16_CS2
.data > SHRAM
.switch > EMIF16_CS2
.sysmem > SHRAM
.far > SHRAM
.args > SHRAM
.ppinfo > SHRAM
.ppdata > SHRAM

/* COFF sections */
.pinit > EMIF16_CS2
.cinit > EMIF16_CS2

/* EABI sections */
.binit > SHRAM
.init_array > SHRAM
.neardata > SHRAM
.fardata > SHRAM
.rodata > SHRAM
.c6xabi.exidx > SHRAM
.c6xabi.extab > SHRAM
}

中断向量表Intc_Vector.asm如下:

;create interrupt vector table for C6000 DSP
;————————————————————–
;This file can be modified to add Interrupt Service Routine(ISR);for an interrupt, the steps are:
;1,reference to the externally defined ISR, for example
; .ref EDMA_ISR
;2,modify the corresponding entry in the interrupt vector table.
; For example, if interrupt 8 is used for EDMA, then you should
; modify the entry number 8 like below:
; VEC_ENTRY EDMA_ISR ;interrupt 8;————————————————————–
;Author: Brighton Feng
;Created on 2010-12-6
;————————————————————–

;reference to the externally defined ISR
.ref _c_int00
.ref C66x_ISR_INTC4
.ref C66x_ISR_INTC5
.ref C66x_ISR_INTC6
.ref C66x_ISR_INTC7
.ref C66x_ISR_INTC8
.ref C66x_ISR_INTC9
.ref C66x_ISR_INTC10
.ref C66x_ISR_INTC11
.ref C66x_ISR_INTC12
.ref C66x_ISR_INTC13
.ref C66x_ISR_INTC14
.ref C66x_ISR_INTC15
.ref Exception_service_routine
.ref exception_record

.global vectors

;————————————————————–
.sect ".text"
;create interrupt vector for NMINMI_ISR:
STW B1,*-B15[1]

;save some key registers when exception happens
MVKL exception_record,B1
MVKH exception_record,B1

STW B3, *+B1[0]
STW A4, *+B1[1]
STW B4, *+B1[2]
STW B14, *+B1[3]
STW B15, *+B1[4]
;jump to exception service routine
MVKL Exception_service_routine, B1
MVKH Exception_service_routine, B1
B B1

LDW *-B15[1],B1
NOP 4

;————————————————————–
;create interrupt vector for reset (interrupt 0)
VEC_RESET .macro addr
MVKL addr,B0
MVKH addr,B0
B B0
MVC PCE1,B0
NOP 4
.align 32
.endm

;create interrupt vector for other used interruptsVEC_ENTRY .macro addr
STW B0,*–B15
MVKL addr,B0
MVKH addr,B0
B B0
LDW *B15++,B0
NOP 4
.align 32
.endm

;create interrupt vector for unused interruptsVEC_DUMMY .macro
unused_int?:
B unused_int? ;dead loop for unused interrupts
NOP 5
.align 32
.endm

;————————————————————–
;interrupt vector table .sect ".vecs"
.align 1024
vectors:
VEC_RESET _c_int00 ;RESET
VEC_ENTRY NMI_ISR ;NMI/Exception
VEC_DUMMY ;RSVD
VEC_DUMMY ;RSVD
VEC_ENTRY C66x_ISR_INTC4 ;interrupt 4
VEC_ENTRY C66x_ISR_INTC5 ;interrupt 5
VEC_ENTRY C66x_ISR_INTC6 ;interrupt 6
VEC_ENTRY C66x_ISR_INTC7 ;interrupt 7
VEC_ENTRY C66x_ISR_INTC8 ;interrupt 8
VEC_ENTRY C66x_ISR_INTC9 ;interrupt 9
VEC_ENTRY C66x_ISR_INTC10 ;interrupt 10
VEC_ENTRY C66x_ISR_INTC11 ;interrupt 11
VEC_ENTRY C66x_ISR_INTC12 ;interrupt 12
VEC_ENTRY C66x_ISR_INTC13 ;interrupt 13
VEC_ENTRY C66x_ISR_INTC14 ;interrupt 14
VEC_ENTRY C66x_ISR_INTC15 ;interrupt 15

.end

.制作工具里面.rmd如下:

MultiCore_Core0.out

–ascii
–image
–map MultiCore_Core0.map
–entrypoint _c_int00

ROMS
{
ROM1: org = 0x70000000, len = 0x200000, romwidth = 32, files = {MultiCore_Core0.btbl}
}

问题是:如果我应用程序里不加入外部中断,就可以启动成功;如果我在应用程序里加入了外部GPIO中断,就启动不了,如果只是在应用程序里配置了中断,但是没有外部触发也可以启动,只要外部触发了中断感觉就跑飞了,Debug模式下是正常的请大神们帮忙看看

Shine:

请问有没有用仿真器跟一下加载后的代码,在外部GPIO管脚触发后,程序跑到哪里了?中断标志位有没有置1?有没有进入中断子程序?

user3508153:

回复 Shine:

挂上仿真器中断运行正常

user3508153:

回复 Shine:

只要外部中断产生了就跑飞了

Shine:

回复 user3508153:

在boot mode下,用仿真器跟踪加载后的代码,中断能运行正常?

user3508153:

回复 Shine:

可以正常运行,我看了资料需要在使用中断函数之前调用IRQ_setVecs(vectors);/* 重定位中断向量表 */,请问IRQ_setVecs()这个函数6678能使用吗

Shine:

回复 user3508153:

c6678 csl库里没有IRQ_setVecs函数,中断向量表在cmd文件里定位。

赞(0)
未经允许不得转载:TI中文支持网 » 有关6678 EMIF16 nor flash启动问题
分享到: 更多 (0)