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

怎样才能从MSP432P401的icf文件找到程序RESET时中断向量指向的地址?

怎样才能从MSP432P401的icf文件找到程序RESET时中断向量指向的地址?

MSP430F5438A的xcl文件

// —————————

// Code

//

-Z(CODE)CSTART,ISR_CODE=5C00-FF7F

// —————————

// Constant data

//

-Z(CONST)DATA16_C,DATA16_ID,DIFUNCT,CHECKSUM=5C00-FF7F

// ————————————-

// All memory 0-FFFFF

//

// —————————

// Code

//

-P(CODE)CODE=5C00-FF7F,10000-45BFF

-Z(CODE)CODE_ID

// —————————

// Constant data

//

-Z(CONST)DATA20_C,DATA20_ID=5C00-FF7F,10000-45BFF

// ————————————-

// Interrupt vectors

//

-Z(CODE)INTVEC=FF80-FFFF

-Z(CODE)RESET=FFFE-FFFF    //复位时中断向量指向的地址

 

 

MSP432P401的icf文件

/*###ICF### Section handled by ICF editor, don't touch! ****/

/*-Editor annotation file-*/

/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */

/*-Specials-*/

define symbol __ICFEDIT_intvec_start__ = 0x00000000;

/*-Memory Regions-*/

define symbol __ICFEDIT_region_ROM_start__ = 0x00000000;

define symbol __ICFEDIT_region_ROM_end__   = 0x0003FFFF;

define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;

define symbol __ICFEDIT_region_RAM_end__   = 0x2000FFFF;

/*-Sizes-*/

define symbol __ICFEDIT_size_cstack__ = 0x1000;

define symbol __ICFEDIT_size_heap__   = 0x2000;

/**** End of ICF editor section. ###ICF###*/

 

define memory mem with size = 4G;

define region ROM_region   = mem:[from __ICFEDIT_region_ROM_start__   to __ICFEDIT_region_ROM_end__];

define region RAM_region   = mem:[from __ICFEDIT_region_RAM_start__   to __ICFEDIT_region_RAM_end__];

 

define block CSTACK    with alignment = 8, size = __ICFEDIT_size_cstack__   { };

define block HEAP      with alignment = 8, size = __ICFEDIT_size_heap__     { };

 

initialize by copy { readwrite };

do not initialize  { section .noinit };

 

place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };

place in ROM_region   { readonly };

place in RAM_region   { readwrite,

                        block CSTACK, block HEAP };

 

 

 

问题:在MSP430F5438A的xcl文件中可以看到程序RESET时中断向量指向“FFFE-FFFF”。但在MSP432P401的icf文件中却没有程序RESET时指向的地址,怎样才能确定MSP432P401程序RESET时中断向量指向的地址?

灰小子:

内核不同,有些东西差异比较大。

MSP432P401的复位向量地址好像在0x0000_0004,具体看MSP432P4xx Family Technical Reference Manual 吧

Maka Luo:

MSP432是M4内核 MSP430是16bits MSP430内核,两者完全不一样。

建议先仔细阅读用户手册。

Maka Luo:

回复 Maka Luo:

#pragma DATA_SECTION(interruptVectors, ".intvecs")void (* const interruptVectors[])(void) ={ (void (*)(void))((uint32_t)&__STACK_END), /* The initial stack pointer */ resetISR, /* The reset handler */ nmiISR, /* The NMI handler */ faultISR, /* The hard fault handler */ defaultISR, /* The MPU fault handler */ defaultISR, /* The bus fault handler */ defaultISR, /* The usage fault handler */ 0, /* Reserved */ 0, /* Reserved */ 0, /* Reserved */ 0, /* Reserved */ defaultISR, /* SVCall handler */ defaultISR, /* Debug monitor handler */ 0, /* Reserved */ defaultISR, /* The PendSV handler */ SysTick_ISR, /* The SysTick handler */ defaultISR, /* PSS ISR */ defaultISR, /* CS ISR */ defaultISR, /* PCM ISR */ defaultISR, /* WDT ISR */ defaultISR, /* FPU ISR */ defaultISR, /* FLCTL ISR */ defaultISR, /* COMP0 ISR */ defaultISR, /* COMP1 ISR */ defaultISR, /* TA0_0 ISR */ defaultISR, /* TA0_N ISR */ TimerA1_ISR, /* TA1_0 ISR */ defaultISR, /* TA1_N ISR */ TimerA2_ISR, /* TA2_0 ISR */ defaultISR, /* TA2_N ISR */ defaultISR, /* TA3_0 ISR */ defaultISR, /* TA3_N ISR */ EusciA0_ISR, /* EUSCIA0 ISR */ defaultISR, /* EUSCIA1 ISR */ defaultISR, /* EUSCIA2 ISR */ defaultISR, /* EUSCIA3 ISR */ defaultISR, /* EUSCIB0 ISR */ defaultISR, /* EUSCIB1 ISR */ defaultISR, /* EUSCIB2 ISR */ defaultISR, /* EUSCIB3 ISR */ defaultISR, /* ADC14 ISR */ defaultISR, /* T32_INT1 ISR */ defaultISR, /* T32_INT2 ISR */ defaultISR, /* T32_INTC ISR */ defaultISR, /* AES ISR */ defaultISR, /* RTC ISR */ defaultISR, /* DMA_ERR ISR */ defaultISR, /* DMA_INT3 ISR */ defaultISR, /* DMA_INT2 ISR */ defaultISR, /* DMA_INT1 ISR */ defaultISR, /* DMA_INT0 ISR */ Port1IsrHandler, /* PORT1 ISR */ defaultISR, /* PORT2 ISR */ defaultISR, /* PORT3 ISR */ defaultISR, /* PORT4 ISR */ defaultISR, /* PORT5 ISR */ defaultISR, /* PORT6 ISR */ defaultISR, /* Reserved 41 */ defaultISR, /* Reserved 42 */ defaultISR, /* Reserved 43 */ defaultISR, /* Reserved 44 */ defaultISR, /* Reserved 45 */ defaultISR, /* Reserved 46 */ defaultISR, /* Reserved 47 */ defaultISR, /* Reserved 48 */ defaultISR, /* Reserved 49 */ defaultISR, /* Reserved 50 */ defaultISR, /* Reserved 51 */ defaultISR, /* Reserved 52 */ defaultISR, /* Reserved 53 */ defaultISR, /* Reserved 54 */ defaultISR, /* Reserved 55 */ defaultISR, /* Reserved 56 */ defaultISR, /* Reserved 57 */ defaultISR, /* Reserved 58 */ defaultISR, /* Reserved 59 */ defaultISR, /* Reserved 60 */ defaultISR, /* Reserved 61 */ defaultISR, /* Reserved 62 */ defaultISR, /* Reserved 63 */ defaultISR /* Reserved 64 */};

中断向量表MAP文件

address name ——- —- 00000000 __TI_static_base__ 00000000 interruptVectors 00000200 __STACK_SIZE

闲云:

回复 灰小子:

谢谢

闲云:

回复 Maka Luo:

谢谢你

赞(0)
未经允许不得转载:TI中文支持网 » 怎样才能从MSP432P401的icf文件找到程序RESET时中断向量指向的地址?
分享到: 更多 (0)