FX30S - Build Error - Couldn't find file 'le_avc.api'

Hi all,

I’m trying to build my apps and images in VScode (switching from windows DS) and getting this error - Couldn’t find file ‘le_avc.api’ (see attached).

I’ve seen one other post about this error but with no solution. Any help is appreciated!

Thanks!

Eddie

you can find the le_avc.api here:

owner@ubuntu:~/leaf/leaf-data/swi-wp76_4.7.0/wp76-legato$ find ./ -name "le_avc.api"
./build/wp76xx/system/binApps/qmiAirVantage/interfaces/le_avc.api
./build/wp76xx/system/binApps/atAirVantage/interfaces/le_avc.api
./interfaces/airVantage/le_avc.api
./interfaces/airVantage/legacy/le_avc.api

Thanks @jyijyi

How do I add it to my app so it won’t fail the build?

Again thanks!

Eddie

when you do the mkapp to compile the application, you need to add

-i $(LEGATO_ROOT)/interfaces/airVantage

@jyijyi,

I thought I understood how to fix this per your comments, but I haven’t been successful with it.

I’m still getting the "can’t find le_avc.api error:

VScode is not the most intuitive program to work with, so I’m having trouble finding where exactly to make the fixes you suggested.

Is there an example somewhere on forum.legato.io that shows step by step instructions on how to fix this problem? It would be very helpful!

Thanks in advance!

Eddie

Here is my example on helloworld sample:

in hello1.adef, add

bindings:
{
hello1.hello1Component.le_avc → avcService.le_avc

}

in Component.cdef, add
requires:
{
api:
{
le_avc.api
}

}

  1. leaf shell

(lsh:swi-wp76_4.7.0) owner@ubuntu:~/leaf/apps/Demo/hello1$ mkapp ${LEGATO_DEF_FILE} -s components -t ${LEGATO_TARGET} -w ${LEGATO_OBJECT_DIR} -o ${LEGATO_OUTPUT_DIR} -i ${LEGATO_ROOT}/interfaces/airVantage

Thanks.

I was able to figure out your instructions. The confusion I was having was your example was for leaf command line, and I was looking at it through VScode, which I still haven’t been able to build.

Eddie

I was entering leaf command line inside vscode

I don’t know where to change the VSCODE build command, that is why I used command line.

Does your .sdef file in vscode show the airvantage directory:

// Interfaces are searched for in the following directories. Each directory/sub-directory needs to

// be identified here for the system to find and use .api files.

interfaceSearch:

{

// Your project's search paths.

${MY_SYSTEM_DIR}/interfaces

// Legato API search paths.

${LEGATO_ROOT}/interfaces

**${LEGATO_ROOT}/interfaces/airVantage**

${LEGATO_ROOT}/interfaces/atServices

${LEGATO_ROOT}/interfaces/logDaemon

${LEGATO_ROOT}/interfaces/modemServices

${LEGATO_ROOT}/interfaces/portService

${LEGATO_ROOT}/interfaces/positioning

${LEGATO_ROOT}/interfaces/secureStorage

${LEGATO_ROOT}/interfaces/wifi

}

Then you should be giving the path to the .api file in your .cdef file requires api section as below:

// Bind resources from the target module into your application.

requires:

{

// IPC APIs used by this component.

api:

{

  airVantage/le_avc.api                 

}

@Pankaj ,

This did the trick. Once I added this to the .cdef file the error was corrected. Thanks for your help!

Regards,

Eddie