All of lore.kernel.org
 help / color / mirror / Atom feed
* Qt application on Xenomai
@ 2019-03-01  8:40 Sumitabh Ghosh
  2019-03-01 12:32 ` Henning Schild
  0 siblings, 1 reply; 8+ messages in thread
From: Sumitabh Ghosh @ 2019-03-01  8:40 UTC (permalink / raw)
  To: Xenomai

Hi,

I have a generic question not specific to any platform. If I want to run a
small graphics application on Xenomai 3.x what would be the correct
approach. e.g. Qt application framework which needs POSIX apis and a linux
frame buffer to be able to render 2D applications.

Kindly provide me some pointers.

Thanks in advance.

Cheers!
Sumit

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Qt application on Xenomai
@ 2019-04-03 12:10 demon.han
  2019-04-04  0:39 ` Alec Ari
  0 siblings, 1 reply; 8+ messages in thread
From: demon.han @ 2019-04-03 12:10 UTC (permalink / raw)
  To: xenomai

Hi, Stéphane 
I want to compile RT-task with QT-5.8-linux.
The application build well,but the app break when I run it.
Here are some mesg:
[ 1856.686076] xenomaipro[22438]: segfault at 7ffea0117ff8 ip 00007fef26a3ae17 sp 00007ffea0118000 error 6 in libcobalt.so.2.0.0[7fef26a2f000+1f000]

I can find the program break when it runs : rt_task_create().
How can I fix this? I think the .pro is something missing, but can you fix it please? Many thanks!

My platform is ubuntu16 、linux4.4 and xenoam 3.0.5,using QT 5.8.

My qt project:
main.c:
#include <QCoreApplication> #include <stdlib.h> #include <math.h> #include <stdio.h> #include <string.h> #include <errno.h> #include <sched.h> #include <time.h> #include <unistd.h> #include <signal.h> #include <alchemy/task.h> #include <alchemy/timer.h> RT_TASK task; static void latency(void *cookie) { RTIME start_ns; int ret; start_ns = rt_timer_read() + 1000000; ret = rt_task_set_periodic(NULL, start_ns, 10000000); if (ret) { printf("rt_task_set_periodic error\n"); return; } while(1){ rt_task_wait_period(NULL); printf("0\n"); } } int main(int argc, char *argv[]) { int ret; QCoreApplication a(argc, argv); ret = rt_task_create(&task, "task_name", 0, 99, 0); //break here!!! if (ret) { printf("rt_task_create error\n"); return 0; }
ret = rt_task_start(&task, &latency, NULL); if (ret) { printf("rt_task_start error\n"); return 0; } return a.exec(); }


and .pro is:
QT += core
QT -= gui

CONFIG += c++11

TARGET = xenomaipro
CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app

SOURCES += main.cpp

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
#LIBS += -L/usr/xenomai/lib -lalchemy -lanalogy -lcobalt -lcopperplate -lmodechk -lpsos -lsmokey -ltrank -lvxworks -lpthread -lrt
INCLUDEPATH += /usr/xenomai/include
INCLUDEPATH += /usr/xenomai/include/cobalt

unix:!macx: LIBS += -L$$PWD/../../../../usr/xenomai/lib/ -lalchemy

INCLUDEPATH += $$PWD/../../../../usr/xenomai/include
DEPENDPATH += $$PWD/../../../../usr/xenomai/include

unix:!macx: PRE_TARGETDEPS += $$PWD/../../../../usr/xenomai/lib/libalchemy.a

unix:!macx: LIBS += -L$$PWD/../../../../usr/xenomai/lib/ -lcobalt

INCLUDEPATH += $$PWD/../../../../usr/xenomai/include
DEPENDPATH += $$PWD/../../../../usr/xenomai/include

unix:!macx: PRE_TARGETDEPS += $$PWD/../../../../usr/xenomai/lib/libcobalt.a


