It is working for me just the other way: I am using an #ifdef and checking for the symbol created in the component's .h file as
found in generated .h
I check for
... code for my UART
I am quite sure that it cannot work the other way by having conditionals in the C source to activate / de-activate components.
The reason is that the fitter (which instanciates the components) is run first, then the code generation step comes and at last the compiler (where your wanted #defines must reside) reads all the stuff.
Thank you Bob. I am a bit confused, which should not be much of a surprise. This is from the Component Author Guide:
CY_REMOVE: This parameter is a flag to the elaborator, which tells it to remove the instance
from the netlist. It works in conjunction with the live mux to allow Component
authors to dynamically switch between two different implementations of a
Component in a single schematic. The default value is false (that is, keep the
I am trying to grasp its use. What is a "live mux"?
Edit: May be best would be if there is an example project to see it.
1 of 1 people found this helpful
The term "live mux" probably refers to the "Virtual Mux" components. these can be used to make connections selected at design time using parameters. These virtual muxes do not use any hardware. So you can imagine you are using a SD ADC or an SAR depending on a parameter set. This is something for the component designers.
I think I got it. I may give it a try one day.
You are always welcome.
I tried the virtual mux ! I have been working on this one project, having to set a "1" or a "0" on a wire for tests. I just dropped in a virtual mux and fed it with a "1" on pin 1 and a "0" on pin 0. Then I can just click on the component and select the one I want. Trivial but cool !