PIL Block build error

Hi, when building a PIL Model Block i get the following error:
undefined first referenced symbol in file
--------- ----------------
_pilInit ./derived/PIL_Try2_main.obj
_pilProfilingTimerFreeze ./derived/PIL_Try2.obj
_pilProfilingTimerUnFreeze ./derived/PIL_Try2.obj
_pilRun ./derived/PIL_Try2_main.obj
_profileEnd_Atomic_Subsystem ../../../../../../NEWFOL~1/SOFTWA~1/SIMULI~1/PS_MAS~1/Speed/PIL_TR~1/../slprj/IDELIN~1/ATOMIC~1/CustomMW/ATOMIC~1.LIB<Atomic_Subsystem.obj> _profileEnd_PIL_Try2 ./derived/PIL_Try2.obj
_profileStart_Atomic_Subsystem ../../../../../../NEWFOL~1/SOFTWA~1/SIMULI~1/PS_MAS~1/Speed/PIL_TR~1/../slprj/IDELIN~1/ATOMIC~1/CustomMW/ATOMIC~1.LIB<Atomic_Subsystem.obj> _profileStart_PIL_Try2 ./derived/PIL_Try2.obj
error: unresolved symbols remain error: errors encountered during linking; "./CustomMW/PIL_Try2.out" not built
Can you help me resolve this? Regards, Werner

3 Comments

What target are you building for? What is the System Target File (.tlc) that you've selected?
Werner
Werner on 24 May 2012
What i did was i converted an atomic subsystem to a model block and added my Target preferences block in both the atomic subsystem and the model block. The intended target is a SD eZdsp F2808. I get the error after starting the simulation and specificly while building the makefile. There was no tlc-folder made in my model folder..
Werner
Werner on 24 May 2012
Well, right now i realized there`s more to this then i expected...
I ran checkEnvSetup and got this:
>> checkEnvSetup('ccsv4','F2808 eZdsp','check')
1. CCS (Code Composer Studio)
Your version :
Required version: 4.1.0
Required for : Code Generation
2. CGT (Texas Instruments C2000 Code Generation Tools)
Your version : 5.2.2
Required version: 5.2.1 to 5.2.3
Required for : Code generation
C2000_CGT_INSTALLDIR="C:\Program Files (x86)\Texas Instruments\C2000 Code Generation Tools 5.2.2"
3. DSP/BIOS (Real Time Operating System)
Your version : 5.41.09.34
Required version: 5.33.05 to 5.41.09.34
Required for : Code generation
CCSV4_DSPBIOS_INSTALLDIR="C:\Program Files\Texas Instruments\bios_5_41_09_34"
4. XDC Tools (eXpress DSP Components)
Your version : 3.22.01.21
Required version: 3.16.02.32 or later
Required for : Code generation
5. Flash Tools (TMS320C2808 Flash APIs)
Your version : 3.02
Required version: 3.02
Required for : Flash Programming
FLASH_2808_API_INSTALLDIR="C:\Program Files\Texas Instruments\Flash API\Flash28_API\API\Flash2808_API_V302"
>>
I run CCSv4.2.4, seems like that is the problem... or at least a problem too?
I got a Windows 7/64-bit machine here and i really struggle finding the right combination of MATLAB-versions and third-party-program-versions to be able to do just a little profiling in Simulink...
I really just want to build small systems with just a few mathematic operation to compare them, but i can do that one at a time etc..
Is this possible?
I read the best way would be to use CCSv3 an a 32-bit machine with an older Matlab-Version, so i just wanted to ask if it`s possible to do PIL-profiling in my environment?

Sign in to comment.

Answers (1)

Kaustubha Govind
Kaustubha Govind on 24 May 2012

0 votes

The documentation section Example — Performing a Model Block PIL Simulation via SCI Using Makefiles seems to suggest that CCSv4 can also be used for PIL profiling. I don't have too much experience in the Embedded Targets area, so I won't answer will complete authority, but I think for now, you should just try and get past the compiler error.
AFAIK, the Target Preferences block must only be present at the root-level of the model, and not inside subsystems. Could you try that and see if the error goes away?

9 Comments

