- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everybody,
is it somehow possible to control the components on the Schematic Page via defines?
E.g. for one project I would need some pins to use them for an LED shift register and
in another project I would like to use an SPI controlled Touch Display.
Can I place both components in my design and enable/disable them via define?
Including the generated code, the pin definitions and so on?
Thanks and best regards
Andreas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may only enable/disable the component itself. Then you can use conditional compilation (#ifdef) to generate the code within your project. I tried that and this method works perfectly.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob,
thanks, I did that too, works fine so far, but a more automatic way would be nice if I have more
different projects with different components and a common base code...
This is quite similar to comment out each file before a compile instead of using define switches 😉
Andreas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I agree with you But manual commenting parts of your program is more prune for errors than disabling a component on one of the Top Design pages. There are plenty of #defines in the component.h file which you may use in an #ifndef instruction.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So, there would be no such thing as dynamic reconfiguration in PSoC 3?
Regards,
George
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So, there would be no such thing as dynamic reconfiguration in PSoC 3
Probably not.
You could us a bootloader with two different projects. A bit flash-consuming, but would work when really needed.
Bob