Quantcast
Channel: MSP 低功耗微控制器论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 3634

汇编程序, RSEG定义RAM变量段报错(IAR-V5.10,MSP430F1232)

$
0
0

汇编程序, RSEG定义RAM变量段报错(IAR-V5.10,MSP430F1232)

编译能通过,但连接报错!

程序:(附件有此程序的IAR工程)

#include "msp430f1232.h"                     ; #define controlled include file

        NAME    main                    ; module name

        PUBLIC  main                    ; make the main label vissible
                                        ; outside this module
        RSEG    UDATASEGMENT
TEMP_VOL    DS      2
TEMP_BKU    DS      2

        ORG     0FFFEh
        DC16    init                    ; set reset vector to 'init' label

        RSEG    CSTACK                  ; pre-declaration of segment
        RSEG    CODE                    ; place program in 'CODE' segment

init:   MOV     #SFE(CSTACK), SP        ; set up stack
       
        MOV     #0005H,TEMP_VOL
        MOV     #0005H,TEMP_BKU
       
main:   NOP                             ; main program
        MOV.W   #WDTPW+WDTHOLD,&WDTCTL  ; Stop watchdog timer
        JMP $                           ; jump to current location '$'
                                        ; (endless loop)
        END

报错:

Fatal Error[e72]: Segment UDATASEGMENT must be defined in a segment definition option (-Z, -b or -P)

Fatal! Execution terminated...

Error while running Linker


Viewing all articles
Browse latest Browse all 3634

Trending Articles