This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

library dependency checking

I have a project building from the command line using xdc.  I am running into problems getting changes in one of my library packages to trigger my executable package to rebuild.  I tried using a require statement in my executable's .xdc file as well as xdc.loadPackage in the .cfg file.  Both returned the following error:

 

js: "./core0_main.cfg", line 1: xdc.services.global.XDCException: xdc.PACKAGE_NOT_FOUND: C:\CodeProjects\dev\DEV_MAIN\sw\dsp\src_rtsc\srcinc\packages\common\messaging\package.xdc found along the package path, but no schema file was found.  Ensure that the package 'packages.common.messaging' is completely built.

 

I verified that my messaging package is built.  It results in a .a64P file.  I guess I am confused about the schema file it is referring to.

 

Thanks,

Kevin

  • Kevin,
    what's your XDC command line? Check the docs for the xdc command here: http://rtsc.eclipse.org/docs-tip/Command_-_xdc. If you want to rebuild dependent packages, you need the option -D.

    Also, verify that the package name in package.xdc in packages.common.messaging is the same as the name you are using in the require statement. If all that fails, let me know the version of the XDCtools you are using, and I'll see if I can replicate the problem.

  • I am using -PR which just recursively builds everything in my source tree.  Is it possible to get smart dependency checking using this option, or do i need to use -PD and explicitly list the packages to build?

     

    Again, my intent is to get my executable to rebuild if the library it depends on is rebuilt.  I am using xdc tools 3.20.08.88

    Also, the path to my library package is correct.  The error states that it found the package, it just couldnt find some schema file

     

  • Is the package 'packages.common.messaging' in your source tree, which you are building with -PR? If it is, the library in that package is built before any of the executables that could use that library are being built. If the package is outside of the source tree, then -PR will not rebuild that package automatically. But you can always list more than one directory after -PR to get all libraries in these directories built first.

    The error message you are seeing happens when the file packages/common/messaging/package/packages.common.messaging.sch is not found. If that file exists, but you are still getting that error message, there could be a bug in XDCtools. We had some similar cases before, and they were usually related to a specific organization of your directories. That's why I am asking where is  'packages.common.messaging' located relatively to your source tree.

    Finally, if your goal is to rebuild an executable when one of the linked libraries changes, that's already handled by XDCtools, once the package with the executable is built successfully. Then, if you change the library package, and then run the xdc command in the package with the executable, xdc will not rebuild the package from the scratch. It will only relink the executable. 

  • I found the problem.  My actual directory structure looks like this

     

    BoardName/packages/common/messaging

    I am running xdc from the BoardName directory, so when i reference my package names i need to use that as a root.  This looks like packages.common.messaging.

    Now, in the xdc file for my messaging library, I called out BoardName.packages.common.messaging.  This is technically correct, but it creates file names in the packages/common/messaging/package/ folder with BoardName on the front.  This clashes with package names I specify which does not include BoardName on the front.

    So, I probably explained that poorly, but simply taking BoardName out of my package name in the xdc file resolved the problem.