[P][FACE=Times New Roman][SIZE=3]求助:[/FACE][/SIZE][/P][P][SIZE=3][FACE=Times New Roman]以前玩的是[/SIZE][FACE=Times New Roman]51[/FACE][FACE=Times New Roman]和[/FACE][FACE=Times New Roman]196[/FACE][FACE=Times New Roman]系列,喜欢汇编。现在想玩玩[/FACE][FACE=Times New Roman]MSP430[/FACE][FACE=Times New Roman],手头有片[/FACE][FACE=Times New Roman]MSP430F5438A[/FACE][FACE=Times New Roman]。照例程新建项目,[/FACE][FACE=Times New Roman]compile[/FACE][FACE=Times New Roman]能通过,但[/FACE][FACE=Times New Roman]make[/FACE][FACE=Times New Roman]时不成功,提示如下信息:[/FACE][/FACE][/P][P][FACE=Times New Roman][SIZE=3]Building configuration: test - Debug [/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]Updating build tree... [/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]Linking [/FACE][/SIZE][/P][P][SIZE=3][FACE=Times New Roman]Error[e16]: Segment RESET (size: 0x2 align: 0x1) is too long for segment definition. At least 0x2 more bytes needed. The problem [/SIZE][/FACE][/P][P][SIZE=3][FACE=Times New Roman]occurred while processing the segment placement command "-Z(CODE)RESET=FFFE-FFFF", where at the moment of placement the [/SIZE][/FACE][/P][P][FACE=Times New Roman][SIZE=3]available memory ranges were "-none-" [/FACE][/SIZE][/P][P][SIZE=3][FACE=Times New Roman]Reserved ranges relevant to this placement: [/SIZE][/FACE][/P][P][SIZE=3][FACE=Times New Roman]fffe-ffff Absolute code from test [/SIZE][/FACE][/P][P][FACE=Times New Roman][SIZE=3]Error while running Linker [/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]Total number of errors: 1 [/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]Total number of warnings: 0[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P][P][SIZE=3][FACE=Times New Roman]不理解提示中的内容,[/SIZE][FACE=Times New Roman]MSP430[/FACE][FACE=Times New Roman]复位时的中断地址是[/FACE][FACE=Times New Roman]FFFEH[/FACE][FACE=Times New Roman],在这跳转到主程序入口也是没错啊。请各位指点迷津。谢谢了。[/FACE][/FACE][/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P][P] [/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]汇编源程序如下:[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]; Texas Instruments, Inc[/FACE][/SIZE][/P][P][SIZE=3][FACE=Times New Roman]; May 2008[/SIZE][/FACE][/P][P][FACE=Times New Roman][SIZE=3]; Built with IAR Embedded Workbench Version: 4.11A[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3];*******************************************************************************[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]#include "msp430.h"[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3];-------------------------------------------------------------------------------[/FACE][/SIZE][/P][P][SIZE=3][FACE=Times New Roman] ORG 0FC00h ; Progam Start (1K Flash device)[/SIZE][/FACE][/P][P][FACE=Times New Roman][SIZE=3];-------------------------------------------------------------------------------[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]RESET mov.w #0280h,SP ; Set stackpointer (128B RAM device)[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop watchdog timer[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]SetupP1 bis.b #80h,&P9DIR ; Set P9.0 to output direction[/FACE][/SIZE][/P][P][SIZE=3][FACE=Times New Roman] ;[/SIZE][/FACE][/P][P][FACE=Times New Roman][SIZE=3]Mainloop xor.b #080h,&P9OUT ; Toggle P9.7[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]Wait mov.w #050000,R15 ; Delay to R15[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]L1 dec.w R15 ; Decrement R15[/FACE][/SIZE][/P][P][SIZE=3][FACE=Times New Roman] jnz L1 ; Delay over?[/SIZE][/FACE][/P][P][SIZE=3][FACE=Times New Roman] jmp Mainloop ; Again[/SIZE][/FACE][/P][P][SIZE=3][FACE=Times New Roman] nop ;[/SIZE][/FACE][/P][P][FACE=Times New Roman][SIZE=3];-------------------------------------------------------------------------------[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]; Interrupt Vectors[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3];-------------------------------------------------------------------------------[/FACE][/SIZE][/P][P][SIZE=3][FACE=Times New Roman] ORG 0FFFEh ; MSP430 RESET Vector[/SIZE][/FACE][/P][P][SIZE=3][FACE=Times New Roman] DW RESET ; [/SIZE][/FACE][/P][P][SIZE=3][FACE=Times New Roman] END[/SIZE][/FACE][/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P][P][SIZE=3][FACE=Times New Roman]Ink430f5438a.xcl[/SIZE][FACE=Times New Roman]文件的相关内容如下:[/FACE][/FACE][/P][P][FACE=Times New Roman][SIZE=3]// -------------------------------------[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]// All memory 0-FFFFF[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]//[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]// ---------------------------[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]// Code[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]//[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]-P(CODE)CODE=5C00-FF7F,10000-45BFF[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]-Z(CODE)CODE_ID[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]// ---------------------------[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]// Constant data[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]//[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]-Z(CONST)DATA20_C,DATA20_ID=5C00-FF7F,10000-45BFF[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]// -------------------------------------[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]// Interrupt vectors[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]//[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]-Z(CODE)INTVEC=FF80-FFFF[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3]-Z(CODE)RESET=FFFE-FFFF[/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P][P][FACE=Times New Roman][SIZE=3][/FACE][/SIZE][/P] |