OverviewDSPLink is provided with full source code and an associated build system. This page gives the sequence to be followed for installing and building DSPLink. Install, build sequenceHow do I install DSPLink?DSPLink is available as a tar.gz file from DSP/BIOS Link Product Download Pages. To install it, simply extract it into your desired directory. DSPLink Build PrerequisitesGPP-sideTo build the GPP-side of DSPLink, the following are needed:
DSP-sideTo build the DSP-side of DSPLink, the following are needed:
Setting the DSPLINK Environment VariableThe makefiles for DSPLink all utilize a variable called DSPLINK. Any time you want to build/rebuild DSPLink you need to make sure there is a DSPLINK environment variable present and set correctly. It specifies the absolute path to the root of your DSPLink installation (i.e. a folder that contains config, doc, dsp, etc, gpp, and make folders). The DSPLINK makefile variable is inherited from the DSPLINK environment variables. Therefore you must be sure to set this environment variable correctly. There are two methods to set the DSPLINK environment variable. Method 1: Directly in the ShellLet's assume we're using Linux and the dsplink folder is located at If using tcsh shell: setenv DSPLINK ${HOME}/dsplink_#_##_##/packages/dsplink If using bash shell: export DSPLINK=$HOME/dsplink_#_##_##/packages/dsplink On Windows PC, assume that the dsplink folder is in set DSPLINK=L:\dsplink_#_##_##\packages\dsplink Method 2: Using Provided Shell ScriptsScripts to export the DSPLINK environment variable and and add it to the path are provided with DSPLink. For Linux tcsh you need to edit: $(DSPLINK)/etc/host/scripts/Linux/dsplinkenv For Linux bash you need to edit: $(DSPLINK)/etc/host/scripts/Linux/dsplinkenv.bash This file should be sourced from the command line in order to add the environment variables into your shell: $ cd etc/host/scripts/Linux $ source dsplinkenv For Windows you need to edit: $(DSPLINK)\etc\host\scripts\msdos\dsplinkenv.bat You can then source the batch file from the command prompt: C:\> cd L:\dsplink_#_##_##\packages\dsplink\etc\host\scripts\msdos L:\dsplink_#_##_##\packages\dsplink\etc\host\scripts\msdos> dsplinkenv.bat Build ConfigurationNow that the DSPLINK environment variable is set, you need to execute the DSPLink configuration perl script If you set the DSPLINK environment variable directly in your shell then go to $ perl dsplinkcfg.pl
If you modified the included scripts and then sourced them from your shell, then you can invoke the script by simply calling: $ dsplinkcfg Run through the configuration script and enter all required information as asked. If any of the configuration options are not clear, please refer to the DSPLink UserGuide, which gives information about what the options mean. Note that there's a related article on the configurations Codec Engine uses here. Enabling XDC-based integrationIf you will be integrating DSPLink into your system using XDCtools-based configuration (e.g. using Codec Engine), there are 2 more steps required before the Build Configuration step is complete. cd into the $ $(XDC_INSTALL_DIR)/xdc clean $ $(XDC_INSTALL_DIR)/xdc .interfaces cd into the $ $(XDC_INSTALL_DIR)/xdc clean $ $(XDC_INSTALL_DIR)/xdc .interfaces These two steps prepare the Modifying Makefiles to Setup Build PathsBefore moving to actually building the sources, it is important to ensure that the paths to the dependencies are given to the DSPLink build system. When you run the :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Edit GPP and DSP distribution files for user specific path settings for OS base directory, tool chain path etc Edit GPP distribution file: /home/user/dsplink/make/Linux/davinci_mvlpro4.0.mk Edit DSP distribution file: /home/user/dsplink/make/DspBios/c64xxp_5.xx_linux.mk :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: This information is also available within the file generated as a result of this configuration step: Building DSPLinkMake sure you've completed all the prior steps. If you close your shell and come back later you'll need to set the environment variables again. DSPLink has dependency on include/linux/autoconf.h, the automatically generate header file in Linux kernel. That means you need to build the kernel first before building DSPLink. To build the GPP-side of DSPLink, cd into the $ make -s This builds in both debug and release build by default. If you wish to build only for debug or release build, invoke: $ make -s debug $ make -s release Similarly, to build DSP-side, go into How to Simplify the Build/Update ProcessIMPORTANT: This section is intended as an alternative to the sections "Modifying Makefiles to Setup Build Paths" and "Building DSPLink". It is assumed/expected that you have run the configuration GUI (dsplinkcfg.pl) at least once before using these scripts. BackgroundThe "normal" build flow for DSPLink involves modifying files that are embedded inside the DSPLink directory structure. This method can be inconvenient when new versions of DSPLink are released because the user needs to make all of those same changes again. These changes include things such as the path to your codegen tools and Linux kernel. In order to make it easier to migrate/update to new versions of DSPLink we need a way to make these changes OUTSIDE the DSPLink directory structure. Overriding Makefile VariablesAn easy way to accomplish this goal is by overriding the makefile variables at the command line. That is, rather than editing variables in makefiles scattered throughout the code, we can instead just pass those variable names to make at the command line. The command line variables will override the makefile variables. Here's a snippet from davinci_mvlpro4.0.mk referenced earlier: # ---------------------------------------------------------------------------- # Base for code generation tools - compiler, linker, archiver etc. # ---------------------------------------------------------------------------- BASE_CGTOOLS := /opt/montavista/pro/devkit/arm/v5t_le/bin If you are using different codegen tools, or if you simply have them at a different path on your own computer, all you need to do is pass that variable at the command line: $ make -s debug BASE_CGTOOLS=/opt/arm/arm-2006q3 This will override the variable in the makefile, but without needing to change the makefile. There are many of these variables so it can get quite lengthy when invoking make in this way. Script it!To keep things simple, you might want to create a file or two that does the build for you. My preference is to have two files, one with the path info and the other with the make commands. Here's an example of paths.tcsh which contains all the relevant path info for your build environment: #!/bin/tcsh # paths.tcsh # This file simply creates environment variables. We will utilize # these variables in build_dsplink.tcsh by passing them on the # command line. setenv PERL_DIR /usr/bin setenv ARM_BASE_BUILDOS /data/WorkArea/Brad/CSSD_Linux_18.6baseport/src/linux/kernel_org/2.6_kernel setenv ARM_BASE_CGTOOLS /opt/arm/arm-2006q3 # ARM_CGTOOLS_NAME is just a "helper variable" (i.e. not directly used in make) setenv ARM_CGTOOLS_NAME arm-none-linux-gnueabi # ARM_CGTOOLS_VERSION is just a "helper variable" (i.e. not directly used in make) setenv ARM_CGTOOLS_VERSION 4.1.1 setenv ARM_COMPILER $ARM_BASE_CGTOOLS/bin/$ARM_CGTOOLS_NAME-gcc setenv ARM_LINKER $ARM_BASE_CGTOOLS/bin/$ARM_CGTOOLS_NAME-ld setenv ARM_ARCHIVER $ARM_BASE_CGTOOLS/bin/$ARM_CGTOOLS_NAME-ar setenv ARM_OSINC_TARGET $ARM_BASE_CGTOOLS/include setenv ARM_OSINC_PLATFORM $ARM_BASE_CGTOOLS/lib/gcc/$ARM_CGTOOLS_NAME/$ARM_CGTOOLS_VERSION/include setenv DSP_BASE_CGTOOLS /opt/ti/cg6x_6_0_18 setenv DSP_BASE_SABIOS /opt/ti/bios_5_32_03 Now here's the other piece, build_dsplink.tcsh, which will invoke make and pass it command line parameters to override all the relevant makefile variables: #!/bin/tcsh # You shouldn't need to modify this file. Only your paths should change # and that should be done in paths.tcsh. # # You should make this file executable and putting it in the "dsplink" # directory for your build. source paths.tcsh # set the DSPLINK path to point to the directory containing this script # This needs to be invoked from the dsplink directory in order to work! setenv DSPLINK $cwd setenv MAKE_ARGS_ARM "DSPLINK=$DSPLINK BASE_CGTOOLS=$ARM_BASE_CGTOOLS COMPILER=$ARM_COMPILER LD=$ARM_LINKER ARCHIVER1=$ARM_LINKER ARCHIVER2=$ARM_ARCHIVER LINKER=$ARM_COMPILER BASE_BUILDOS=$ARM_BASE_BUILDOS BASE_OSINC=$ARM_BASE_BUILDOS/include OSINC_PLATFORM=$ARM_OSINC_PLATFORM OSINC_TARGET=$ARM_OSINC_TARGET BASE_PERL=$PERL_DIR" make -s -C $DSPLINK/gpp/src $1 $MAKE_ARGS_ARM # if the gpp side had an error then stop the build so you can see the error, i.e. don’t build the dsp code if ($? != "0") then exit 1 endif setenv MAKE_ARGS_DSP "DSPLINK=$DSPLINK BASE_CGTOOLS=$DSP_BASE_CGTOOLS BASE_SABIOS=$DSP_BASE_SABIOS" make -s -C $DSPLINK/dsp/src $1 $MAKE_ARGS_DSP Notice that the "make" command in the above file has a $1 inside. This is such that you can provide arguments to the build script. For example: $ ./build_dsplink debug
Invoking the build script as shown above will build only the debug configuration of dsplink. Similarly you could give "clean" or "release" as arguments. Giving no argument at all is the same as specifying "all". Once you have paths.tcsh and build_dsplink.tcsh configured to point to your codegen and kernel, future updates are very easy:
CommentsWhen should LinuxCGTools be used instead of CGTools? --Jkridner 16:49, 29 June 2008 (UTC) good point. I'll take this up w/ CGT Prod Mgmt. Posting it to 2 places doesnt make sense - updates are frequent - will get out of sync. In fact its out of sync already since Linkobfuscated.htm has 6.1.3. One link is for people with CCS production licenses (UA) the other link is for Linux evaluation only. LinuxCGTools contains Linux host only downloads that are available externally and are packaged with a clickwrap non-production license. UA-CGTools is the update advisor page for CCS. This link contains both CCS and Linux clickwrap production license versions. If you have purchased a CCS/UA subscription, you can get a full production Linux version. If you don’t have CCS, then you are stuck with eval/non-production use Linux license obtained from the LinuxCGTools link. ----Dknabe 18:54, 1 July 2008 (UTC) Jsarao said ... |
|
How do you set up the Makefile, SOURCES, and COMPONENTS (and other files) in order to build C++ libraries?
--Jsarao 15:29, 21 September 2009 (CDT)