Extending LMI's examples to use C library functions

Most, if not all, of the TI/Luminary example code bundles do not make use of functions from the C library, and the supplied linker script files provide no references to the C library archive files.

Thus if you extend one of these examples to use functions from the C library, you are likely to encounter linker errors similar to undefined reference to <lib_func>

In this case, you will need to manually modify the linker script file (*.ld) provided in the TI / Luminary example project to include a reference to the appropriate C library archive files, using a GROUP command. This reference will need to be placed before the MEMORY section.

The GROUP command required will depend on which C library (Redlib or Newlib) that you are linking with. For more details please see the FAQ Switching the selected C library.

Note that if you create a project using the New Project Wizard, and leave the managed linker script mechanism enabled, then this will include appropriate C library GROUP references in the auto-generated linker script files.

LmiExamplesWithCLib (last edited 2010-12-21 08:40:49 by CrSupportAb)