Champs,
Help, I'm dead in the water!!!
This has to be pilot error admittedly; but what am I not seeing? I blatantly plagarized this from the MSP430 example code page- tryoing to get an assembly project to work in CCS 5. The issue is real simple; there's the code (which you don't need to really care about what it does)
;******************************************************************************
; MSP430FR57xx Demo - Configure MCLK for 8MHz operation
;
; Description: Configure ACLK = SMCLK = MCLK = 8MHz
;
; MSP430FR57x
; ---------------
; /|\| |
; | | |
; --|RST |
; | |
; | |
; | P2.0 |---> ACLK = MCLk = 8MHz
;
; Tyler Witt
; Texas Instruments Inc.
; September 2011
; Built with Code Composer Studio V4.2
;******************************************************************************
.cdecls C,LIST, "msp430fr5739.h"
;------------------------------------------------------------------------------
.global main
.text ; Program reset
;------------------------------------------------------------------------------
main
_RESET mov.w #1DFEh,SP ; Initialize stack pointer
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT
mov.b #0xA5,&CSCTL0_H
bis.w #DCOFSEL0+DCOFSEL1,&CSCTL1 ; Set max DCO setting
mov.w #SELA_3+SELS_3+SELM_3,&CSCTL2 ; ACLK = MCLK = DCO
mov.w #DIVA_0+DIVS_0+DIVM_0,&CSCTL3 ; set all dividers
clr.b &P2OUT ; output ACLK
bis.b #BIT0,&P2DIR
bis.b #BIT0,&P2SEL1
bis.b #BIT0,&P2SEL0
Mainloop jmp Mainloop ; endless loop
nop ; for debug
;------------------------------------------------------------------------------
; Interrupt Vectors
;------------------------------------------------------------------------------
.sect ".reset" ; MSP430 RESET Vector
.short main ;
.end
and the error is, when it links:
<Linking>
"../lnk_msp430fr5739.cmd", line 192: error #10099-D: program will not fit into
available memory. placement with alignment fails for section ".reset" size
0x4 . Available memory ranges:
RESET size: 0x2 unused: 0x2 max hole: 0x2
error #10010: errors encountered during linking; "MSP430PixelFormatter2.out"
not built
WHAT!?!?!? I agree the MSP430 reset vector is in fact 16-bits; but the whole address space is only 16-bits; so there's no way that it's taking 4-bytes to specify the reset vector. I don't get it; .reset has 1 value, a .short (2 bytes); with the address of main in it; why does the linker think it's taking 4 bytes. You can obviously reproduce this with any MSP430 example as far as I can tell; I technically used the UCS example # 1 above but this isn't a code-related issue. I let CCS choose the default command file for linking; but it's right as near as I can tell; .reset SHOULD be 2 bytes long because its at the top of memory.