Post Go back to editing

mcapi yocto recipe is broken

I've been attempting to use MCAPI to converse with the SHARC+ cores on an SC589.

The recipe for libmcapi.so doesn't publish header files so you can't actually compile anything with it.

But after a trivial patch, I still can't get a simple program to link using a yocto recipe.  Either my linking with `-lmcapi` isn't right, or there's something else required because I only get "undefined reference to `mcapi_initialize'"

Has anyone ever actually used a yocto built arm mcapi application to talk to a SHARC+ core?

diff --git a/meta-adi-adsp-sc5xx/recipes-icc/libmcapi/libmcapi.bb b/meta-adi-adsp-sc5xx/recipes-icc/libmcapi/libmcapi.bb
index db41169..a503400 100644
--- a/meta-adi-adsp-sc5xx/recipes-icc/libmcapi/libmcapi.bb
+++ b/meta-adi-adsp-sc5xx/recipes-icc/libmcapi/libmcapi.bb
@@ -29,9 +29,14 @@ do_compile_prepend(){
 
 do_install(){
        install -d ${D}/usr/bin
-       install -d ${D}/usr/lib 
+       install -d ${D}/usr/lib
+       install -d ${D}/usr/include
        install -m 755 ${S}/tests/.libs/* ${D}/usr/bin/
        install -m 755 ${S}/.libs/libmcapi.so.0.0.0 ${D}/usr/lib/
-       ln -s libmcapi.so.0.0.0 ${D}/usr/lib/libmcapi.so.0 
-       ln -s libmcapi.so.0.0.0 ${D}/usr/lib/libmcapi.so 
-}
\ No newline at end of file
+       ln -s libmcapi.so.0.0.0 ${D}/usr/lib/libmcapi.so.0
+       ln -s libmcapi.so.0.0.0 ${D}/usr/lib/libmcapi.so
+       install ${S}/include/*.h ${D}/usr/include
+}
+
+FILES_${PN} += "/usr/lib/* /usr/bin/*"
+FILES_${PN}-dev += "/usr/include"



spelling
[edited by: rireland at 7:03 PM (GMT -5) on 25 Jan 2022]