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.

RTOS: Losing debugging connection while running a program

Other Parts Discussed in Thread: EK-TM4C1294XL, SYSBIOS

Tool/software: TI-RTOS

I am having a problem while running HTTP Client program in debug mode on "EK-TM4C1294XL" using IAR Compiler. 

I am uploading data on ubidots.com using TLS1.2. My program runs fine initially then I lose debugging connection with the Kit. I cannot stop the debugging at all. I have to close the compiler and remove the USB data cable and insert it again to get the kit in working condition. 

Can anyone suggest me some solution for this problem? 

2. I tried to compile the same program in the release mode. But it gives following error, and I do not know how to fix it. 

Error[Li005]: no definition for "__write" [referenced from L:\Projects\.....\Src\configPkg\package\cfg\xxxxx_prm4f.orm4f]

It would be great if some solution could be provided for this issue as well. 

  • Which version of TI-RTOS are you using?

    Can you get a Wireshark capture of this?

    When you lose the debugging connection, are you still able to ping the TM4C board?

    Steve
  • I think the problem is in dynamic memory allocation.

    I am uploading the data on a cloud. For this, I used a task which created the TLS and HTTPCli obejects every time task is run then destroy it at the completion of the task.

    Then Instead of creating the Tls, HTTPCli objects each time , I instead created them once, and just used the "HTTPCli_sendRequest" and "HTTPCli_sendField" functions to upload the data. This has fixed the issue and I am not getting it any more.
  • Ok, sounds like you've gotten past the problem.

    Can you post the code in your Task thread you had (originally) for creating and cleaning up the TLS and HTTPCli objects? I'd like to see why there would be a memory leak.

    Also, can you check to see if the kernel is configured to auto delete Task threads that have terminated?

    You can test this by adding the following code into your *.cfg file in your project (just insert this code at the end of that file):

    var Task = xdc.useModule('ti.sysbios.knl.Task');
    print("----- Task auto delete = " + Task.deleteTerminatedTasks);

    Steve