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.

CCS/CC430F5137: Debug Script Server, How to get value of function parameter (Javascript)?

Part Number: CC430F5137


Tool/software: Code Composer Studio

Hi,

So I would like to debug this function and it is called from several places with different buffers.

How do I access the contents of the buffer pointer (& length) from Javascript? Function "transmit" is at 0000ad54  but the parameters (of course) don't show in the map file.

Or do I have to focus on the RF1ADINB register to get data being transmitted?

void transmit(char *buffer, char length)
{
    __no_operation();
    send_radio_strobe(RF_SCAL);   // Calibrate frequency synthesizer and turn it off.

    RF1AIES |= BIT9;              // High-to-low transition sets interrupt flag
    RF1AIFG &= ~BIT9;             // Clear pending interrupts
    RF1AIE  |= BIT9;              // Enable TX end-of-packet interrupt

    radio_write_multi_bytes_to_register(RF_TXFIFOWR, buffer, length);   // Write TX data to radio

    __no_operation();

    send_radio_strobe(RF_STX);    // send_radio_strobe STX
}

  • Hello,

    Jerker Dahlblom said:
    How do I access the contents of the buffer pointer (& length) from Javascript? Function "transmit" is at 0000ad54  but the parameters (of course) don't show in the map file.

    One option is to set a breakpoint at the beginning of the transmit function and run to it. Once at that location, you can use symbol.getAddress() to get the address of length (for example) and then use memory.readWord() to get the value. 

    Note that for this to work, the variable must be stored in memory (and not a register - which is commonly done for optimized application). 

    Hope this helps

    ki

  • Thanks, problem solved!