Create Window on Linux Desktop via Simulink/Embedded Coder

2 ビュー (過去 30 日間)
Jason Muller
Jason Muller 2016 年 8 月 4 日
I am using Simulink to build an executable program intended to run on a Linux target. (The specific target is Beaglebone Black, via Embedded Coder, firmware Debian 7.9). I would like my program to create a display window on the Linux desktop on the target upon initialization. Inside the window would be text & numerical values. Then during operation the numerical values would be continuously updated, based on inputs read from the I/O pins. I am wondering if anyone can recommend the best way to approach this problem.
One way might be to use the "SDL Video Display" block included in the Beaglebone Black Block Library. This block is already setup to render a display window onto the target desktop. However it takes planar video data as its input. I am not quite sure how to create such a video data stream containing my text and numbers.
Another way might be to write a user defined S-Function Block, and inside call some graphics library with C bindings such as GTK+ or Qt to create/update the display window. However it seems like the basic structure of such graphics toolkits make them difficult to integrate into the Simulink generated target code. They seem intended to operate as the main loop of a program, blocking indefinitely and waiting for events to occur. I would rather my Simulink-generated code be the main loop, calling the graphics library only as a subroutine to update the display window values.
If anyone has any experience with this and could point me in the right direction, I would be very grateful.

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by