<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<div class="moz-forward-container"> <br>
I am trying extend my CMake toolchain of a C project, to be able
to <br>
cross compile for an Analog Devices SHARC DSP, specifically the
SC589, which is a fairly new model.<br>
This C project is split up into several modules, which should each
be build as a separate library.<br>
<br>
I saw that people seem to have successfully cross compile with
CMake using the <br>
CMakeADSP toolchain as described in the CMake wiki. This uses the
VisualDSP++ suite from Analog Devices.<br>
However, Analog Devices have released a new IDE/toolchain for
developing on DSPs, which is called<br>
CrossCore Embedded Studio. And that is where I am struggling to
make it work.<br>
<br>
What I did was getting the Generic-ADSP-Common.cmake and the
Generic-ADSP-C.cmake files. I modified them<br>
to fit the new folder structure of CrossCore, which is slightly
different to the VisualDSP++ one. So it can find<br>
the correct DSP specific libraries etc.<span class="final-path"
style="box-sizing: border-box; color: rgb(0, 0, 0); font-family:
Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,"Apple
Color Emoji","Segoe UI Emoji","Segoe UI
Symbol"; font-size: 18px; font-style: normal; font-variant:
normal; letter-spacing: normal; line-height: 22.9091px;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
background-color: rgb(255, 255, 255);"></span><br>
<br>
Then I wrote a toolchain file <tt>adsp.cmake:</tt>
<blockquote><tt>SET( CMAKE_SYSTEM_NAME ADSP-C )</tt><tt><br>
</tt><tt><br>
</tt><tt>SET( CMAKE_MAKE_PROGRAM "C:/Analog\ Devices/CrossCore\
Embedded\ Studio\ 2.1.0/make.exe" )</tt><tt><br>
</tt><tt>SET( CMAKE_GENERATOR "Unix Makefiles")</tt><tt><br>
</tt><tt><br>
</tt><tt>SET( ADSP_PROCESSOR "ADSP-SC589" )</tt><tt><br>
</tt><tt>SET( ADSP_PROCESSOR_SILICIUM_REVISION "none" )</tt><tt><br>
</tt><tt><br>
</tt><tt># specify the cross compiler</tt><tt><br>
</tt><tt>SET( CMAKE_C_COMPILER "C:/Analog\ Devices/CrossCore\
Embedded Studio\ 2.1.0/cc21k.exe" )</tt><tt><br>
</tt><tt>SET( CMAKE_CXX_COMPILER "C:/Analog\ Devices/CrossCore\
Embedded Studio\ 2.1.0/cc21k.exe" )</tt><tt><br>
</tt><tt>SET( CMAKE_CXX_COMPILER_ARG1 "-c++" CACHE STRING "First
argument" )</tt><tt><br>
</tt><tt>SET( CMAKE_ASM_COMPILER "C:/Analog\ Devices/CrossCore\
Embedded\ Studio\ 2.1.0/easm21k.exe" )</tt><tt><br>
</tt><tt>SET( CMAKE_LINKER "C:/Analog\ Devices/CrossCore\
Embedded\ Studio\ 2.1.0/linker.exe" )<br>
<br>
</tt></blockquote>
I am not sure, if this is actually even close to being correct.
But it seems from the CMake build output, it actually does
something remotely useful...<tt><br>
</tt>Then I invoke CMake via<tt><br>
<br>
cmake -DCMAKE_TOOLCHAIN_FILE=../adsp.cmake -G "Unix
Makefiles" ..<br>
<br>
</tt>This is when I get a bunch of errors<tt> </tt>(see the
bottom of the mail). From the errors, it seems that it wants to
link against some <tt>160_hdr.doj</tt><tt>. </tt>I looked into
the directory<br>
in which all the libraries reside for my DSP and could not find
it. Then I looked for libraries of the older DSPs<tt> </tt>and
found out that only the ADSP 21160 requires this library.<br>
So I assume that<tt> </tt>somehow I could not manage to create a
correct toolchain<tt>, </tt>because it still searches for the
libraries of an older model?<tt><br>
<br>
</tt>Did anyone manage to cross compile using the new CrossCore
toolchain and can give some info or can anyone elaborate on some
steps I am quite possibly missing here?<br>
Or will it not be possible to use the new ADSP CrossCore toolchain
without performing in depth changes to the CMake code?<tt><br>
</tt><br>
Thanks a lot in advance,<br>
Merikan<tt><br>
</tt><tt><br>
<br>
CMakeError.log:<br>
</tt>
<blockquote>
<blockquote><tt>The C compiler identification could not be found
in
"C:/Users/mym/cproj/bin/CMakeFiles/3.3.0-rc2/CompilerIdC/CMakeCCompilerId.dxe"</tt><br>
<br>
<tt>The C compiler identification could not be found in
"C:/Users/mym/cproj/bin/CMakeFiles/3.3.0-rc2/CompilerIdC/CMakeCCompilerId.doj"</tt><br>
<br>
<tt>The C compiler identification could not be found in
"C:/Users/mym/cproj/bin/CMakeFiles/3.3.0-rc2/CompilerIdC/CMakeCCompilerId.dxe"</tt><br>
<br>
<tt>Checking whether the C compiler is IAR using "" did not
match "IAR .+ Compiler":</tt><br>
<tt>cc3101: fatal error: No source files specified</tt><br>
<tt>The CXX compiler identification could not be found in
"C:/Users/mym/cproj/bin/CMakeFiles/3.3.0-rc2/CompilerIdCXX/CMakeCXXCompilerId.dxe"</tt><br>
<br>
<tt>The CXX compiler identification could not be found in
"C:/Users/mym/cproj/bin/CMakeFiles/3.3.0-rc2/CompilerIdCXX/CMakeCXXCompilerId.doj"</tt><br>
<br>
<tt>Checking whether the CXX compiler is IAR using "" did not
match "IAR .+ Compiler":</tt><br>
<tt>cc3101: fatal error: No source files specified</tt><br>
<tt>Determining if the C compiler works failed with the
following output:</tt><br>
<tt>Change Dir: C:/Users/mym/cproj/bin/CMakeFiles/CMakeTmp</tt><br>
<br>
<tt>Run Build Command:"c:/ANALOG~1/CROSSC~1.0/make.exe"
"cmTC_5c20e/fast"</tt><br>
<tt>c:/ANALOG~1/CROSSC~1.0/make.exe -f
CMakeFiles/cmTC_5c20e.dir/build.make
CMakeFiles/cmTC_5c20e.dir/build</tt><br>
<br>
<tt>make.exe[1]: Entering directory
`C:/Users/mym/cproj/bin/CMakeFiles/CMakeTmp'</tt><br>
<br>
<tt>[0mBuilding C object
CMakeFiles/cmTC_5c20e.dir/testCCompiler.c.doj[0m</tt><br>
<br>
<tt>"C:/Analog Devices/CrossCore Embedded Studio
2.1.0/cc21k.exe" -o
CMakeFiles/cmTC_5c20e.dir/testCCompiler.c.doj -c
C:/Users/mym/cproj/bin/CMakeFiles/CMakeTmp/testCCompiler.c</tt><br>
<br>
<tt>[0mLinking C executable cmTC_5c20e.dxe[0m</tt><br>
<br>
<tt>"C:/Analog Devices/CrossCore Embedded Studio
2.1.0/cc21k.exe"
"CMakeFiles/cmTC_5c20e.dir/testCCompiler.c.doj" -o
cmTC_5c20e.dxe -L"C:/Analog Devices/CrossCore Embedded
Studio 2.1.0/SHARC/lib/sc589_rev_none" </tt><br>
<br>
<br>
<br>
<tt>[Error li1021] The following symbols referenced in
processor 'p0' could not be resolved:</tt><br>
<br>
<tt> '_dispatcher_CB15I [__dispatcher_CB15I]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_CB7I [__dispatcher_CB7I]' referenced
from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_EP0I [__dispatcher_EP0I]' referenced
from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_EP1I [__dispatcher_EP1I]' referenced
from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_EP2I [__dispatcher_EP2I]' referenced
from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_EP3I [__dispatcher_EP3I]' referenced
from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_FIXI [__dispatcher_FIXI]' referenced
from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_FLTII [__dispatcher_FLTII]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_FLTOI [__dispatcher_FLTOI]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_FLTUI [__dispatcher_FLTUI]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_IICDI [__dispatcher_IICDI]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_IRQ0I [__dispatcher_IRQ0I]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_IRQ1I [__dispatcher_IRQ1I]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_IRQ2I [__dispatcher_IRQ2I]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_LP0I [__dispatcher_LP0I]' referenced
from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_LP1I [__dispatcher_LP1I]' referenced
from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_LP2I [__dispatcher_LP2I]' referenced
from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_LP3I [__dispatcher_LP3I]' referenced
from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_LP4I [__dispatcher_LP4I]' referenced
from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_LP5I [__dispatcher_LP5I]' referenced
from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_LSRQI [__dispatcher_LSRQI]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_SFT0I [__dispatcher_SFT0I]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_SFT1I [__dispatcher_SFT1I]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_SFT2I [__dispatcher_SFT2I]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_SFT3I [__dispatcher_SFT3I]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_SOVFI [__dispatcher_SOVFI]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_SPR0I [__dispatcher_SPR0I]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_SPR1I [__dispatcher_SPR1I]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_SPT0I [__dispatcher_SPT0I]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_SPT1I [__dispatcher_SPT1I]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_TMZHI [__dispatcher_TMZHI]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_TMZLI [__dispatcher_TMZLI]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> '_dispatcher_VIRPTI [__dispatcher_VIRPTI]'
referenced from '160_hdr.doj'</tt><br>
<br>
<tt> 'adi_osal_Init [_adi_osal_Init]' referenced from
'160_hdr.doj'</tt><br>
<br>
<br>
<br>
<tt>Linker finished with 1 error </tt><br>
<br>
<tt>cc3089: fatal error: Link failed (code:1)</tt><br>
<br>
<tt>make.exe[1]: *** [cmTC_5c20e.dxe] Error 1</tt><br>
<br>
<tt>make.exe[1]: Leaving directory
`C:/Users/mym/cproj/bin/CMakeFiles/CMakeTmp'</tt><br>
<br>
<tt>make.exe: *** [cmTC_5c20e/fast] Error 2</tt><br>
</blockquote>
</blockquote>
<br>
</div>
<br>
</body>
</html>