[SOLVED] mkpkg exclusion

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] mkpkg exclusion

    I have been putting together a package for Segger Embedded Studio for myself to automate creating new projects for the Ambiq Apollo3 processor-based Sparkfun Artemis and using the Ambiq SDK. However, the SDK comes will support for all Ambiq Apollo processors, as well as a number of sample projects for IAR and Keil. As these are not needed, I would like to exclude them from the final package that I make.

    According to the help built into the mkpkg command, it does have an option for specifying paths to exclude, however when I try to use the exclude argument, the paths are not being excluded. Does the exclude command not function, or am I using it incorrectly?

    Here is the command that I am using:

    Shell-Script

    1. mkpkg -c SparkFun_Artemis_Unofficial.emPackage -v.\packages\SparkFun_Artemis_Unofficial_package.xml .\SparkFun_Artemis_Unofficial -exclude .\SparkFun_Artemis_Unofficial\AmbiqSuiteSDK\boards\




  • Hello,

    Thank you for your inquiry.
    The CL option to exclude path is "-exclude path <Path>", not "-exclude <Path>".
    Does it work with the corrected CL option?

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Nino,

    I have tried as you suggested, however the folder that I specified to be excluded is still being added.

    I used the following command:

    Shell-Script

    1. mkpkg -c SparkFun_Artemis_Unofficial.emPackage .\packages\SparkFun_Artemis_Unofficial_package.xml .\SparkFun_Artemis_Unofficial\AmbiqSuiteSDK -exclude path .\SparkFun_Artemis_Unofficial\AmbiqSuiteSDK\boards -v
  • Hello,

    I gave it a quick try with the Apollo.emPackage and got it working as follows.
    The CL option is indeed -exclude <Path>, so the documentation is wrong, sorry for the confusion.

    I first extracted the Apollo package, then added a new folder /Ignorefolder to the package sources.
    The I used the following CL to create the package with that particular folder excluded:

    Shell-Script

    1. mkpkg.exe -c Apollo.emPackage ../Source/Apollo ../Source/packages -exclude ../Source/Apollo/Ignorefolder
    You can verify if it worked with option -t which lists all package contents:



    Shell-Script

    1. mkpkg.exe -t Apollo.emPackage
    Please note that I had to use forward slashes otherwise the exclude path would not work.

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Nino,

    The slashes was the problem. I switched to using forward slashes and everything works.
    That really should be fixed, as Windows uses backslashes for file paths, and pressing tab for autocomplete will change all forward slashes in a path into backslashes.
  • Hello,

    Good to hear that you are up and running again.
    I will pass the improvement request on.

    We will consider this thread as solved now.

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.