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.

EK-TM4C129EXL: TivaWare_C_Series-2.2.0.295 enet_tcpecho_server Example Different Operation in CCS to IAR

Part Number: EK-TM4C129EXL

Hi

As the title states I am seeing different results if I run the TivaWare_C_Series-2.2.0.295 enet_tcpecho_server example for the EK-TM4C129EXL in Code Composer Studio then when I run it in IAR Systems EWARM.

As the code comments state (since SW-EK-TM4C129EXL-UG-2.2.0.295 is particularly vague on usage)  I have created a TCP connection on telenet port 23 to the IP address provided using PuTTY, if i run this example in IAR EWARM I pretty quickly observe a FaultISR(), in CCS no such fault occurs and connection stays up and operates as expected.

This has not been the only strange/buggy behaviour that I have observed when running the examples in IAR EWARM, including but not limited to, verify error at address warnings when downloading and debugging and hitting the hardfault ISR straight out of the blocks. Please advise.

  • Hi Hairy,

      Sorry, I have no access to the IAR toolset. You said it works with CCS but not IAR. If that is the case, then perhaps there is something to do with the IAR settings. Since I don't have knowledge about the 3rd party IAR tool then what I can help will be limited. I have some suggestions here. 

      1. Can you increase the system stack size in your IAR compiler setting? I think it is very likely you don't have enough stack in your IAR setting. If you look at the CCS setting for this enet_tcpecho_server example, there is a 2kbytes of stack reserved. What did you reserve in IAR? Change your IAR to at least 2kbytes. Do you still have the problem?

      2. In IAR, play with the IAR compiler optimization levels. Will different compiler optimization levels make a difference?

      3. Refer to this app note on debugging processor faults https://www.ti.com/lit/pdf/spma043.

  • Thanks for the suggstions Charles, unfortunately they didn't help.

    It would seem that the IAR examples that are provided in TivaWare_C_Series-2.2.0.295 (which I believe was released 2020) were targetted at IAR Systems EWARM version 7.50.3 which is from 2016. Fortunately, I was able to obtain a legacy version so have been able to confirm that the enet_tcpecho_server example does work. 

    I also noted that CCS gives a warning about the examples being created in an older verion of the software. Now I appreciate that it is impossible to keep up with every release, but I dont think it unreasonable to expect that it is consistent with the release of the SDK and if its not then it should be clearly defined what version is used in either the documentaton i.e. SW-EK-TM4C129EXL-UG-2.2.0.295 or the code examples themselves.

    Regards,

    HL

  • Hello Charles

    I have been speaking with IAR on this matter and they are of the opinion that there is an error within the example project and the problem does not have to do with different EWARM version, it is just by luck the project
    works with some versions/ IDEs.

    char pcheaderMsg[45] in enet_tcpecho_server.c is a too short for the following string (52 characters [potentially more] + null termination):

    "Server received 2 bytes. Converting character case."

  • Hi Hairy,

      Thank you so much for the finding. I will take note of this. Although I don't know if there is a plan and timeframe for the next TivaWare release, this bug will certainly be addressed.