Werner
Werner on 25 May 2012
Sure i can do that:
So when i have the Target preferences block only at the root level i get the following error:
"The call to idelink_ert_make_rtw_hook, during the entry hook generated the following error:
The model or subsystem "Atomic_Subsystem" must contain a Target Preferences block. Place a Target Preferences block inside this model or subsystem.
The build process will terminate as a result."
And when i got the Target preferences block only in the subsystem i get this error:
"The call to idelink_ert_make_rtw_hook, during the entry hook generated the following error:
The model or subsystem "<Model_Name>" must contain a Target Preferences block. Place a Target Preferences block inside this model or subsystem.
The build process will terminate as a result."
Funny thin is in the command window i get the message that the build process completed:
".
### Initial pass through model to cache user defined code
.
### Caching model source code
..................
### Writing header file Atomic_Subsystem.h
.
### Writing header file Atomic_Subsystem_types.h
### Writing source file Atomic_Subsystem.c
### Writing header file Atomic_Subsystem_private.h
.
### Writing source file Atomic_Subsystem_main.c
### TLC code generation complete.
.### Creating makefile: C:\New folder\Software_AVL_GRAZ\Simulink_examples\PS_Maschine\Speed\slprj\idelink_ert\Atomic_Subsystem\Atomic_Subsystem.mk
### Makefile creation done.
### Building makefile...
### Build done."
and after that the error occurs.
Werner
Werner on 25 May 2012
So i just installed CCS v4.1.0 and now get this from checkEnvSetup:
"
>> checkEnvSetup('ccsv4','F2808 eZdsp','check')
1. CCS (Code Composer Studio)
Your version : 4.1.0
Required version: 4.1.0
Required for : Code Generation
2. CGT (Texas Instruments C2000 Code Generation Tools)
Your version : 5.2.2
Required version: 5.2.1 to 5.2.3
Required for : Code generation
C2000_CGT_INSTALLDIR="C:\Program Files (x86)\Texas Instruments\C2000 Code Generation Tools 5.2.2"
3. DSP/BIOS (Real Time Operating System)
Your version : 5.41.09.34
Required version: 5.33.05 to 5.41.09.34
Required for : Code generation
CCSV4_DSPBIOS_INSTALLDIR="C:\Program Files\Texas Instruments\bios_5_41_09_34"
4. XDC Tools (eXpress DSP Components)
Your version : 3.16.02.32
Required version: 3.16.02.32 or later
Required for : Code generation
5. Flash Tools (TMS320C2808 Flash APIs)
Your version : 3.02
Required version: 3.02
Required for : Flash Programming
FLASH_2808_API_INSTALLDIR="C:\Program Files\Texas Instruments\Flash API\Flash28_API\API\Flash2808_API_V302"
"
and when i try running the PIL-Simulation i get this in the MATLAB Command-Window:
"
### Model reference SIM target (Atomic_Subsystem_msf.mexw64) for model Atomic_Subsystem may be out of date because the model information cache has been updated. The model or library files may have been resaved or a referenced configuration set may have been modified.
### Updating model reference SIM target for model: Atomic_Subsystem
### Successfully updated the model reference SIM target for model: Atomic_Subsystem
### Checking the status of model reference RTW target for model 'Atomic_Subsystem' used in 'PIL_Try2'
### Model reference RTW target (Atomic_Subsystem.c) for model Atomic_Subsystem may be out of date because the model information cache has been updated. The model or library files may have been resaved or a referenced configuration set may have been modified.
### Generating code into build folder: *****\slprj\idelink_ert\Atomic_Subsystem
### Invoking Target Language Compiler on Atomic_Subsystem.rtw
### Using System Target File: D:\Matlab2011b\toolbox\idelink\foundation\pjtgenerator\rtw\idelink_ert.tlc
### Loading TLC function libraries
....
Warning: The data type "int8" uses a word size that is not available on the intended target.
Fixed-point signals using this data type will be put inside a larger word or multi words. When used,
extra software will be generated to force this larger word or multi words to emulate a smaller
word. This emulation is helpful when your prototype target and your final
production target are not the same. If the smaller word size does NOT exist
on the final production target, then consider increasing the word size to
one that is supported.
Warning: The data type "uint8" uses a word size that is not available on the intended target.
Warning: The data type "boolean" uses a word size that is not available on the intended target.
.
### Initial pass through model to cache user defined code
.
### Caching model source code
..................
### Writing header file Atomic_Subsystem.h
.
### Writing header file Atomic_Subsystem_types.h
### Writing source file Atomic_Subsystem.c
### Writing header file Atomic_Subsystem_private.h
.
### Writing source file Atomic_Subsystem_main.c
### TLC code generation complete.
.### Creating makefile: *****\slprj\idelink_ert\Atomic_Subsystem\Atomic_Subsystem.mk
### Makefile creation done.
### Building makefile...
### Build done.
### Generating code into build folder: *****\PIL_Try2_ticcs
### Invoking Target Language Compiler on PIL_Try2.rtw
### Using System Target File: D:\Matlab2011b\toolbox\idelink\foundation\pjtgenerator\rtw\idelink_ert.tlc
### Loading TLC function libraries
....
Warning: The data type "int8" uses a word size that is not available on the intended target.
Fixed-point signals using this data type will be put inside a larger word or multi words. When used,
extra software will be generated to force this larger word or multi words to emulate a smaller
word. This emulation is helpful when your prototype target and your final
production target are not the same. If the smaller word size does NOT exist
on the final production target, then consider increasing the word size to
one that is supported.
Warning: The data type "uint8" uses a word size that is not available on the intended target.
.
Warning: The data type "boolean" uses a word size that is not available on the intended target.
### Initial pass through model to cache user defined code
..
### Caching model source code
.................
### Writing header file PIL_Try2.h
.
### Writing header file PIL_Try2_types.h
### Writing source file PIL_Try2.c
.
### Writing header file PIL_Try2_private.h
### Writing source file PIL_Try2_data.c
.
### Writing source file PIL_Try2_main.c
### TLC code generation complete.
### Creating makefile: ****\PIL_Try2_ticcs\PIL_Try2.mk
### Makefile creation done.
### Building makefile...
"
and then i get the Error:
"
<Linking>
undefined first referenced
symbol in file
--------- ----------------
_pilInit ./derived/PIL_Try2_main.obj
_pilProfilingTimerFreeze ./derived/PIL_Try2.obj
_pilProfilingTimerUnFreeze ./derived/PIL_Try2.obj
_pilRun ./derived/PIL_Try2_main.obj
_profileEnd_Atomic_Subsystem ../../../../../../NEWFOL~1/SOFTWA~1/SIMULI~1/PS_MAS~1/Speed/PIL_TR~1/../slprj/IDELIN~1/ATOMIC~1/CustomMW/ATOMIC~1.LIB<Atomic_Subsystem.obj>
_profileEnd_PIL_Try2 ./derived/PIL_Try2.obj
_profileStart_Atomic_Subsystem ../../../../../../NEWFOL~1/SOFTWA~1/SIMULI~1/PS_MAS~1/Speed/PIL_TR~1/../slprj/IDELIN~1/ATOMIC~1/CustomMW/ATOMIC~1.LIB<Atomic_Subsystem.obj>
_profileStart_PIL_Try2 ./derived/PIL_Try2.obj
error: unresolved symbols remain
error: errors encountered during linking; "./CustomMW/PIL_Try2.out" not built
>> Compilation failure
gmake: *** [CustomMW/PIL_Try2.out] Error 1
"
Do i have to include something specific in the linker command in the xmakefilesetup?
Werner
Werner on 25 May 2012
Sorry for the bad formatting by the way, i`ll try to separate the code/text-parts better next time!
Ah. So I guess you were right about needing Target Pref blocks inside atomic subsystems too. :)
If possible, could try running the demo model described in the documentation link from my answer? That will tell us if the issue is with your installation, or your model.
Werner
Werner on 25 May 2012
Hi,
just tried that...
Got the following error:
"When the build format is "Makefile", PIL cannot use the IDE debugger to communicate with your target. If your target supports Serial Communication Interface (SCI) or TCP/IP, configure PIL to use those instead. See the documentation for more information."
Seems like i have to set a right ConnectivityConfiguration for that cause for SD eZdsp F2808 the "Makefile" build format is set automatically...
I think i`ll try that: http://www.mathworks.de/help/toolbox/ecoder/ug/bruy_tf-1.html#bruy017
Or am i interpreting the error wrong?
Anyways, i think i`ll call it a day and will start my weekend, hope to be able to post some accomplishment on Monday (in Austria) :)
Thanks for your help, have a nice weekend!
Good luck! Sorry, I haven't done this before, so any advice I can give will be limited to what I read in the documentation. :)
Werner
Werner on 30 May 2012
Hi, no worries, i`m thankful for every hint!
So i installed CCS 4.1.0 but checkEnvSetup doesn`t seem to recognize the installation:
---------------------------------------------------------------------------------------
>> checkEnvSetup('ccsv4','F2808 eZdsp','check')
1. CCS (Code Composer Studio)
Your version :
Required version: 4.1.0
Required for : Code Generation
2. CGT (Texas Instruments C2000 Code Generation Tools)
Your version : 5.2.2
Required version: 5.2.1 to 5.2.3
Required for : Code generation
C2000_CGT_INSTALLDIR="C:\Program Files (x86)\Texas Instruments\C2000 Code Generation Tools 5.2.2"
3. DSP/BIOS (Real Time Operating System)
Your version : 5.41.09.34
Required version: 5.33.05 to 5.41.09.34
Required for : Code generation
CCSV4_DSPBIOS_INSTALLDIR="C:\Program Files\Texas Instruments\bios_5_41_09_34"
4. XDC Tools (eXpress DSP Components)
Your version : 3.16.02.32
Required version: 3.16.02.32 or later
Required for : Code generation
5. Flash Tools (TMS320C2808 Flash APIs)
Your version : 3.02
Required version: 3.02
Required for : Flash Programming
FLASH_2808_API_INSTALLDIR="C:\Program Files\Texas Instruments\Flash API\Flash28_API\API\Flash2808_API_V302"
---------------------------------------------------------------------------------------------------------
Got any idea why or what to do?
Not sure, but maybe your CCS installation was not done completely/correctly. I think checkEnvSetup checks the Windows Registry to find the key corresponding to CCS, not perhaps that was not populated correctly. Try running the CCS installation "as administrator" and try again? If that doesn't work, try calling MathWorks Tech Support.
Werner
Werner on 15 Jun 2012
Hey,
sorry for the long pause...
Yeah, running the Program as admin solved the problem of Matlab not recognizing the installation.
However, seems that IDELink is not supported for CCS4 and F2808.
I give up, maybe i`ll come back to it someday, but for now i`ll stop working on this topic.

Sign in to comment.

Products

Asked:

on 23 May 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!