This content has been marked as final. Show 2 replies
I doubt that linker adds code as files, it adds them as functions. Anyways please create a tech support case so that this can be discussed properly and in detail.
GCC can be instructed to remove unused functions and data elements from the final executable. You should make sure to include --gc-sections in your linker flags, and -ffunction-sections and -fdata-sections in the compiler flags. All three of these are checkboxes in the Eclipse C/C++ Build properties for the project. (-ffunction-sections and -fdata-sections under Settings/Tool Settings/ARM Sourcery Windows GCC C compiler/Optimization, and --gc-sections under ARM Sourcery Windows GCC Linker/General). I do not know of a way to strip anything further out of the closed-source .a file supplied by Cypress.