Hello,
I'm using MATLAB R2008a with TC2 and ‘IDE link for CCS’ to communicate with Spectrum Digital's F28335 eZdsp evaluation board. Also I'm using CCS v3.3 and RTDX library (rtdxfp.lib) that comes with newest version of the DSP/BIOS (5.41.10.36). I have tested Simulink<-->F28335 communication in two steps:
1. Simulink-->F28335
- F28335_h2t_target.mdl
- the model from which target application is automatically created
- consists of : Target Preferences, From RTDX and To Memory blocks
- F28335_h2t_host.mdl
- host model that sends data to F28335 during execution
- consists of: Constant and RTDX Write blocks
- when I run the host model simulation it loads target application onto DSC, runs it and specified memory location is loaded with the constant
2. F28335-->Simulink
- F28335_t2h_target.mdl
- the model from which target application is automatically created
- consists of: Target Preferences, Constant and To RTDX blocks
- F28335_t2h_host.mdl
- host model that receives data from F28335 during execution
- consists of RTDX Read and Display blocks
- when I start the host model simulation, Simulink generates error message:
Error evaluating registered method 'Outputs' of M-S-Function 'sfcn_TargetToHost' in 'F28335_t2h_host/RTDX Read'. ReadMessage: Timed out waiting for CCS to confirm completion. The following is the MATLAB call stack (file names and line numbers) that produced this error: ['C:\MATLAB\toolbox\ccslink\ccslinkblks\rtdxsimblks\sfcn_TargetToHost.m'] [227].
- by setting brakepoints in CCS I validated that application on the microcontroller executes, that is F28335_t2h_target_step() function calls RTDX_write() function, but it seems as if it doesn't perform RTDX write?!
I tried using both sets of models (with different Target Preferences block in target models) to communicate with F2812 eZdsp board, and it worked fine. For this I used rtdxx.lib from DSP/BIOS ver. 5.31.09, because it didn't work with newer versions of the library. This DSP/BIOS doesn't include rtdxfp.lib library needed for F28335 project.
What am I doing wrong? Has anyone managed to make this kind of combination work?
EDIT (26.08.2011.):
I had a bit of a breakthrough. I managed to establish F28335-->Simulink RTDX communication with following procedure:
- I made CCS project from Simulink target model (F28335_t2h_target.mdl).
- In CCS I replaced rtdxfp.lib with rtdxx.lib - project now won't link because rtdxx.lib was obviously compiled without floating-point support.
- In CCS I replaced rts2800_fpu32.lib (has FPU support) with rts2800_ml.lib (hasn't FPU support).
- In CCS I disabled FPU support (Build Options-->Compiler-->Advanced-->Floating Point Support-->None).
- Project bilds OK.
- When I run host model in Simulink it receives constant value defined in target application.
My conclusion is that there is something wrong with rtdx*.lib libraries for C2000 that come with DSP/BIOS 5.32 and newer. Could this be true?
The problem is that the library (rtdxx.lib from DSP/BIOS 5.31.*) that works is compiled without floating-point support and can't be used in projects with FPU. And I need both FPU and RTDX in the same project. I'm aware that RTDX is no longer supported and I can't expect any fixes so I have two questions:
- Would it be possible to obtain a project from which rtdxx.lib (DSP/BIOS 5.31.*) was built so I can rebuild it with FPU support?
- Is there a way to make rtdxx.lib (DSP/BIOS 5.31.*) link into a project with FPU support?