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.
Part Number: CC2640R2F
Tool/software: Code Composer Studio
This solution works for CC26x0 and CC26x2 devices (it includes CC2640R2, CC2642R, CC2652R, CC2652P, CC1312R, CC1352R, CC1352P).
I have tested it using CCS 9.3.
The possibility to connect the debugger to a running target can help you if you want to see the status of your target after several days, or if you cannot reproduce a crash with the debugger attached. Let's dive in it!
1- Modify the GEL file
In a very simplistic view, the GEL files describe the way the device’s debugger has to act (more details can be found in the CCS’s help). By default, the GEL files ask the device to reset when the debugger is started up. Hopefully we can modify this:
a- Identify the GEL files used
>> Another possibility consists in looking in the <CCS directory>\ccs_base\emulation\gel for the GEL files.
b- In the StartUp() function, comment out the code executing the reset. If needed, an explicit comment will help you to identify the code to comment out.
Here the content of the StartUp() function after modification:
StartUp(int major, int minor, int patch)
/* Initialize memory map */
/* Debugger specific handling */
if(GEL_MatchesConnection(".*TIXDS.*") == 1)
// Issue Board Reset to ensure device is in a known state
// Note: If you want to attach to a running target without resetting the
// device, you must comment out the following 4 lines:
// GEL_AdvancedReset("Board Reset");
else if(GEL_MatchesConnection(".*JLink.*") == 1)
GEL_TextOut("Error: Unknown debugger.\n");
c- Save you modification and close the file. Stop your debugging session.
2- Modify the Debug Configuration of your project
Once you have clicked CCS’s debug button (the green bug), CCS is doing a lot of different actions for you. For example CCS loads the program and stops the execution of the code on the target. In our case, we don’t want CCS to load the program (as we already have a running program…). In the same idea, we don’t necessarily want to stop the execution of the code on the target. Hopefully, the way CCS is running a debug session is highly configurable. So let’s adapt those configurations to our needs.
a- On the right of the Debug button, there is an arrow. Click this arrow and select “Debug Configurations...”.
b- Select your project.
c- Prevent CCS to load the program: in the “Program” tab, chose the proper “Loading option”
d- Prevent CCS to stop the target: in the “Target” tab, deselect the option “Hal the target on a connect”
3- [Optional] Prevent CCS to build the program before load.
As no program will be loaded, it is a bit useless to ask CCS to build an image when you start a debug session. As result, you can disable this option by using the small arrow at the right of the Flash button. Click on “Build Project Before Load” in order to disable the option
You are all set now! Let the code running and when needed connect the running target using the Debug button as you usually do.
Q: How can I load a new image on the device now?
A: The easiest way is to use the Flash button and select the image to flash. Don’t forget to rebuild your image manually (as we have disabled the option before). Another solution consists in undoing all the configuration changes we did before. A third solution consists in using a different version of CCS.
Q: Does these configurations affect all my devices?
A: It depends on the modifications
I am out of the office and plan to be back on the 29 July.If your question is not answered in the next few days, I will kindly ask you to open a new thread using the “Ask a related question” button. Have a nice summer!
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.