cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC Creator & Designer Software

KyTr_1955226
Contributor II

Hello!

I had a couple questions about PSoC Creator features regarding configurations.

As I'm sure we're all familiar with, a workspace in Creator gives you two configurations to play with.  Release and Debug.  I was hoping it may be possible to add more configurations to the list to enable/disable features for specific builds.

For example I have two firmwares written for PSoC 5 that are extremely similar, but not identical and have slightly differing code depending on the target board.

I've run into this in say, MPLAB X and I can add preprocessors to a custom build configuration, and simply #ifdef the preprocessor to disable/enable different blocks of code.  I can't seem to find anything similar in Creator.

Related to this, it would also like to be able to enable/disable hardware components via the same method.  The current project I'm working on has a single target board, but depending on what's plugged in will require differing PSoC hardware components.  What I'd like to do is place the different configurations of the hardware in their own pages and Disable/Enable them programmatically.  Ideally I'd like to toggle which pages are enabled/disabled via a preprocessor define, which I could change depending on in each build configuration.

It looks like item #7 in this thread gets me close: Are these rubbishy ideas?  but not quite all the way there.  The only missing piece is being able to add custom build configurations.

Is there anything currently in the Creator feature set (or upcoming) that would let me add a custom configuration?  These two hardware configs are so similar I'd like to avoid to have to maintain two different repositories.  I'd much rather be able to select what I'm building for via custom configuration and keep it all in one project.

Thanks in advance for any tips!

0 Likes
Reply
1 Solution
RodolfoGL
Employee

To address the multiple configuration scheme.

You could create multiple projects in the workspace that share the same code, so you will be entitled to have separate configuration on the same firmware.

View solution in original post

6 Replies
AnkitaS_51
Employee

Hi,

Presently, there is no feature in PSoC Creator to add a custom configuration other than Debug and Release.

Regards,

Ankita

0 Likes
Reply
KyTr_1955226
Contributor II

Any plans to add it as a feature in the future?  I'm shocked it isn't already a part of Creator.

Furthermore, is it at all possible to Enable/Disable hardware pages via pre-processor or a script or any other automated method? 

I see I can use:

#ifdef Page_2__DISABLED

If I want different code to fire based on if a page is currently disabled, but what I'm looking for is to disable/enable pages based on which target environment I am building for.

0 Likes
Reply
odissey1
Honored Contributor II

I am curious, if there the opposite directive, like

#ifdef Page_2__ENABLED

There are typically several disabled pages and only one enabled, so the logic must be the opposite.

/odissey1

0 Likes
Reply
KyTr_1955226
Contributor II

Wouldn't determining if a page is enabled just be as simple as:

#ifndef Page_2__DISABLED

?

0 Likes
Reply
RodolfoGL
Employee

To address the multiple configuration scheme.

You could create multiple projects in the workspace that share the same code, so you will be entitled to have separate configuration on the same firmware.

View solution in original post

KyTr_1955226
Contributor II

Multiple Projects in one workspace is probably the route to go for what I'm trying to do.

Thanks for the suggestion!

0 Likes
Reply