Skip to main content

IAR Embedded Workbench for RX 5.20

Overriding library modules

In this section:
To override a library function and replace it with your own implementation:
  1. Use a template source file—a library source file or another template—and place a copy of it in your project directory.

    The library files that you can override with your own versions are located in the rx\src\lib directory.

  2. Modify the file.

    Note

    To override the functions in a module, you must provide alternative implementations for all the needed symbols in the overridden module. Otherwise you will get error messages about duplicate definitions.

  3. Add the modified file to your project, like any other source file.

    Note

    If you have implemented a DLIB low-level I/O interface function and added it to a project that you have built with support for C-SPY emulated I/O, your low-level function will be used and not the functions provided with C-SPY emulated I/O. For example, if you implement your own version of __write, output to the C-SPY Terminal I/O window will not be supported. See Briefly about C-SPY emulated I/O.

    You have now finished the process of overriding the library module with your version.