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/TMS570LS3137: How to execute the Bootloader by using the RS232 Interface for the TMS570LS31x HDK

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Hi,

I'm using Code Composer Studio(CCS) 9.3.0.00012, And I want to execute Bootloader for TMS570LS3137 HDK board by using RS232 Interface.
I want to use RS232 transceiver (RS232 to TTL converter) connect the pin N2(NHET1[13]_SCI_TX) and W3(NHET1[06]_SCI_RX) of TMS570LS3137 HDK.
Forgive me. I actually had a similar question before, but after many attempts, I still can't find a solution to the problem.
My previous questions in the TI forum are shown in the URL: e2e.ti.com/.../869521
(E2E support forums: Flash API library of UART Bootloader for TMS570LS3137)

I used the Bootloader file provided by Mr. QJ Wang in the previous TI forum.(TMS570LS3137HDK_UART_Bootloader.7z)
I have been able to successfully compile the project and loaded through the JTAG port.
I can successfully use the USB Cable to test the operation of the UART Bootloader.
But after I tested the UART Bootloader by using the default USB cable, I found that I couldn't modify it to RS232 interface.
I have followed the instructions to change "scilinREG" in bl_config.h to "sciREG",
But after the modification, It cannot display anything in the Terminal window through the RS232 interface.

And I also tried to change all "scilinREG" in sci.c to "sciREG", but it still couldn't connect to HDK by using RS232 interface.
So, is there any way to change the default setting USB cable to RS232 interface?
Is there an wrong in that part of my operation? Or "pinmux" in the TI forum means "TI PinMux Tool". If so, how do I use TI PinMux Tool?


Thanks for your help!

Best Regards, Chen Yan-Li

  • Hello Yan-Li,

    1. The device has two SCI modules. One is standalone SCI module, other is SCI/LIN module which can be used as SCI or LIN. In HALCOGen generated code, sciREG is for SCI standalone module, and scilinREG is for SCI/LIN module.

        SCI standalone module uses N2/W3 pins. N2/W3 are used as NHET by default, so pinmux configuration is required by CHECK "SCI" in "Pin Muxing" panel:

        SCI/LIN module uses A7/B7. 

    2. Don't change sciREG and scilinREG in sci.c which is generated through HALCoGen. Please change "scilinREG" in bl_config.h to "sciREG"

    3. Configure the bandrate and stop bit in SCI panel:

    4. Make sure your HW connections are correct.

  • Hello QJ Wang,

    I tested the SCI/LIN module you described,
    The computer terminal can connect pins B7(LIN_TX) and A7(LIN_RX) via RS232 transceiver without modifying the Project.
    But my final result needs to use N2(NHET1[13]_SCI_TX) and W3(NHET1[06]_SCI_RX) pins.
    So, I use HALCoGen you suggested to modify the pin settings.

    However, I encountered a problem when using the code generated by HALCoGen.
    Error occurs after CCS uses the driver generated by HALCoGen.
    The Code Generated by HALCoGen will cause CCS show error after compiler.

    I'm using HALCoGen 04.07.01, Then here are my steps:
    1. Open HALCoGen 04.07.01
    2. Open the HALCoGen file: File -> Open -> Project... and select the "TMS570LS3137HDK_UART_Bootloader.hcg" file in project
    3. Enable peripherals: Select PINMUX, And CHECK the "SCI" option in "Enable/Disable Peripherals"
    4. Set the SCI's bandrate and stop bit: Select "SCI Data Format", And modify Baudrate to 115200, Stop Bit to 1
    5. Generate driver code: File -> Generate Code (F5)

    After completing the above steps, I returned to CCS, and Build the Project "TMS570LS3137HDK_UART_Bootloader".
    Then the following compilation results appear:(Compilation failure)

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "TMS570LS3137HDK_UART_Bootloader.out" not built

    #10010 errors encountered during linking; "TMS570LS3137HDK_UART_Bootloader.out" not built
    #10234-D: unresolved symbols remain
    gmake: *** [all] Error 2
    gmake[1]: *** [TMS570LS3137HDK_UART_Bootloader.out] Error 1
    unresolved symbol apiLoadSize, first referenced in ./bl_main.obj
    unresolved symbol apiLoadStart, first referenced in ./bl_main.obj
    unresolved symbol apiRunStart, first referenced in ./bl_main.obj
    unresolved symbol constLoadSize, first referenced in ./bl_main.obj
    unresolved symbol constLoadStart, first referenced in ./bl_main.obj
    unresolved symbol constRunStart, first referenced in ./bl_main.obj


    And I found that even if I use HALCoGen to open the file without making any changes,
    the same situation will occur after execution "Generate Code (F5)".
    This does not happen when I use HALCoGen in other CSS projects.
    Is this a problem with the HALCoGen version?
    But I see in the description of the sci.c file that the version of HALCoGen is 04.07.01.

    Also, I found that I can create a new HALCoGen project(File -> Open -> Project...) to overwrite file without errors.
    1.Copy the sci.c file in the source folder of the newly created HALCoGen project
    2.Copy sci.h and reg_sci.h files in the include folder of the newly created HALCoGen project
    3.Overwrite the above three files to the files in the "TMS570LS3137HDK_UART_Bootloader" project
    In this way, the project will not have an error in CCS, but it will not achieve the function I want.(RS232 communication failed)
    Obviously N2(NHET1[13]_SCI_TX) and W3(NHET1[06]_SCI_RX) pins are not enabled properly.

    Is there any problem with the above operation procedure?
    Please help me find out what the problem is, thank you!

    Thanks for your help!

    Best Regards, Chen Yan-Li

  • Hello Yan-Li,

    When you click "generate code", all the files in \source and \include will be overwritten. Only the contents between 

    /* USER CODE BEGIN (xx) */

    ... ...

    /* USER CODE END */

    in the files (*.c, *.h, *.cmd, etc) are preserved. If you want to add code to the files generated by HALCoGen, please add them to the USER CODE section. 

    apiLoadSize, apiRunStart, apiLoadStart, ect are defined in sys_linker.cmd. 

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/312/2043.sys_5F00_link.cmd

  • Hello QJ Wang,

    Thank you! The compiler errors can be solved by modifying the settings of the sys_link.cmd file.
    I successfully execute Bootloader for TMS570LS3137 HDK by using RS232 transceiver.
    Your suggestions are very clear and reliable, and I really appreciate your help!


    Thanks again for your help!

    Best Regards, Chen Yan-Li