How do I fix rtiostream_serial_c28x.c?
조회 수: 4(최근 30일)
표시 이전 댓글
John Bledsoe 2016년 1월 19일
답변: Sumith Sekharan 2016년 6월 7일
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 2016년 6월 3일
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.
Sumith Sekharan 2016년 6월 7일
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
Find more on Verification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!