Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Papyrus-RT/User/User Guide/Tips

< Papyrus-RT‎ | User‎ | User Guide
Revision as of 10:19, 20 July 2017 by Charles.zeligsoft.com (Talk | contribs) (Reorganized into sub-sections, added warnings for Windows)

PapyrusForRealTime-Logo-Icon.png




Tips & Tricks




Overview

This page contains usage tips and tricks for Papyrus for Real Time.

Modeling

Logging

You may know that Papyrus-RT provides a logging mechanism, the "Log" service, that can be used within your model to output information from you model. By default, this information is sent to the standard error output, e.g., "stderr." So to see the output of the log, you can simply run your application from the command line and look at the output, e.g.,

./MyApp

You can also redirect the output to a file:

./MyApp >& myAppLog.log

You can also turn this on programmatically, in cases where you can not change the command line, e.g., for an application running on an embedded platform or if you want to selectively log parts of the execution.

This is done by using the "redirect" method (message) on the port:

log.redirect("mylog.log"); (where ""mylog.log" is the name of the file where the log will be written.)

Note.png
Note
This will redirect logging, but only for that specific log port. Other log ports will not be affected.


Code generation, building, and running

Warning2.png
Building with Cygwin (Windows)
When building generated code on Windows with Cygwin, users must install and use cmake from Cygwin, rather than CMake from https://cmake.org, otherwise the build fails with several CMake errors, such as being unable to load several of the RTS .cmake files even if they exist and are in the correct location. See bug 519052 for more information.
Bug519052
Warning2.png
Cygwin and MingW (Windows)
We have received reports of potential conflicts between MinGW and Cygwin compilers when installed separately in the same environment. As we use Cygwin for our testing, we recommend that users install only Cygwin and ensure that the Path environment variable correctly to point to the Cygwin 'bin' directory. See bug 519052 for more information.
Bug519052

Back to the top