Is it possible to compile serial port objects with the MATLAB Compiler?

3 views (last 30 days)
I am using MATLAB to access my serial port. I now want to compile my application to a stand-alone executable with MATLAB Compiler. However, I receive errors when I attempt this.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 17 Feb 2021
Edited: MathWorks Support Team on 17 Feb 2021
MATLAB Compiler 4.0 (R14) is able to compile serial port objects as stated here:
Previous versions of the MATLAB Compiler did not support the compilation of objects, and the serial port communications in MATLAB use objects.
As a workaround, you can download the CPORT MEX-file from MATLAB Central File Exchange and use that in your application instead. Some users have reported success with this function:
Note that MathWorks does not guarantee or warrant the use or content of these submissions. Any questions, issues, or complaints should be directed to the contributing author.

More Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!