|Re: Generating code for specific hardware [message #1798903 is a reply to message #1798813]
||Tue, 27 November 2018 09:12
| Nicolas Hili
Registered: March 2017
I worked a bit on using Papyrus-RT for generating code for single-board computers. First of all, keep in mind that Papyrus-RT allows you to generate code for Linux systems. So, it will work out-of-the-box on your Raspberry PI. You just have to compile the Papyrus-RT RunTime Service (RTS) library first on your RPI.
About using the GPIOs of the RPI, you can use WiringPI. All you have to do is to include the corresponding header files and to modify the global configuration of your Papyrus-RT Makefile. More info here:
The first link also includes models I've created and presented.
As for non-Linux microcontrollers (e.g., Arduino), unless I am mistaken, there is for now no support for them since the RTS of Payrus-RT was designed for being executed on Linux, or under Cygwin, and Vagrant. Two options:
- Your Arduino plays the role of "slave" in a "master-slave" communication where the master is a Linux-powered board (e.g., Raspberry PI). In that case, you can use Papyrus-RT to generate code on the master, and write Arduino code for your Arduino. Include WiringPI or other libraries in your model in order to communicate through I2C, SPI or other protocols;
- You want to generate code for your Arduino directly. In that case, you have to build a minimalist RTS for your Arduino, and to generate code from Papyrus-RT using your preferred M2T technology. I used not long ago Acceleo to generate code on bare metal, I can give you pointers to do it if necessary.
Powered by FUDForum
. Page generated in 0.02244 seconds