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.

**Error**: Serial Communication failed at port: COM5

Other Parts Discussed in Thread: TM4C123GH6PM, EK-TM4C123GXL, UNIFLASH

Hello,

I am doing Lab programs given by TI itself

When I debug the Lab 2 and Lab 3 its giving error:

CORTEX_M4_0: GEL Output:
Memory Map Initialization Complete
ComPort: Trouble Writing Memory Block at 0x0 on Page 0 of Length 0x8b8: **Error**: Serial Communication failed at port: COM5, baud rate:115200! To use serial monitor, please ensure the following prerequisites are satisfied: 1. Make sure the cable is plugged into both the target and the host on the right COM port. 2. Make sure a compatible target side serial monitor is loaded and running on the target device.
ComPort: File Loader: Verification failed: Target failed to write 0x00000000
ComPort: GEL: File: C:\Users\Shreyas\Documents\Lab2\Debug\Lab2.out: Load failed.

but even though the code is dumped into the board nd running successfully,

But when I debug the Lab 4 its giving same Error:

CORTEX_M4_0: GEL Output:
Memory Map Initialization Complete
ComPort: Trouble Writing Memory Block at 0x0 on Page 0 of Length 0x30a0: **Error**: Serial Communication failed at port: COM5, baud rate:115200! To use serial monitor, please ensure the following prerequisites are satisfied: 1. Make sure the cable is plugged into both the target and the host on the right COM port. 2. Make sure a compatible target side serial monitor is loaded and running on the target device.
ComPort: File Loader: Verification failed: Target failed to write 0x00000000
ComPort: GEL: File: C:\Users\Shreyas\Documents\Lab4\Debug\Lab4.out: Load failed.

But nothing is happening..  it seems like code is not dumped into the board

lab 2 and 3 is working but y not lab 4??

what is the solution to remove this error?? 

  • Hello Shreyas,

    I don't know which labs you are referring to since there is no such reference in TivaWare and such a generic label is not helpful in resolving your problem. If this is from some online training, can you post a link to it so I can review what the labs are doing and what tools the training has you using? If it is from some in person training, you will need to provide additional information such as the slides used for training for us to help.

    In addition, if it isn't explicitly noted in the training you will point me to, what tools are you using and what devices are you using? This will be necessary to help since I cannot assume you are using anything specific.
  • Hello Sir,
    I am using TM4C123GH6PM launchpad, and doing programming in CCS v6.1.2
    No one is training me, I am learning from online material provided in the site processors.wiki.ti.com/.../Getting_Started_with_the_TIVA™_C_Series_TM4C123G_LaunchPad

    I am doing as mentioned in workbook
  • Hello Shreyas,

    Thank you for the additional information. Can you check your device drivers to make sure the Stellaris ICDI drivers are properly installed andn working. To do this you will need to check your device manager to see if the Stellaris ICDI debug and com drivers are present. You should see the  highlighted entries in your device manager window as shown below:

    If you don't then you will need to install the ICDI drivers available for download at http://www.ti.com/tool/STELLARIS_ICDI_DRIVERS

    Let me know if this helps.

  • Yeah.. its connected correctly and drivers are installed properly..

    I am not getting whether  i have done mistake or any other problem..

  • Hello Shreyas,

    I am suspicious if you are actually seeing the programmed code executing on the board. If you take the description of the lab2 and 3 code about the LED flashing different colors, it is very similar to the out of box code that comes in the device. In the out of box code, however, the transitions between colors is very smooth and appears to nearly fade between colors. The lab LED flashes are very distinct changes from Red to Blue to Green flashes with no transitions. Can you verify that you are seeing a marked difference between the rgb code that comes with the board (C:\ti\TivaWare_C_Series-2.1.1.71\examples\boards\ek-tm4c123gxl\qs-rgb\ccs\Debug\qs-rgb.bin).

    Also, were able to successfully program the lab2 or lab3 using .bin files and LM Flashprogrammer?

    Finally, you can't program with LM Flash Programmer, the debug port of the device may be locked for some reason. can you run the unlock procedure using LM Flashprogrammer . To do this go to the "Other Utilities" tab in LM Flashprogrammer. Select the class device that includes the TM4C123 and click unlock. You might need to repeat this twice. Then try to program again.

  • Shreyas Belgave said:
    ComPort: Trouble Writing Memory Block at 0x0 on Page 0 of Length 0x8b8: **Error**: Serial Communication failed at port: COM5, baud rate:115200! To use serial monitor, please ensure the following prerequisites are satisfied: 1. Make sure the cable is plugged into both the target and the host on the right COM port. 2. Make sure a compatible target side serial monitor is loaded and running on the target device.

    The problem might be that a UART connection is selected in the target configuration file, rather than a JTAG debug interface.

    See https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/349451 for the same error on a different type of device.

    For the TM4C123GH6PM launchpad, to debug via the JTAG interface the Connection should be set to "Stellaris In-Circuit Debug Interface".

  • Yeah... now i am not getting any error after deleting the UART from alternate connection 

    Thank you Sir..

  • I am not able to find .bin file for my code.
    How can I generate .bin file??
  • Hello Shreyas,

    the generation of a .bin takes a few extra steps within CCS during the build process. The procedure for generating the .bin is described on page 60 of the workbook available on the wiki you are using for your self-training exercises. Here is a direct link to it: software-dl.ti.com/.../TM4C123G_LaunchPad_Workshop_Workbook.pdf

    It's worth noting that the only programming tool we have that requires the .bin file is LM Flashprogrammer. Other programming options such as CCS and Uniflash can program using the standard .out file created by CCS.

    Finally, since the original issue is now resolved, please click on the verify answer button for Chester's direction to resolve your issue. This will close the thread and also allow others to quickly identify the solution should they have a similar issue.