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/CCSTUDIO: CCS crashing when Ethernet cable is connected

Part Number: CCSTUDIO
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: Code Composer Studio

Dear all,

i have a simple Simulink code in which i have a UDP receive block for my concerto microcontroller. I have set through the settings, the IP for my microcontroller and i have placed its mask.

When i compile my code through Simulink it loads and runs perfect. More than that, i  am able to successfully ping the microcontroller's IP through the command window.

When i load though the out file at CCS, at the moment i press run, CCS shuts down without giving any information on why is this happening. If the Ethernet cable is disconnected, and i press run it will run properly but when i will then connect the ethernet cable again it will imidiatell closed.

Can anyone help me with this?

ps: On the other side of the ethernet cable i have at the moment a switch on which my computer is also connected.

Thanks in advance.

Kind regards,

Alex

  • Hi Alex,

    Alexandros Paspatis said:
    When i load though the out file at CCS, at the moment i press run, CCS shuts down without giving any information on why is this happening. If the Ethernet cable is disconnected, and i press run it will run properly but when i will then connect the ethernet cable again it will imidiatell closed.

    That is odd. If CCS is indeed crashing during debug, then a crash dump file should get generated. Can you attach it to this thread?

    http://processors.wiki.ti.com/index.php/Troubleshooting_CCSv7#CCS_Diagnostic_Logs

    Thanks

    ki

  • Hi Ki,

    is this what you need?

    Kind regards,

    Alex

    7043.dmp.ziphttps://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/81/ErrorReportToolver2.ini

  • The contents in the zip is what I was looking for. Thank you. I will send these for analysis and let you know the results when I get them.

    Thanks
    ki
  • btw - which exact version of CCS are you using and which exact device (you mentioned Concerto so I assume some F28M3x....?)
  • Hi Ki,

    CCS is 6.2 and my microcontroller F28M35H52C1.

    Thanks for this.

    Kind regards,

    Alex

  • Thanks.

    You CCS version is a bit old. Any chance you can upgrade to the current version (CCSv8)?
  • Hi Ki,

    i use this version because i use Matlab 2016b - to avoid any problems. Do you think i can use later versions of CCS with 2016b? I refer mostly to the hardware support package for C2000 microcontrollers.

    Thanks in advance.

    Kind regards,
    Alex
  • Understood. You would need Matlab 2017b for official support for CCSv7 so you would likely need to stick to CCSv6.2

    I will keep you updated on our progress

    Thanks
    ki
  • Hi Alex,

    We think what is happening is: the target program is making a semihosting file open call with an invalid file mode. The debugger is reading the file mode from the target and trying to use it without protecting against it being invalid. This leads to the crash.

    If our analysis is correct, you should be able to set a breakpoint at the file open calls in your target program and have a look at the mode to determine if it is valid. If this works out, hopefully you will be able to make changes to your target program to avoid the problem.

    We will protect the debugger against this problem in an upcoming CCS release. Bug filed as CCBT-2243.

  • Hi Andy,

    thanks for your reply.

    Unfortunately i don't use  any code files. I deploy to hardware my simulink model and i load and run it on my microcontroller through CCS.

    Cant i avoid this issue by using this methodology?

    Kind regards,

    Alex

  • Hi Alex,
    Can you provide the generated source files and executable *.out file? You can zip it all up and attach it to this thread. If you wish to send it privately, please start a private conversation with me.

    Also, you mentioned you are using a Concerto F28M35x. Are you using this controlcard kit?
    www.ti.com/.../TMDSCNCDH52C1

    Thanks
    ki
  • Dear Ki,

    i have just sent you a private message.

    Kind regards,
    Alex
  • Thanks. I got it. And I'm able to reproduce the issue on the latest CCS version. We are investigating.

    ki
  • Alex - A fix for CCBT-2243 will be available in the next CCS release (CCS v8.1.0). Note that this fix will guard against the CCS crash. However, it will not address your root issue that AndyW described in his post:

    the target program is making a semihosting file open call with an invalid file mode.


    You will still need to identify when this call is being made in the code and fix it so that it is called with the correct parameters. We took a look at the files in the zip you provided and we could not see where this call was being made. But it looks like the application was created with more source files than just the few generated by simulink (likely from controlSUITE and code from other libraries, etc). Unfortunately we will not be able to provide much more help in regards to this. You will need to try to debug this in your environment and see where the changes need to be made to make sure the correct parameters are passed to the semihosting call.

    Also note that the fix against the crash will be in CCS 8.1.0. I know that you must use CCSv6.2.0 due to compatibility with the version of Matlab that you are using. However, you can have both CCS 6.2.0 and CCS 8.1.0 on your PC and load the generated *.out file on CCS 8.1.0 for debug purposes (like how we did to analyze the crashing bug).

    Thanks

    ki

  • Dear Ki,

    could you please explain me how could i debug my code and find the error since i am using just the out file from simulink?

    No other applications or libraries are used.

    Thanks in advance.

    Kind regards,

    Alex

  • I have very limited experience with simulink so it is hard to provide any more insight. It is clear that the application has some host i/o calls (fopen, etc). How is that set up in simulink? Did you manually configure that?

    Thanks
    ki