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.

NDK: Removing miniprinf library using XDC config?

Other Parts Discussed in Thread: OMAP-L138

Hello,

I am using CCS5.1, ndk_2_21_00_32 and xdctools_3_23_00_32.  I am building against the OMAP-L138 (c674).

By using the NDK Global module (ie "var NDK = xdc.useModule('ti.ndk.config.Global');") my application automatically links against the miniprintf library.  From spru523h.pdf:

The MiniPrintf library provides printing functions with a small code size to help keep the application's
footprint small. These are packaged into a separate library, so you can use either the full-fledged RTS
printing functions provided with the Code Composer Studio or the small functions included with the
MiniPrintf library.

My question is how do I modify my XDC configuration file to remove this "miniprintf.lib"?  Or alternatively, how can I make the standard rts library link first!

Thanks,
-David
  • Hi David,

    Currently you can't remove the miniprintf module from the NDK.  This is a known issue and there is a bug open to get it fixed:

    SDOCM00082199 NDK needs to make miniPrintf option

    You may be able to play with the link order in your projects build settings (under linker options) in order to get the standard library link first.

    Steve

  • Steve,

    Thank you for your response.  I tried playing with the linker options to cause the full printf version to be linked first.  I was unsuccessful.

    In the end I copied the NDK specific code from the generated "_pe*.c" file into a new source file I which I added to my project.  I then manually added the cfg script to add the NDK stack startup thread to my application:

    Task.addHookSet ({ registerFxn: '&NDK_hookInit', createFxn: '&NDK_hookCreate', });
    var params = new Task.Params;
    params.instance.name = "NDK";
    params.priority = 5;
    params.stackSize = 0x2000;
    Task.create('&ti_ndk_config_Global_stackThread', params);

    Then I updated my project settings to link against the specific NDK libraries that pertained to my processor (I used the linker.cmd file as a guide since it listed out all the libraries for me).  I wish there was an easy way to do this from the cfg file rather than having to edit the project settings.

    And then I removed the NDK references from my cfg file.  This strategy worked for me to get a quick app up and running with network support.

    Thanks,

    -David