Post Go back to editing

Qt project with mcapi

Hi! I want to include MCAPI library in my Qt project. What should I do to make this?

I copied mcapi 2.0 headers into myproject/mcapi folder and append INCLUDEPATH += $$PWD/mcapi into .pro file. Also I appended DEPENDPATH += $$PWD/mcapi and unix:!macx: LIBS += -L$$PWD/mcapi/ -lmcapi. But I get error

mainwindow.o: In function `MainWindow::on_pushButton_2_clicked()':

../myproject/mainwindow.cpp:(.text+0x134): undefined reference to `mcapi_initialize(unsigned int, unsigned int, attributes_t const*, int const*, mcapi_info_t*, unsigned int*)'

collect2: ld returned 1 exit status

  • Hi, we have a set of test application that use the MCAPI, you can try to take it as reference and implement your application. At first enable the following items in the buidlroot menuconfig and build

    1) make linux-menuconfig -> device drivers -> staging drivers -> icc driver

    2) make menuconfig -> target packages -> Miscellaneous -> bfin inter-core communication support 

    3) make menuconfig -> target packages -> libraries -> other ->libmcapi

    after that you will have the source files for core A Linux:


    for core B bare metal:


    One example is output/build/libmcapi-931/libmcapi-2.0/tests/msg1.c as the test application on core A, with it's counterpart output/build/icc-930/example/task/mcapi_msg1.c on core B.

    Another example is output/build/libmcapi-931/libmcapi-2.0/tests/bmp2jpg.c on core A, and output/build/icc-930/example/task/cjpeg.c on core B

  • You can use the mcapi library generated by our test framework, by enabling the items mentioned above, instead of copy the source. In buildroot the header and library will be in the following path, that you can use to include and link:

    header:  output/staging/usr/include/mcapi-2.0

    lib: output/staging/usr/lib/libmcapi* 

  • I can compile simple examples like "msg1" with linking library from output/staging/..., but Qt project don't want to link library.

    May be this library can be used only in C-projects and not in C++ projects?

    By the way, there is a problem in file mcapi_impl_spec.h - at line 110. I have to comment the word "extern" to successfully compile my program.

    #ifdef __cplusplus

    extern }

    #endif /* __cplusplus */

  • By "Qt project don't want to link library" do you mean you have tried to link lib generated in output/staging/usr/lib/libmcapi* as I recommended earlier and you are having issues by doing this? Could you elaborate how you did that, with proper code/patches, and attach the detailed error log too?

  • Have you got Qt and mcapi working on BF609?  You will see that I am trying to get mcapi working (and so far failing!) with the intention of getting Qt and mcapi working too.

  • Don't worry we will try what we can help to remove your blockings.

  • I happen to be working with a QT + mcapi demo project recently too. The will be an extra Linux application that will be invoked by the event like clicking a button on QT, this application will include MCAPI in it, to communicate with another core running bare-metal, and this Linux app is quite the same like our existing mcapi msg test code in Linux.

  • Hi !

    Can you please provide us explanation how your Qt application interact with mcapi-app? Did you try to link mcapi functionality directly into Qt app instead of using another mcapi application?

    I will have to send an array of ADC samples from core B (CCES) to core A (uClinux) and I want to know which is the best way to do this.

  • Hi, do you mind describing your final goal, your required function in more details (like do you also expect control data from Linux core A to CCES coreB? And what's the ADC data bandwidth do you require? ) so I'll try to see if I can share some idea?

    Could you do this by opening a new thread? So we can have a clearer track and benefit other readers as well.

  • > I want to include MCAPI library in my Qt project. What should I do to make this?

    I should not use MCAPI at all.