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.
Tool/software: Code Composer Studio
hi,
we are trying use semi-hosting with CC1312 and sometimes we are getting this error message in the console in red:"Invalid CIO command (216) in the CIO buffer at address (0x20009FE0) was not recognized. Please check the device and program memory maps." The execution of the program is halted waiting for run command to continue. Either the code is running as expected or (sometimes) we are getting much more serious errors which states the Core cannot be halted or run like this: "Cortex_M4_0: Can't Run Target CPU: (Error -2134 @ 0x0) Unable to control device execution state. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 8.2.0.00004) ". This hinders us to make a reliable debug in our system.
I read other threads in e2e to find a solution, but still the error continues. As I understand, during semi-hosting, the debugger places sw breakpoints where printf is used to print the buffer to console. Since we are using heavily printf function to get log messages from our application, sometimes the buffer overflows which results these errors. I realize that when the errors occur, the first couples of bytes in _CIOBUF_ are 0.
This is the functions that are called when the errors occurs and the debugger halts:
My question is how to solve the problem (other than reducing the logs inside printf)
I see that the size of _CIOBUF_ is defined as CIOBUFSIZ in trgmsg.c and the CIOBUFSIZ is defined as ((BUFSIZ)+32) in trgcio.h. Is it possible to increase this BUFSIZ in stdio.h (right now, it is defined as #define BUFSIZ 256 in stdio.h) ? What other options do we have to solve the problem? (I also tried to increase TCLK to 14 MHz and JTAG debugger wont work)
our setup is like this:
Host OS: Linux Ubuntu 18.04
Code Composer Studio : 9.1.0.00010 (tested also with CCS 9.2.0.00013, the same result)
Best Regards
Hello,
Would it be possible to share your application? If not, could you create a stripped down reproducible test case? If you do not wish to share it publicly, please start a private conversation with me.
Thanks
ki
Hi,
I can share the project with you. Can you please help me to share it in private?
Best Regards
Please start a private conversation with me. If you are not sure how to do this, please see the last FAQ at the bottom of: https://e2e.ti.com/support/tools/ccs/f/81/t/3131
Thanks
ki
Hi Ki,
I have sent the project to you in private. Please let me know, if you could not get it.
Best Regards
This issue is being investigated off-line. I will add relevant updates to this thread when I have any to share.
Thanks
ki
Just to provide an update to people following this thread - I have received a test case and now looking to acquire a target to run the test case on.
Sorry for the delay.
ki
Dear Ki,
while waiting the target board, we can make further analysis with your guidance. Please let me know what kind of further analysis we can make.
Best Regards
Hello,
Did you see my last message in our private conversation regarding the heap size?
Thanks
ki
Sorry Ki,
I was unable to answer. We have noticed that the heap in not sufficient and increased it 2 weeks ago. There is no change in the problem tough. If you want you can connect to my computer and I can create the problem for you.
Best Regards
GOHM ELECTRONICS said:If you want you can connect to my computer and I can create the problem for you.
It may have to come to that. But before we do that, can you send me your application that you built with the increased heap (via private message)? What did you increase it to? 0x400 should be plenty
Thanks. I got it.
I see there are two executables - "GasSensor_v21.out" and "GasSensorTest.out". The first one does not run successfully. The second one does. I get CIO to the console for the second one:
Is "GasSensorTest.out" the one where you increased the heap size? DO you not get any such output?
Thanks
ki