How do I fix rtiostream​_serial_c2​8x.c?

4 次查看(过去 30 天)
I am trying to run a very simple Simulink model in PIL mode. I get the following error.
"C:/MATLAB/SupportPackages/R2015b/texasinstrumentsc2000base/toolbox/target/supportpackages/tic2000_base/pil/+tic2000codertargetpil/../../src/rtiostream_serial_c28x.c", line 177: error: struct "SCIFFTX_BITS" has no field "TXFIFOXRESET".
Is there a problem with rtiostream_serial_c28x.c? or am I missing a setup parameter?

采纳的回答

DKalale
DKalale 2016-6-3
Hi John,
I actually just ran across this issue today at work. There is an error in the *.tlc file that generates the C code. Just as an FYI, I am trying to compile this for the F28377S Launchpad.
Here is the file that I had to change to get things working. Of course, some of the directory names might be different for you. C:\MATLAB\SupportPackages\R2016aPrerelease\toolbox\target\supportpackages\tic2000\tlc_c\ti_c28x_init_sci.tlc
Once in the file, I went down to line 165 (hopefully the same line in your file) and changed it to the following:
%<SciRegs>.SCIFFTX.bit.TXFIFORESET = 1; /* Re-enable transmit FIFO operation.*/
It had "TXFIFOXRESET" and after looking in TI's technical reference manual, it appears that is just a typo and the X should not be in the name... The technical reference manual is located here (I was looking on page 1929 or so):
I hope this fixes your issue. Not quite sure how to report this as a bug to Mathworks.

更多回答(1 个)

Sumith Sekharan
Sumith Sekharan 2016-6-7
Hi John,
This issue is due to the difference in the register definition for SCIFFTX_BITS in TI ControlSUITE file F2837xS_sci.h. This register definition is changed after v160 of F2837xS ControlSUITE files (For example C:\ti\controlSUITE\device_support\F2837xS\v160). Issue is fixed in latest version of support package for R2016a.
Hope this helps. Thanks, Sumith

类别

Help CenterFile Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by