I'm trying to build a ProcessorExpert project that can generate configuration code for each member of the S32K14x family on the same LQFP package. Since the only difference between these microcontrollers is their memory size, I expect that the only difference in the code generated from the ProcessorExpert peripheral components be in including the specific device files (e.g., system_S32k144.h).
I have created one configuration for each S32K14x member in which the corresponding peripheral components are enabled and have the same name and content of the disabled peripheral components of other configurations. The only difference in each configuration is the processor component which has a specific name (e.g., cpu144.h). In this way, the generated adc.h file of config144 includes cpu144.h which then includes system_S32k144.h. However, when generating code for config142, adc.h now includes cpu142.h instead of cpu144.h.
Is it possible to make ProcessorExpert generate code that can be conditionally built according to the configuration for this use case?
I saw that ProcessorExpert can generate code with the PEcfg_[ConfigurationName] symbol but in this application this is not the case. I need to have this conditionally built code either in the headers generated from the peripheral components or in the header of the processor component (if named with a common name for all configurations).
What would be the right approach to solve this?