This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

No source available for "0x8805c" in the CCS debug mode

Other Parts Discussed in Thread: MSP430F5529

I try to use an MSP430F5529 Launchpad to do UART transmission.

However, I encountered the problem "No source available for "0x8805c"  when entering the CCS debug mode, which was depicted as follows : 

Please tell me what can I do to solve the problem, thanks a lot !

  • Hello,
    Please see: e2e.ti.com/.../490463

    Thanks
    ki
  • jocelyn hsieh said:
    However, I encountered the problem "No source available for "0x8805c"  when entering the CCS debug mode, which was depicted as follows

    The address 0x8805c isn't a valid address in a MSP430F5529 (see section 6.4 Memory Organization in the datasheet).

    This means the program has "crashed" in some way, and reads from "vacant" memory addresses return the word 0x3fff which is an instruction which causes an infinite loop.

    When you start a debugging session does the program successfully reach main?

  • Thank you for your reply.
    I set a breakpoint in the main section, but the program never ends on it.
    However, I ran the program successfully a few days ago, I still can't find the solution until now.
  • jocelyn hsieh said:
    However, I ran the program successfully a few days ago, I still can't find the solution until now.

    Do the compiler or linker report any warnings when building the program?

  • No, the compiler and the linker worked well and no warning message is presented.
    But sometimes in the debug mode, the warning shows that .out file cannot be opened,
    I should do "clean all" and to build the project again so the program can into debug mode successfully.
  • These two files are my code, thank you for your help.

    #include "msp430f5529.h"
    #include <stdint.h>                                                // Hardware-related definitions
    #include "Uart_Driver.h"
    #include <string.h>
    #include <stdlib.h>
    #include <math.h>
    #include <msp430.h>
    
    /// PIN 3.3 UART TX
    /// PIN 3.4 UART RX
    
    uint8_t rxBuffer[1];
    uint8_t txPkt[1] = {0x0f};
    uint8_t rxData[1];
    
    int rx_cnt=0;
    int GPIO_cnt =0;
    int pktLength = 1;  // how many bit legnth
    int counter =0;
    
    static receive_event_handler _RxEventHandle;
    
    void data_receive_handle2(uint8_t *data,uint8_t len) {
    	rxBuffer[0] = *data;
    	if(GPIO_cnt<pktLength)
    	{
    		//TODO: deal with the data
    		GPIO_cnt++;
    	}
    
    	else if(GPIO_cnt>=pktLength)
    	{
    		GPIO_cnt=0;
    		//UCA0IE &= ~UCRXIE; //Disable USCI_A0 RX interrupt
    	}
    }
    
    void data_interface_init(receive_event_handler OnRxEventHandle) {
    	_RxEventHandle = OnRxEventHandle;
        P3SEL |= BIT3+BIT4;	//P3.3 3.4
    
        P3OUT &= ~BIT3;	//pull down
        P3DIR &= ~BIT3;
    
        //P4SEL |= BIT4+BIT5; // P4.4,4.5option select								   //6/17 p3.4 p3.3
        UCA0CTL1 |= UCSWRST;                      // **Put state machine in reset**    //6/17 UCA1->UCA0
        UCA0CTL0 &= ~UC7BIT ; // 8 bits, no parity, 1 stop bit						   //6/17 UCA1->UCA0
        UCA0CTL0 = UCMODE_0;  // UART												   //6/17 UCA1->UCA0
        UCA0CTL1 |= UCSSEL_2; // SMCLK							                       //6/17 UCA1->UCA0
    
        UCA0BR0  = 0x64;	//25MHz clk, BR = 1.2k
    	UCA0BR1  = 0x51;	//25MHz clk, BR = 1.2k
    	UCA0MCTL = 0x92;	//25MHz clk, BR = 1.2k
    
        UCA0MCTL |= UCBRS_1 + UCBRF_0; // added from website, Modulation UCBRSx=1, UCBRFx=0
        UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**					   //6/17 UCA1->UCA0
    	UCA0IE |= UCRXIE; // Enable USCI_A0 RX interrupt							   //6/17 UCA1->UCA0
    
    }
    
    void system_init(void) {
    
      WDTCTL = WDTPW + WDTHOLD; // Stop Watchdog Timer
    
      TBCCTL0 = CCIE; // TBCCR0 interrupt enabled
      TBCCR0 = 10550;  //Capture/Compare register value,for MSP430 B
      TBCTL = TBSSEL_2 + MC_1 + TBCLR; // SMCLK, upmode, clear TBR:TB0 interrupt freq = 25M/10000 = 2.5k
    
      UCSCTL3 = SELREF_2;                       // Set DCO FLL reference = REFO, div by 1
      UCSCTL4 |= SELA_2;               			// Set ACLK = REFO, SMCLK = DCOCLKDIV(default SELS_4)
    
      P2SEL |= BIT2;							//set p2.2 as peripheral SMCLK
      P2DIR |= BIT2;							//set p2.2 as peripheral SMCLK
    
      __bis_SR_register(SCG0);                  // Disable the FLL control loop
      UCSCTL0 = 0x0000;                         // Set lowest possible DCOx, MODx
      UCSCTL1 = DCORSEL_7;                      // Select DCO range 50MHz operation
      UCSCTL2 = FLLD_0 + 762;                   // Set DCO Multiplier for 25MHz
                                                // FLLD_0 + FLLN, (N + 1) * FLLRef = Fdco, N is 10-bit length and hence range = 0~1023
                                                // (762 + 1) * 32768 = 25MHz
                                                // Set FLL Div = fDCOCLK/2
    
      __bic_SR_register(SCG0);                  // Enable the FLL control loop
    
      // Worst-case settling time for the DCO when the DCO range bits have been
      // changed is n x 32 x 32 x f_MCLK / f_FLL_reference. See UCS chapter in 5xx
      // UG for optimization.
      // 32 x 32 x 25 MHz / 32,768 Hz ~ 780k MCLK cycles for DCO to settle
      __delay_cycles(782000);
    
      // Loop until XT1,XT2 & DCO stabilizes - In this case only DCO has to stabilize
      do
      {
        UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + DCOFFG);  // Clear XT2,XT1,DCO fault flags
        SFRIFG1 &= ~OFIFG;                           // Clear fault flags
      }while (SFRIFG1&OFIFG);                        // Test oscillator fault flag
    }
    
    
    
    /** brief Transmit data to UART **/
    void data_transmit(uint8_t *s, uint8_t len) {
    	while (len--) {
           while (!(UCA0IFG&UCTXIFG));
    	    UCA0TXBUF = *s++;
    	}
    }
    
    #pragma vector=USCI_A0_VECTOR
    __interrupt void USCI_A0_ISR(void){
      volatile unsigned int i;
    	P4OUT ^= BIT7;	//toggle
    	cnt_rx = cnt_rx+1;
      switch(__even_in_range(UCA0IV,4)){
        case 0: break;                          // Vector 0 - no interrupt
        case 2:                                 // Vector 2 - RXIFG
        	if (_RxEventHandle != NULL) {
        		_RxEventHandle((uint8_t *) &UCA0RXBUF, 1);
        	}
          break;
        case 4:                  // Vector 4 - TXIFG
         break;
        default: {
        	break;
        }
      }
    }
    
    
    //=================main===========================
     int main(void) {
    	P1SEL &= (~BIT4);             // Set P1.4    SEL as  GPIO
    	P1DIR |=  BIT4;               // P1.4 output the rest
    	P1OUT &= ~BIT4;
    
    	__enable_interrupt();//enable interrupts
    	system_init();
    	data_interface_init(data_receive_handle2);
    
    	while(1){
    		if(counter == 2500){
    			data_transmit( txPkt, 1) ;
    		}
    	}
    }
    
    
    #pragma vector=TIMER0_B0_VECTOR
    __interrupt void Timer_B (void)	//TB0 interrupt freq = 25M/10000 = 2.5k
    {
    	counter ++;
    	if(counter >= 2500){
    		P1OUT ^= BIT4;             // DEBUG
    		counter = 0;
    	}
    }
    Uart_Driver.h

  • jocelyn hsieh said:
    These two files are my code

    I created a new project in CCS 6.1.3 and added these two source files to it. I was able to build and load the code and it automatically halted at main when loaded to the MSP430F5529 Launchpad. 

    Which version of CCS and compiler tools are you using? Can you try creating a new project and then adding these files to it, and see if that helps?

  • My CCS version is 6.1.2.

    So the code will halt at the main and cannot get into the while ?

    while(1){

    if(counter == 2500){
    data_transmit( txPkt, 1) ;

    }

    }

    Besides, I have tried to create a new project and put these two files in it,

    but it still showed "No source available for "0x8805c" in the debug mode.

    Thank you for your help :)

  • jocelyn hsieh said:
    but it still showed "No source available for "0x8805c" in the debug mode.

    I don't know why your code is going to address 0x8805c. I am attaching the .out file generated from my build (which I am able to load and halt at main). Perhaps you could try loading it directly. You would need to start a manual debug session (please see this wiki page on how to do that), then connect to the target and load the program. 

    One change I made to the code was to comment out line 89 of main.c to avoid the really long delay, but this should not impact the loading of code and getting to main as this routine is called after main.

    test_msp430f5529.zip

  • Thank you for your reply,

    I tried "clean all" several times and then re-compile,

    the memory problem was solved, thank you all :)