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.

CCSv5, XDCTools and Code Sourcery toolchain

Hi,

I successfully integrated Code Sourcery in CCSv5. My aim is now at developing a simple app which should call the codec engine, whose target is a DM6446 board. I've already managed to create an app with CCS and Code Sourcery (by creating a C/C++ Project, and following the procedure described in the TI's wiki), but I cannot repeat this procedure when it comes to include XDCTools (I'm using xdctools 3.20.08.88, xdais 7.20.00.07, ipc 1.22.03.23, bios 6.31.04.27).

As a first attempt, I created the new app as a C/C++ project. I also created a new RTSC configuration file, and CCS prompted me: "Do you wish to enabled RTSC suppoprt for project 'Test'?". After replying 'yes', whenever I try to open test.cfg I get the following error: "An error has occurred. See error log for more details java.lang.NullPointerException". As a result of this approach, when I build the project, the xdctools configuro step is skipped at all, as revealed in the console output:

**** Build of configuration Debug for project Test ****

make all
Building file: ../hello.c
Invoking: ARM Sourcery Linux GCC C Compiler
arm-none-eabi-gcc -O0 -Wall -Wa,-adhlns="hello.o.lst" -c -fmessage-length=0 -MMD -MP -MF"hello.d" -MT"hello.d" -mcpu=cortex-m3 -mthumb -g3 -gdwarf-2 -o"hello.o" "../hello.c"

 

As a second approach, I created the new app as a CCS project selecting the "empty RTSC Project" template, which I now for sure to work with XDCTools. As "RTSC Target" I selected "gnu.targets.arm.GCArmv5T" (this configuration works when I use XDCTools from shell), and as "RTSC Platform" I selected "ti.platforms.evmDM6446". This time I can properly edit test.cfg. However, when building the project I get:

**** Build of configuration Release for project Prova ****

/home/gabriele/sw/ccs/ccsv5/utils/gmake/gmake -k all
Building file: ../Prova.cfg
Invoking: XDCtools
"/home/gabriele/sw/ccs/xdctools_3_20_08_88/xs" --xdcpath="/home/gabriele/sw/ccs/ipc_1_22_03_23/packages;/home/gabriele/sw/ccs/bios_6_31_04_27/packages;/home/gabriele/sw/ccs/xdais_7_20_00_07/packages;/home/gabriele/sw/ccs/xdais_7_20_00_07/examples;" xdc.tools.configuro -o configPkg -t gnu.targets.arm.GCArmv5T -p ti.platforms.evmDM6446 -r whole_program -b "/home/gabriele/sw/ruiva-sw/ecv/ccs/Prova/config.bld" -c "/home/gabriele/sw/ccs/ccsv5/tools/compiler/tms470" "../Prova.cfg"
making package.mak (because of package.bld) ...
js: "./package.bld", line 60: Error: template generation of 'compiler.opt' failed: Error: /home/gabriele/sw/ccs/ccsv5/tools/compiler/tms470/bin/arm-none-eabi-gcc cannot be found. Ensure that rootDir for the GCArmv5T target is set correctly in ./config.bld
gmake: *** Deleting file `package.mak'

This reveals that CCS is building using TMS740 compiler, instead of Code Sourcery. This is further confirmed by looking at "Properties->C/C++ Build/Settings". The problem in this case is that I don't know how to change this configuration. I tried to go to "Properties->C/C++ Build/Tool Chain Editor", to uncheck "Display compatible toolchains only" and to select "ARM Linux GCC (Sourcery G++ Lite)", but I can't find anymore the linker in "Properties->C/C++ Build/Settings" and I lost any reference to XDCTools in "Properties/CCS Build".

In a nutshell: I would like to create with CCS a new project which is built with Code Sourcery G++ Lite, meanwhile using XDCTools to access the Codec Engine. Is this possible? If so, how?

 

Thanks

Gabriele

 

  • Gabriele,

    You cannot create a CCS project that will use gcc.  CCS projects will always use one of the TI compilers.   If you go to New -> Project ... -> and select "C Project" or "C++ Project" under General you can create a project that uses gcc.  I think you have figured that part out already.  However I am not sure how you would then associate .cfg files with the xdctools.

    I am going to move this thread into the BIOS forum as the xdctools experts monitor that forum.

     

    Regards,

    John

     

  • Gabriele Randelli said:

    Hi,

    I successfully integrated Code Sourcery in CCSv5. My aim is now at developing a simple app which should call the codec engine, whose target is a DM6446 board. I've already managed to create an app with CCS and Code Sourcery (by creating a C/C++ Project, and following the procedure described in the TI's wiki), but I cannot repeat this procedure when it comes to include XDCTools (I'm using xdctools 3.20.08.88, xdais 7.20.00.07, ipc 1.22.03.23, bios 6.31.04.27).

    As a first attempt, I created the new app as a C/C++ project. I also created a new RTSC configuration file, and CCS prompted me: "Do you wish to enabled RTSC suppoprt for project 'Test'?". After replying 'yes', whenever I try to open test.cfg I get the following error: "An error has occurred. See error log for more details java.lang.NullPointerException". As a result of this approach, when I build the project, the xdctools configuro step is skipped at all, as revealed in the console output:

    When you got the NullPointerException error, was there an option to see error details? If you click on that option, is the displayed stack trace similar or the same to this one:
    java.lang.NullPointerException
     at org.eclipse.rtsc.xdctools.model.ui.editors.CoreCfgSessionEditorImp.<init>(CoreCfgSessionEditorImp.java:59)
     at org.eclipse.rtsc.xdctools.model.ui.editors.ProgramConfigurationEditor.configSessionSetup(ProgramConfigurationEditor.java:1135)
     at org.eclipse.rtsc.xdctools.model.ui.editors.ProgramConfigurationEditor.createPages(ProgramConfigurationEditor.java:730)
    ...

  • No. There is a "details" button, but unfortunately clicking it does not add any other detail with respect to the sentence already reported: "An error has occured. See error log for more details java.lang.NullPointerException". Actually, this seems like a bug of CCS, since the widget seems animated with an anomalous graphical effect.

  • Sasha,

    sorry for my previous reply, I was wrong. I manage to get the following stack trace:

     

    java.lang.NullPointerException
        at org.eclipse.rtsc.xdctools.model.ui.views.CombinedViewContentProvider.initialize(CombinedViewContentProvider.java:102)
        at org.eclipse.rtsc.xdctools.model.viewer.ModelObjectViewerContentProvider.getElements(ModelObjectViewerContentProvider.java:117)
        at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:989)
        at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:703)
        at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1332)
        at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:391)
        at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:896)
        at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:601)
        at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:801)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
        at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:778)
        at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:644)
        at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:749)
        at org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.java:1492)
        at org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:833)
        at org.eclipse.jface.viewers.AbstractTreeViewer$5.run(AbstractTreeViewer.java:1476)
        at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1422)
        at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:403)
        at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1383)
        at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1469)
        at org.eclipse.ui.dialogs.FilteredTree$NotifyingTreeViewer.inputChanged(FilteredTree.java:1187)
        at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:274)
        at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1664)
        at org.eclipse.rtsc.xdctools.model.ui.views.AvailableModulesPage.createControl(AvailableModulesPage.java:267)
        at org.eclipse.rtsc.xdctools.model.ui.views.PackageView.doCreatePage(PackageView.java:47)
        at org.eclipse.ui.part.PageBookView.createPage(PageBookView.java:408)
        at org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:751)
        at org.eclipse.ui.part.PageBookView.showBootstrapPart(PageBookView.java:920)
        at org.eclipse.ui.part.PageBookView.createPartControl(PageBookView.java:491)
        at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
        at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
        at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
        at org.eclipse.ui.internal.WorkbenchPage$ActivationList.setActive(WorkbenchPage.java:4218)
        at org.eclipse.ui.internal.WorkbenchPage$18.runWithException(WorkbenchPage.java:3277)
        at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3164)
        at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
        at org.eclipse.ui.internal.Workbench$31.runWithException(Workbench.java:1567)
        at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3164)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
        at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1407)

    Do you think this could be related to my problem? It seems to me that integrating Code Sourcery with XDCTools in CCS is not a common practice. Thereby I'm wondering what would be a proper development practice... should I bypass CCS? Or should I give up with XDCTools?

  • Gabriele Randelli said:

    Do you think this could be related to my problem? It seems to me that integrating Code Sourcery with XDCTools in CCS is not a common practice. Thereby I'm wondering what would be a proper development practice... should I bypass CCS? Or should I give up with XDCTools?

    For now, I wasn't able to reproduce the exact stack trace you are seeing, but I am getting a NullPointerException. And, you are right, it's not very common to use CCS 5 with XDCtools and Code Sourcery. The wiki article that I think you are using (http://processors.wiki.ti.com/index.php/How_to_create_GCC_projects_in_CCSv5) does not mention XDCtools.

    Now, back to what you are really trying to do. If you have to build for DM6446, you'll have to use BIOS 5 and Codec Engine 2.x, and build on the command line. DM6446 is not supported for newer versions of these product. I don't really know which exact version of Codec Engine you can use, but I am sure the release notes list supported targets.

  • Sasha Slijepcevic said:
    If you have to build for DM6446, you'll have to use BIOS 5 and Codec Engine 2.x, and build on the command line.

    That's what I'm doing right now. I simply gave up with CCS, and I'm working with Code Sourcery + XDCTools through Makefile. Still, my feeling is that it would be a significant improvement to achieve such an integration in CCS. Thanks for your support.