msp430标准汇编例程make出错

2019-03-24 15:16发布

make出现错误提示:
Error[e16]: Segment RESET (size: 0x2 align: 0x1) is too long for segment definition. At least 0x2 more bytes needed. The  problem occurred while processing the segment placement command "-Z(CONST)RESET=FFFE-FFFF", where at the  moment of placement the available memory ranges were "-none-"
   Reserved ranges relevant to this placement:
   fffe-ffff            Absolute code from fet120_1
在workspace-- options-- 设置芯片为MSP430F1232
linker-- configer里面设置override default设置为$TOOLKIT_DIR$CONFIGlnk430F1232.xcl
请问为什么楚这个问题。


下面是源代码,其实就是一个范例:

;******************************************************************************
;   MSP-FET430P120 Demo - Software Toggle P1.0
;
;   Description: Toggle P1.0 by xor'ing P1.0 inside of a software loop.
;   ACLK = n/a, MCLK = SMCLK = default DCO ~800k
;
;               MSP430F123(2)
;             -----------------
;         /||              XIN|-
;          | |                 |
;          --|RST          XOUT|-
;            |                 |
;            |             P1.0|-->LED
;
;   M. Buccini
;   Texas Instruments Inc.
;   Feb 2005
;   Built with IAR Embedded Workbench Version: 3.21A
;******************************************************************************
#include  <msp430x12x2.h>
;------------------------------------------------------------------------------
            ORG     0E000h                  ; Program Start
;------------------------------------------------------------------------------
RESET       mov.w   #300h,SP                ; Initialize stackpointer
StopWDT     mov.w   #WDTPW+WDTHOLD,&WDTCTL  ; Stop WDT
SetupP1     bis.b   #001h,&P1DIR            ; P1.0 output
                                            ;                            
Mainloop    xor.b   #001h,&P1OUT            ; Toggle P1.0
Wait        mov.w   #050000,R15             ; Delay to R15
L1          dec.w   R15                     ; Decrement R15
            jnz     L1                      ; Delay over?
            jmp     Mainloop                ; Again
                                            ;
;------------------------------------------------------------------------------
;           Interrupt Vectors
;------------------------------------------------------------------------------
            ORG     0FFFEh                  ; MSP430 RESET Vector
            DW      RESET                   ;这一行是什么意思?
            END

查了一下lnk430F1232.xcl文件,发现里面存在
INTVEC      FFE0-FFFF       Interrupt vectors
是不是这一行有问题?自己刚刚从51转过来,希望高手多多指教
此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
3条回答
ywb888
2019-03-25 02:30
如果取消我说的上面那个选项,错误就马上回来了

一周热门 更多>

相关问题

    相关文章