How to remove linked resource in Eclipse project

I have a project that is derived from one of the RSL10 CMSIS-Pack Examples. I would like to customize the RTE/Utility/printf.c file, so I have made a copy of it and located it in my local directory structure appropriately (i.e., next to the SEGGER_RTT_Conf.h file in RTE/Utility).

I then went into the Eclipse project Properties dialog, selected Resources->Linked Resources and deleted printf.c in the Linked Resources tab. So far, so good - my version of the file shows up instead of the one referenced in the ONSemi CMSIS Pack directory. However, as soon as I perform a refresh on the project (either manually, or as byproduct of launching Eclipse), the previously deleted Linked Resource of printf.c re-appears and is pointing at the ONSemi CMSIS Pack file. I have also tried converting the linked resource, using a relative path variable (PROJECT_LOC/RTE/Utilities) with the same result.

How do I permanently delete this link so the project utilizes my printf.c? What file/configuration is responsible for reverting to this “hard-coded project config”?

Hi @mbianchi,

Please note that the PDSC file for the specific CMSIS pack will automatically define which files to import and which Include/Library directories and files to link. Therefore, once the project is refreshed it will automatically replace anything have changed or removed.

You have 3 options to address this:

  • (Not Recommended) Change the CMSIS Packs PDSC file to automatically import your version of the print implementation instead of our provided one. This file is written in a specific HTML like format that you will need to learn if you wish to change which files are imported, and will also affect every project within the pack.

  • Within the CMSIS Pack installation directory, rename the default printf file (ie. printf_backup) and place your custom printf file in the same location with the same name. This will ensure that every new project you import from the CMSIS Pack will automatically import and include your version of the file.

  • Disable the printf utility option within the ‘.rteconfig’ project file and import all of the necessary files and components manually. This will prevent the project from automatically importing and including all of the default printf files, allowing you to manually add your own as required.

Thank you for using our Community Forum.