EmbeddedRelated.com
Forums

PROBLEM WITH LINKING

Started by omega_force2003 August 28, 2003
Hello,
 
I have just recently downloaded the IAR compiler assembler kickstart 
program from TI's website.  It appears there may be something wrong 
with the assembler component of the kickstart program.  
 
I can compile the following program but I cannot make, link, or even 
build this program which is the following:  
 
NAME  first
ORG   0FFFEh
DW    main
ORG   0200h
main:
      CLR.w  R4
      CLR.w  R5
loop:
      CLRC
      DADD.B  #1h, R4      
      CMP.w     #10h, R4      
      JNE     loop
      CLR.w     R4      
      CLRC        
      DADD.B  #1h, R5
      JNE     loop
done:
      JMP     done
      END     main
 
Instead I receive an error when I try to link which is:
 
Linking...
Error[e16]: Segment INTVEC (size: 0x20 align: 0x1) is too long for 
segment definition. At least 0x2 more bytes needed. The problem 
occurred while processing the segment placement command "-Z(CODE)
INTVECE0-FFFF", where at the moment of placement the available 
memory ranges were "ffe0-fffd"
 
Total number of errors: 1
Total number of warnings: 0
 
Do you know of any way to remedy this problem????
 
Sincerely,
 
Omega


Beginning Microcontrollers with the MSP430

Try declaring the orgs in order. Most assemblers don't like out of
order 
   orgs, these are effectively just a current progran counter 
adjustment. After ORG 0FFFEH there's really nowhere else to go.

 > ORG   0200h
 > main:
 >       CLR.w  R4
 >       CLR.w  R5
 > loop:
 >       CLRC
 >       DADD.B  #1h, R4
 >       CMP.w     #10h, R4
 >       JNE     loop
 >       CLR.w     R4
 >       CLRC
 >       DADD.B  #1h, R5
 >       JNE     loop
 > done:
 >       JMP     done

 > ORG   0FFFEh
 > DW    main

END

Al

omega_force2003 wrote:

> Hello,
>  
> I have just recently downloaded the IAR compiler assembler kickstart 
> program from TI's website.  It appears there may be something wrong 
> with the assembler component of the kickstart program.  
>  
> I can compile the following program but I cannot make, link, or even 
> build this program which is the following:  
>  
> NAME  first
> Instead I receive an error when I try to link which is:
>  
> Linking...
> Error[e16]: Segment INTVEC (size: 0x20 align: 0x1) is too long for 
> segment definition. At least 0x2 more bytes needed. The problem 
> occurred while processing the segment placement command "-Z(CODE)
> INTVECE0-FFFF", where at the moment of placement the available 
> memory ranges were "ffe0-fffd"
>  
> Total number of errors: 1
> Total number of warnings: 0
>  
> Do you know of any way to remedy this problem????
>  
> Sincerely,
>  
> Omega
> 
> 
> 
> .
> 
>  
> 
> ">http://docs.yahoo.com/info/terms/ 
> 
> 
> 


Look at the iar folder for examples of assembly code, there are 
several there.  You're not even doing basic things like shutting off 
the watchdog timer and setting the stack pointer.  Also pay 
attention to your org statements and follow the lead of the examples.

-fenny

--- In msp430@msp4..., "omega_force2003" 
<omega_force2003@y...> wrote:
> Hello,
>  
> I have just recently downloaded the IAR compiler assembler 
kickstart 
> program from TI's website.  It appears there
may be something 
wrong 
> with the assembler component of the kickstart
program.  
>  
> I can compile the following program but I cannot make, link, or 
even 
> build this program which is the following:  
>  
> NAME  first
> ORG   0FFFEh
> DW    main
> ORG   0200h
> main:
>       CLR.w  R4
>       CLR.w  R5
> loop:
>       CLRC
>       DADD.B  #1h, R4      
>       CMP.w     #10h, R4      
>       JNE     loop
>       CLR.w     R4      
>       CLRC        
>       DADD.B  #1h, R5
>       JNE     loop
> done:
>       JMP     done
>       END     main
>  
> Instead I receive an error when I try to link which is:
>  
> Linking...
> Error[e16]: Segment INTVEC (size: 0x20 align: 0x1) is too long for 
> segment definition. At least 0x2 more bytes needed. The problem 
> occurred while processing the segment placement command "-Z(CODE)
> INTVECE0-FFFF", where at the moment of placement the available 
> memory ranges were "ffe0-fffd"
>  
> Total number of errors: 1
> Total number of warnings: 0
>  
> Do you know of any way to remedy this problem????
>  
> Sincerely,
>  
> Omega