I am trying to make a SW developped with Metrowerks/Hiware on HC05 to work with 8051. The SW currently needs around 60kb, is very modular and has many options and customizations depending on the customer requirement. In Metrowerks case, the linker has smart linking possibility: The linker file is *.PRM and list the objects files to link. If the object file is followed by a "+", all the functions, constant, variables will be placed and mapped in the MCU. (like KEIL) If there is no "+", the linker will REMOVE automatically functions, rom strings, ram global variables AUTOMATICALLY. The linker tree dependencies can also manage constant function pointers. Is there a way to do something similar and automatic in KEIL environment? Otherwise, the cumbersome way is to wrap all C functions like this: #ifdef My_Function void My_Function(void) { ... } #endif And in the header file, comment out the function declaration.... making the source code less readable. Ideas? Tricks? Thanks!