unix:!macx: LIBS += -L$$PWD/../../../../usr/xenomai/lib/ -lanalogy

INCLUDEPATH += $$PWD/../../../../usr/xenomai/include
DEPENDPATH += $$PWD/../../../../usr/xenomai/include

unix:!macx: PRE_TARGETDEPS += $$PWD/../../../../usr/xenomai/lib/libanalogy.a

unix:!macx: LIBS += -L$$PWD/../../../../usr/xenomai/lib/ -lcopperplate

INCLUDEPATH += $$PWD/../../../../usr/xenomai/include
DEPENDPATH += $$PWD/../../../../usr/xenomai/include

unix:!macx: PRE_TARGETDEPS += $$PWD/../../../../usr/xenomai/lib/libcopperplate.a

unix:!macx: LIBS += -L$$PWD/../../../../usr/xenomai/lib/ -lmodechk

INCLUDEPATH += $$PWD/../../../../usr/xenomai/include
DEPENDPATH += $$PWD/../../../../usr/xenomai/include

unix:!macx: PRE_TARGETDEPS += $$PWD/../../../../usr/xenomai/lib/libmodechk.a

unix:!macx: LIBS += -L$$PWD/../../../../usr/xenomai/lib/ -lpsos

INCLUDEPATH += $$PWD/../../../../usr/xenomai/include
DEPENDPATH += $$PWD/../../../../usr/xenomai/include

unix:!macx: PRE_TARGETDEPS += $$PWD/../../../../usr/xenomai/lib/libpsos.a

unix:!macx: LIBS += -L$$PWD/../../../../usr/xenomai/lib/ -lsmokey

INCLUDEPATH += $$PWD/../../../../usr/xenomai/include
DEPENDPATH += $$PWD/../../../../usr/xenomai/include

unix:!macx: PRE_TARGETDEPS += $$PWD/../../../../usr/xenomai/lib/libsmokey.a

unix:!macx: LIBS += -L$$PWD/../../../../usr/xenomai/lib/ -ltrank

INCLUDEPATH += $$PWD/../../../../usr/xenomai/include
DEPENDPATH += $$PWD/../../../../usr/xenomai/include

unix:!macx: PRE_TARGETDEPS += $$PWD/../../../../usr/xenomai/lib/libtrank.a

unix:!macx: LIBS += -L$$PWD/../../../../usr/xenomai/lib/ -lvxworks

INCLUDEPATH += $$PWD/../../../../usr/xenomai/include
DEPENDPATH += $$PWD/../../../../usr/xenomai/include

unix:!macx: PRE_TARGETDEPS += $$PWD/../../../../usr/xenomai/lib/libvxworks.a


demon.han@aliyun.com

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Qt application on Xenomai
@ 2019-04-04  1:50 demon.han
  0 siblings, 0 replies; 8+ messages in thread
From: demon.han @ 2019-04-04  1:50 UTC (permalink / raw)
  To: xenomai

Hi, Alec

Sorry for my confused email.
The src files are in mail-attachment now.
Many thanks for your quick response!!

demon.



demon.han@aliyun.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xenomai.pro
Type: application/octet-stream
Size: 3323 bytes
Desc: not available
URL: <http://xenomai.org/pipermail/xenomai/attachments/20190404/309a14ef/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: application/octet-stream
Size: 1065 bytes
Desc: not available
URL: <http://xenomai.org/pipermail/xenomai/attachments/20190404/309a14ef/attachment-0001.obj>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-04-04  1:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-01  8:40 Qt application on Xenomai Sumitabh Ghosh
2019-03-01 12:32 ` Henning Schild
2019-03-02  5:57   ` Sumitabh Ghosh
2019-03-04  7:55     ` Stéphane Ancelot
2019-03-04  8:38       ` C Smith
2019-04-03 12:10 demon.han
2019-04-04  0:39 ` Alec Ari
2019-04-04  1:50 demon.han

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.