I have to use the C2000 target for a project. I *think* I am
getting used to the simpler blocks, but now I would like to
re-use some code I wrote on CCS before. This code should be
called on a timer interrupt.
How exactly can I do it? I've read that you can do it in
Real Time Workshop, but I am still new to all this I don't
know if I can use both RTW and the C2000 target together. Is
it possible?
Are you asking if you can integrate previously-written C-code with your new
project? If so, you can do this using a variety of legacy code mechanisms.
Start with Legacy Code Tool, which you can read about in the help doc:
>> doc legacy_code
"Kevin " <kedecuyp@mathworks.com> wrote in message
news:flvj21$41c$1@fred.mathworks.com...
> Hello,
>
> I have to use the C2000 target for a project. I *think* I am
> getting used to the simpler blocks, but now I would like to
> re-use some code I wrote on CCS before. This code should be
> called on a timer interrupt.
> How exactly can I do it? I've read that you can do it in
> Real Time Workshop, but I am still new to all this I don't
> know if I can use both RTW and the C2000 target together. Is
> it possible?
So, if I have a piece of code written in C for the C2000
that I want to call on an interrupt:
- I convert the code to a s-function using legacy_code
- I make a mdl file with the "hardware interrupt" component
and the "RTW s-function" component
Am I right?
"Matt Jardin" <mjardin@mathworks.com> wrote in message
<fm009m$fgr$1@fred.mathworks.com>...
> Are you asking if you can integrate previously-written
C-code with your new
> project? If so, you can do this using a variety of legacy
code mechanisms.
> Start with Legacy Code Tool, which you can read about in
the help doc:
> >> doc legacy_code
On Jan 8, 8:34 am, "Kevin " <kedec...@mathworks.com> wrote:
> Thank you for your answer
>
> So, if I have a piece of code written in C for the C2000
> that I want to call on an interrupt:
> - I convert the code to a s-function using legacy_code
> - I make a mdl file with the "hardware interrupt" component
> and the "RTW s-function" component
>
> Am I right?
>
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.