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.

How to build StarterWare code from CCS?

Other Parts Discussed in Thread: OMAPL138, AM1808, OMAP-L137, OMAP-L138

Hi,

I have CCS-Version: 5.3.0.00090 and StarterWare-OMAPL138_StarterWare_1_10_03_03 package. I will run it on OMAP-L138 eXperimenter kit.

I have searched help from this e2e forum, but I still don't get answer. Thus I post this and ask for help. My especially interested on to build ..\examples\evmOMAPL138\spi\spiflash.c

Please tell which host (win/Linux) you are using. Thank you for help

Joe

  • Hello Joe,

    The toolchain for cross compilation are available for both windows and linux.

    You can use either windows or linux as host.

    Please refer to "Getting Started Guide" for more details ( http://processors.wiki.ti.com/index.php/StarterWare_Getting_Started_01.10.XX.XX )

    Regards,

    Vinay

  • Hi Vinay,

    Thank you for your replying. I do know that wiki and I also do follow "GCC With Command Line" on Linux host PC, but there is no makefile under " build/armv5/gcc tree". There is only makedefs. If I go down to build/armv5/gcc/omapl138/evmOMAPL138/spi, there is a makefile for this example, but I got following error.

    arm-none-eabi-ld: cannot find -lc

    I google, but nothing useful.

    Can you give me more detail steps. Thank you again.

    Joe

  • I'm using CCSv5.2.1.00018 on WinXP, LCDKC6748, StarterWare 1.20.03.03 and the IDE GUI. No command line. It's been fairly painless so far.

    - Start CCS
    - The "Workspace Launcher" dialog is displayed
    - Enter a path into "Workspace" text. The path should not exist.
    - "Code Composer Studio" application eventually launches.
    - Close the "TI Resource Explorer" sub-window
    - Select menu "Project->Import Existing CCS Eclipse" Project
    - The "Import CCS Eclipse Project" dialog is displayed.
    - Use "Select search-directory" option.
    - Browse to StarterWare build directory. In your case, something like
    c:\ti\OMAPL138_StarterWare_1_10_03_03\build\armv5\cgt_ccs\omapl138\evmOMAPL138\spi
    - In the "Discovered projects:" list, there should be one item.
    - Click "Finish". The "Import CCS Eclipse Project" dialog closes.
    - In the "Project Explorer" sub-window, click on the item "spi_armv5_omapl138_evmOMAPL138". The project must be selected before project menu items are enabled.
    - Select menu "Project->Build All"
    - See bUild messages in the "Console" sub-window.
    - Select menu "Project->Debug".
    - The "Open Target Configuration" should be displayed.
    - Select connection and emulator.
    - In the "Project Explorer" sub-window, click on the item "spi_armv5_omapl138_evmOMAPL138" again.
    - Select menu "Project->Debug". Code should load at this point.

  • Thank you, Norman.

    What you said is right. I do build the spi example.

    Another question, have you build from OMAPL138_StarterWare_1_10_03_03\build\armv5\cgt_ccs, which is build all projects That is based on "

    StarterWare Getting Started 01.10.XX.XX". It takes a long time and dose not finish the building on WinXP host. I got a lot errors from Linux host PC.

  • I've never tried more than one project per workspace. I tend to avoid stressing Eclipse. The path you noted would include both EVM and LCDK applications, drivers and libraries. I just tried a smaller path just for 36 EVM top level applications:

    OMAPL138_StarterWare_1_10_03_03\build\armv5\cgt_ccs\omapl138\evmOMAPL138

    It took about 5 minutes to build on my ancient WinXP box. Maybe the problem is the build order. In theory, drivers and libraries should be built before applications. Maybe a recursive dependency of some sort. Avoidance is a useful tactic around Eclipse. Just don't do stuff that doesn't work.

  • thank you for your feedback and suggestions.

  • Hi Norman,

    There is building errors when I tried to build 

    OMAPL138_StarterWare_1_10_03_03\build\armv5\cgt_ccs\omapl138\evmOMAPL138\demo

    This 1st error message is here. Do you get this error? The only different between my and your is CCS version. Any suggestion? Thank you

    ../third_party/lwip-1.3.2/src/include/ipv4/lwip/icmp.h declaration is incompatible with
    "struct ip_hdr __attribute__(<error-type>)" (declared at line 132 of
    "/../third_party/lwip-1.3.2/src/include/ipv4/lwip/ip.h") demoEnet.c /demo_armv5_omapl138_evmOMAPL138 line 85 C/C++ Problem


  • Hi Joe,

    Why the compilation fails?

    The CCS 5.3.0 features new ARM CG tools (v 5.0.1) which supports GCC variable attributes.
    The starterware applications and libraries enable GCC variable compilation when built with ARM CG tool v5 and above.

    Hence it is required to enable support for GCC extensions for the applications and libraries to build properly.

    How to enable GCC support?

    CGT CCS Build:

    1. Right click on project and select properties from menu
    2. Goto section Build -> TMS470 Compiler -> Language Options
    3. Check the box for "Enable support for GCC extensions (--gcc)
    4. Rebuild project for libraries and application as applicable
    5. Repeat step 1-4 for other Build configurations of project

    CGT Build

    1. Open for editing file OMAPL138_StarterWare_1_10_03_03\build\armv5\cgt\makedefs
    2. Change the exeautables as shown below:

    Existing:

    #
    # Compiler, Linker and Archiver with respect to the toolchain
    #
    CC=${CGT_DIR}/bin/cl470
    LD=${CGT_DIR}/bin/cl470
    AR=${CGT_DIR}/bin/ar470

    To be changed as:

    #
    # Compiler, Linker and Archiver with respect to the toolchain
    #
    CC=${CGT_DIR}/bin/armcl
    LD=${CGT_DIR}/bin/armcl
    AR=${CGT_DIR}/bin/armar

    3. Add --gcc to CFLAGS (Enable support for GCC variable attribute)
    4. Rebuild the application and libraries projects as applicable

    Please let me know if this answers your question.

    Regards,
    Vinay

  • Hi Vinay,

    Thank you for help. It works. BTW, where do you find this building steps?

    Regards,

    Joe

  • Here's the warnings compiling the demo project. From the console window:

    "../../../../../../../third_party/lwip-1.3.2/ports/am1808/include/arch/cc.h", line 79: warning: #warn The packed attribute is not supported by this version of the            TI ARM CGT. Please upgrade to version 5.x or use an alternate           toolchain instead.

    "../../../../../../../usblib/include/usblib.h", line 89: warning: #warn The packed attribute is not supported by this version of the TI ARM CGT.       Please upgrade to version 5.x or use an alternate toolchain instead.

    From the Problems window:

    entry-point symbol other than "_c_int00" specified:  "Entry"

    This project was created using a version of compiler that is not currently installed: 4.6.4 [ARM]. Another version of the compiler will be used during build: 4.9.5. Please install the compiler of the required version, or migrate the project to one of the available compiler versions by adjusting project properties.

    I am using CCSv5.2.1.00018, ARM CGT 4.9.5. I believe in my case

    #define PACK_STRUCT_STRUCT

    and in your case

    #define PACK_STRUCT_STRUCT __attribute__ ((__packed__))

    I think Vinay Kumar is correct. However for me, enabling gcc support does not have any effect. Probably due to the CGT version number excluding the gcc extensions in the header files. I've been working on the DSP only part and the DSP CGT does compile StarterWare properly. This would imply that LWIP and All USB examples don't work on the ARM side unless youv'e got newest CGT.  Odd since StarterWare hasn't been updated for quite a while.

  • Hi Norman,

    Thank you for explaining the problem to me. I do build demo from CCS 5.3.0 and extend gcc support as Vinay's instructions.

    May I ask do you use SPI driver on ARM side? It seems to me the DVDSK doesn't support SPI driver on ARM core.

    Regards,

    Joe

  • Not sure about your question. I've haven't tried any StarterWare on the ARM core. My C6748 processor does not have one. I do have another board with OMAP-L137 but I never did use the ARM code for SPI work. On the OMAP-L137, I used the DSP core for SPI work within DSP/BIOS and ARM/Linux for everything else. I vaguely remember experimenting with SPI device drivers on the ARM core but that was with Linux on the ARM code. If you are using Linux on ARM. the SPI drivers do work.

  • Yes, I seem asked a not related to StarterWare question here. Sorry about that.

    My question is about  OMAP-L138 and its DVSDK. As you said that the SPI driver seems bind with BIOS, but I try control the SPI device on ARM core. There are some SPI drivers under psp of DVSDK package, but they may not be for OMAP-L138-SOM kit.  That is what my question come from. Yea, if you are not work on this part, just forget it and I don't want  you wast too much time on it.  I appreciate your attention on my question and help.

  • The DVSDK Linux PSP might cover your particular board. Maybe check the GIT to see if there is config for your board.

    http://arago-project.org/git/projects/?p=linux-davinci.git;a=tree

    I assume this SOM is part of the LogicPD board? You should be able to use the kernel config for the LogicPD EVM.