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.
Hello,
Can someone please tell me where to find instructions for using the memory browser?
I am using CCS V5.4 for TMS320C5000 DSPs.
I have an active project that is compiled and I can view the memory browser but it does not show any information.
Is there a users manual that explains its use?
Sorry to post a newbee question here but I have searched the CCS help file and the forum to no avail thus far.
Thank You,
Forrest
Hello Forrest,
The Memory view is documented in the Help that comes with CCS
Help -> Help Contents -> Code Composer Studio Help -> Views and Editors -> Memory View
Forrest Deitz said:I have an active project that is compiled and I can view the memory browser but it does not show any information.
Without any more information, it is difficult to provide any suggestions. Did you actually start a debug session? Posting a screenshot of CCS would help.
Thanks
ki
Hi Ki,
Thanks for the response and the list of options for the memory browser.
I'm not sure I need a screen shot at this point. I just have simple questions about the use of the memory browser.
Q1) Does the memory browser only work in debug mode?
Q2) Is there a tutorial on its use somewhere?
Thank You,
Forrest
Forrest Deitz said:Q1) Does the memory browser only work in debug mode?
Yes. You must be in a debug session to be able to browse target memory
Forrest Deitz said:Q2) Is there a tutorial on its use somewhere?
Yes, in the CCS Help I mentioned. There is a subtopic called "Working with the Memory View"
I have a similar question. It seems that the instructions for using Variables View and Expressions View are clear enough. I am running a dead-simple program just to get to know CCS(6.0) better. Here it is:
#include <driverlib.h> //----------------------------------------- // MSP430 MCLK frequency settings // Used to set MCLK frequency // Ratio = MCLK/FLLREF = 8192KHz/32KHz //----------------------------------------- #define UCS_MCLK_DESIRED_FREQUENCY_IN_KHZ 8192 #define UCS_MCLK_FLLREF_RATIO 250 #define GPIO_ALL GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN3| \ GPIO_PIN4|GPIO_PIN5|GPIO_PIN6|GPIO_PIN7 //----------------------------------------- // Prototypes //----------------------------------------- void hardware_init(void); void ledToggle(void); void delay(void); //----------------------------------------- // Globals //----------------------------------------- volatile int16_t i16ToggleCount; void main(void) { hardware_init(); // init hardware via Xware while(1) // forever loop { ledToggle(); // toggle LED delay(); // create a delay of ~1/2sec ++i16ToggleCount; // keep track of #toggles } } void hardware_init(void) //called by main { P1DIR |= BIT0; // P1.0 set as output } //--------------------------------------------------------------------------- // ledToggle() // // Toggle LED via GPIO pin // Add "+ GPIO_PIN1 to GPIO_setOutput call to add blue X LED //--------------------------------------------------------------------------- void ledToggle(void) { P1OUT ^= BIT0; // XOR P1.0 } void delay(void) { __delay_cycles(4096000); // ~1/2 second delay }
I run this in debugger mode on my MSP430F5529 LaunchPad and the LED does blink. I am watching i16ToggleCount as an expression. The value does not change, even though the code works. Also, I am only able to add this variable in the Expressions column, not in the Variables column. It seems as though this variable should be added to the Variables column automatically when I add a H/W BP, which I did. Please advise.
Hello Otto,
Otto Hunt said:I run this in debugger mode on my MSP430F5529 LaunchPad and the LED does blink. I am watching i16ToggleCount as an expression. The value does not change, even though the code works.
Note that when the target is running, the debugger can access target memory non-intrusively if the device supports real-time memory accesses. MSP430 devices do not have such a feature. Hence the target must be halted for the debugger to be able to access target memory. So variables in the Variables/Expressions view will be updated when the target is halted.
If you would like to record changes in the variable non-intrusively, you can try using the EEM trace feature on your device to capture the last eight values of the variable. You can learn more of the trace capability of EEM with this training module:
http://processors.wiki.ti.com/index.php/CCS_Modules_Library#Enhanced_Emulation_Module_.28EEM.29
Otto Hunt said:Also, I am only able to add this variable in the Expressions column, not in the Variables column. It seems as though this variable should be added to the Variables column automatically when I add a H/W BP, which I did. Please advise
Variables view will automatically show just local variables only. The Expressions view will allow you to all all types of variables and expressions.
Thanks
ki
Thanks, Ki-Soo, for your quick Saturday response (wow!). I did notice that, while the program is running, the variable cannot be read - CCS says so. What I still expect, though, is that Expressions View would display a value other than zero when the program is paused. In fact, Expressions View displays whatever value was given to i16ToggleCount when it was declared, above main. So it remains a mystery to me why this value does not change despite multiple LED blinks. I also viewed this variable by observing the address where it is stored - same result.
Your second answer is helpful. Thanks.
With your example program I observed the same behavior in that the i16ToggleCount variable was always displayed as zero.Otto Hunt said:What I still expect, though, is that Expressions View would display a value other than zero when the program is paused. In fact, Expressions View displays whatever value was given to i16ToggleCount when it was declared, above main. So it remains a mystery to me why this value does not change despite multiple LED blinks.
While investigating realized the debugger was operating correctly, and that the problem is that the MSP430F5529 watchdog was resetting the processor before the program reached the point at which point i16ToggleCount was incremented since:
- A breakpoint on the line which incremented i16ToggleCount was never hit.
- A breakpoint on the start of main was hit after the program was resumed - which was a sign that a watchdog reset was occuring.
Adding a call to disable the watchdog then allowed the i16ToggleCount variable to be incremented (and also reduced the LED flash interval since the delay function was now running to completion):
void main(void) { WDT_A_hold(WDT_A_BASE); hardware_init(); // init hardware via Xware while(1) // forever loop { ledToggle(); // toggle LED delay(); // create a delay of ~1/2sec ++i16ToggleCount; // keep track of #toggles } }