Destination:
Let user deploy and test their program fast on TI8168, So the building system would output following binaris from one copy of C source code: binaries for x86, ARM, and DSP on TI8168.
graphic 1: using scenario of the building system
Howto:
(1)Get following compiler installed: gcc, gcc-arm(cross compiler), c6runlib-cc(c6run compiler for building binaries running on DSP and wrapper the function on ARM). Remember when you installed it, add them to enviroment variable.
(2)Orgnize the source code. Following is what I designed.
RootDir:
|----Bin: All obj file and bin goes here.
|----DataDir: All data that would not be involed to building process but running stage comes here.
|----ExtDynLib: externel dynamilc libraries that need to link for ARM and X86 besides standard libraries.
|----ExtStatLib: externel static libraries need to be linked for ARM and X86.
|----SrcHead: because all the codes runing on DSP, would be archieved into a static library used by gcc and gcc-arm at compiling stage(saying compiling stage is from the view of gcc, indeed the c6run tools have done linkings inside for binaries on DSP and
wrapped the function gcc saw to calling to syslink), the header files for this library should goes here.
|----SrcLib: this directory holds c codes that would be archived into a library, for the output binary of DSP Version, the codes running on DSP.
|----SrcExec: this is the source code never touches DSP, they will runing on ARM or X86.
(3) Writing the Makefile.
I did not using libtool which making things more complicated, it looks quite likely a normal one for gcc such as compiling flag settings. What special is taking care about the building process for DSP and linking them with binaries on ARM. Following is
what my Makefile does.
DSP:
c6run compile the codes in /SrcLib --> c6run archive them into temp_dsp.lib --> try gcc-arm compile codes in /SrcExec into .o --> linking temp_dsp.lib with *.o before and external library in /ExtDynLib and /ExtStatLib -> store it as /bin/output_dsp.bin.
Note: temp_dsp.lib is a wrapped library containing codes with DSP initialization,
communication in syslink framework, binary on DSP, so you will find it have much bigger size than temp_arm.lib.
ARM:
gcc-arm compile the codes in /SrcLib --> gcc-arm archive them into temp_arm.lib --> try gcc-arm compile codes in /SrcExec into .o --> linking temp_arm.lib with *.o before and external library in /ExtDynLib and /ExtStatLib -> store it as /bin/output_arm.bin.
X86:
the same with ARM building process, just change the name to _x86, and using gcc,
output is /bin/output_x86.bin.
4) what we got:
#: APPNAME = test make
In /Bin I got: test_dsp.bin, test_arm.bin, test_x86.bin, test_dsp.lib, test_arm.lib, test_x86.lib. I can directly runing them on x86, TI8168 pure ARM, TI8168 ARM with DSP to validate the logic and CPU consuming rate. The binaries would be "downloaded" to
DSP from ARM, when you runing test