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/TMDX570LC43HDK: Can't build lwIP demo on CCS

Part Number: TMDX570LC43HDK
Other Parts Discussed in Thread: HALCOGEN, DP83640

Tool/software: Code Composer Studio

Hi everybody!

I recently got an evaluation board for the TMS570LC43X processor and I've been trying to build the lwIP demo that is here.

What I did was:

- import the project on CCS using Project/Import project and then looked for

C:\ti\Hercules\HALCoGen EMAC Driver with lwIP Demonstration\v00.03.00\TMS570LC43x\Build-TMS570LC43x

- then, after hitting the Debug button, the compilation starts but it gets stuck when it reaches this message:

'Building target: Build-TMS570LC43x.out'
'Invoking: ARM Linker'
"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.0.LTS/bin/armcl" -mv7R4 --code_state=32 --float_support=VFPv3D16 --abi=eabi -g --define=_TMS570LC43x_ --display_error_number --diag_warning=225 --diag_wrap=off --enum_type=packed -z -m"Build-TMS570LC43x.map" --heap_size=0x800 --stack_size=0x800 -i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.0.LTS/lib" -i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.0.LTS/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="Build-TMS570LC43x_linkInfo.xml" --rom_model --be32 -o "Build-TMS570LC43x.out" "./HALCoGen-TMS570LC43x/source/HL_emac.obj" "./HALCoGen-TMS570LC43x/source/HL_epc.obj" "./HALCoGen-TMS570LC43x/source/HL_errata.obj" "./HALCoGen-TMS570LC43x/source/HL_esm.obj" "./HALCoGen-TMS570LC43x/source/HL_mdio.obj" "./HALCoGen-TMS570LC43x/source/HL_nmpu.obj" "./HALCoGen-TMS570LC43x/source/HL_notification.obj" "./HALCoGen-TMS570LC43x/source/HL_phy_dp83640.obj" "./HALCoGen-TMS570LC43x/source/HL_pinmux.obj" "./HALCoGen-TMS570LC43x/source/HL_sci.obj" "./HALCoGen-TMS570LC43x/source/HL_sys_core.obj" "./HALCoGen-TMS570LC43x/source/HL_sys_dma.obj" "./HALCoGen-TMS570LC43x/source/HL_sys_intvecs.obj" "./HALCoGen-TMS570LC43x/source/HL_sys_main.obj" "./HALCoGen-TMS570LC43x/source/HL_sys_mpu.obj" "./HALCoGen-TMS570LC43x/source/HL_sys_pcr.obj" "./HALCoGen-TMS570LC43x/source/HL_sys_phantom.obj" "./HALCoGen-TMS570LC43x/source/HL_sys_pmm.obj" "./HALCoGen-TMS570LC43x/source/HL_sys_pmu.obj" "./HALCoGen-TMS570LC43x/source/HL_sys_selftest.obj" "./HALCoGen-TMS570LC43x/source/HL_sys_startup.obj" "./HALCoGen-TMS570LC43x/source/HL_sys_vim.obj" "./HALCoGen-TMS570LC43x/source/HL_system.obj" "./example/hdk/src/lwip_main.obj" "./lwip-1.4.1/apps/httpserver_raw/fs.obj" "./lwip-1.4.1/apps/httpserver_raw/httpd.obj" "./lwip-1.4.1/ports/hdk/lwiplib.obj" "./lwip-1.4.1/src/core/def.obj" "./lwip-1.4.1/src/core/timers.obj" "./lwip-1.4.1/src/netif/ethernetif.obj" "C:/ti/Hercules/HALCoGen EMAC Driver with lwIP Demonstration/v00.03.00/TMS570LC43x/HALCoGen-TMS570LC43x/source/HL_sys_link.cmd"  -lrtsv7R4_T_be_v3D16_eabi.lib
<Linking>

I understand it has to do with the linker... Any thoughts?

My setup:

  • Windows 10 x64
  • CCS Version: 7.0.0.00043

Thank you!!

  • Well I don't see an error message.

    Do you have the runtime library selection as 'auto' ?     The compiler team reduced the download size of the compiler by not shipping pre-built runtime libraries [there are a lot of them given all the ARM variants].

    So the newer CCS has a feature where if you click on the "Properties" for the project,  on the "General"

    node there is an  'Advanced Setting'  for the Runtime Support Library.

    Try making this '<automatic>' instead of having some hard-coded name like I have in the screenshot below:

    Automatic will cause CCS to build the library  (invoking the mklib tool) if it doesn't already exist.
    It picks the library variant to match the silicon you are using too.   So be sure to select the correct 'Variant' to match your board in the Device group on the same window.

  • Hi Anthony!

    Thank you for your quick reply. That solved my issue. I also had to change the field Connection to Texas Instruments XDS110 USB Debug Probe and Compiler version to TI v16.9.0.LTS.

    I'm now able to run the demo but it gets stuck on the line:

    Initializing ethernet (DHCP)
            DEBUG - Getting PHY ID....

    and after printing many many dots it says it can't initialize the physical interface. I'm using a patch cord to connect it to my laptop. I'm surprise because I only see a solid green led on (the yellow one never blinks).

    Is it because it's meant to be connected to a router?

    Regards and thank you again!!

    Pablo

  • Hi Pablo,

    If it can't get the phy ID then maybe the GIO Init wasn't setup or wasn't called..
    So please check the steps on the wiki again carefully. I'm sure you just missed one.

    The cable to the upstream port doesn't matter when it is in the phy ID step. This is just a
    local management interface connection (kind of like an I2C connection) between the two
    chips on the board. It will work even if you have no cable.

    But I don't think it will work if the phy is in reset or shutdown.

    Also make sure you updated the software w. the PHY ID of the LaunchPad.
    It is a different ID # than the HDK which was the basis of the example.
  • Oh I see, this was designed with the HDK in mind and not the launchpad board.
    The GIO is not called during the initialization. How am I supposed to call it? Is there a place where I could read which pins are connected? I haven't found the schematic for the launchpad board.

    And when you talk about the PHY ID, are you talking about PHY_ADDR, right? How do I know which one I'm supposed to use?

    Thanks again Anthony! You're the best!!

    EDIT: Sorry to bother you with so many beginner's questions. I hadn't seen this page before: 

    I should have started there!!

    Thanks again!!!

  • I think the GIO init gets buried inside the lwip 'main' function that is called by main().

    You found the correct page -- the instructions there should be all you need to modify the HDK example for the LuaunchPad.

    Good luck and Thanks for the Compliment!

    -Anthony
  • It works! Thanks again Anthony. I just followed all the steps and it's displaying the static website.
    I was thinking of using UDP for my project so I think I will try to understand how does lwIP does it.
    I have one more question tough. After playing with the project for a while, I renamed it and try to run debug again.
    However, I keep receiving this error message:

    Texas Instruments XDS110 USB Debug Probe_0/CortexR5 : Target must be connected before loading program.

    The cable is connected and I'm able to flash other programs to the board.
    What can be the problem?

    thanks again!!
  • Hi Pablo,

    Well it may be that you have disconnected from the Core. And by this I mean not with the physical cable but logically.
    Just whether or not the emulator has control of the chip or whether it runs freely.

    in the Debug pane if you see an X on the cortex then it is disconnected. You can right click on it and 'connect'.

    If you get the error due to debug as, there a debugger setting you might not have checked.
    Look on the Project Properties, Debug node, on the 'Auto Run and Launch Options' item.

    There is a 'Connect to the target on debugger startup' checkbox. maybe somehow you have it unchecked.