Multiple TopDesign for different boards using the same firmware

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Roger
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

Hi,

I've developed three boards with a different pinout, let's say one board has an RTD in pins P0[3], P0[4], and P0[7] in one board. The other board has the same RTD, but is connected in pins P4[2], P4[3], and P4[4], is there a way to have two different TopDesigns in the same project and compile the project two times, disabling the page that I don't want to be compiled automatically? Maybe a script to select the files (but I don't know how to call PSOC creator from the terminal with specific files)?

Thanks

0 Likes
1 Solution
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

RoAl,

I did something similar for two different CPUs but sharing the same code.

The simplest way to do this is to first create a successful project with one of the CPUs.

Follow these steps:

  1.  Copy and Paste this project into the same Workspace.
  2. Rename the copied project to something more appropriate
  3. In the new project, delete the files in
    1. "Header Files"
    2. "Source Files"
  4. In the new project, right-click on "Header Files" and select "Add/Existing Item...".
    1. Multi-select all the .h files in the root of the original project.  This causes these files to be shared between projects.
  5. In the new project, right-click on "Source Files" and select "Add/Existing Item...".
    1. Multi-select all the .c files in the root of the original project. This causes these files to be shared between projects.
  6. Right-click on the new project and select "Device Selector..."
    1. Chose the new CPU for this project.
  7. Select the new project "TopDesign" file and make any changes needed for this CPU.
  8. Select the new project "DWR/Pins" to select the project appropriate pins.
  9. Make any design changes needed for the new CPU. 
  10. Make conditional compile changes to code and header files as appropriate for the CPU.  You will have to go back to the older project to verify that the conditional compiles you make are still correct for that project.

 

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

6 Replies
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @Roger

PSoC Creator does allow you to create multiple schematic pages within the TopDesign file. You can choose to disable or enable these pages individually. Can you please let us know if this is what you are looking for? Please refer to Using Multiple Pages and Connectors Section (page 181) of the PSoC Creator User Guide.

However, you can only have a single Design Wide Resources file in which you allocate the appropriate pins.

Thanks and Regards,
Rakshith M B
0 Likes
Roger
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

Hi,

This procedure is what I'm doing right now, and the main problem I'm facing is that I need to enable and disable the TopDesign every time and change the pins accordingly. And I wanted to know if there is a way to do it automatically (having to files with two pins definitions and selecting one or the other ).

0 Likes
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

RoAl,

I did something similar for two different CPUs but sharing the same code.

The simplest way to do this is to first create a successful project with one of the CPUs.

Follow these steps:

  1.  Copy and Paste this project into the same Workspace.
  2. Rename the copied project to something more appropriate
  3. In the new project, delete the files in
    1. "Header Files"
    2. "Source Files"
  4. In the new project, right-click on "Header Files" and select "Add/Existing Item...".
    1. Multi-select all the .h files in the root of the original project.  This causes these files to be shared between projects.
  5. In the new project, right-click on "Source Files" and select "Add/Existing Item...".
    1. Multi-select all the .c files in the root of the original project. This causes these files to be shared between projects.
  6. Right-click on the new project and select "Device Selector..."
    1. Chose the new CPU for this project.
  7. Select the new project "TopDesign" file and make any changes needed for this CPU.
  8. Select the new project "DWR/Pins" to select the project appropriate pins.
  9. Make any design changes needed for the new CPU. 
  10. Make conditional compile changes to code and header files as appropriate for the CPU.  You will have to go back to the older project to verify that the conditional compiles you make are still correct for that project.

 

Len
"Engineering is an Art. The Art of Compromise."

I haven't thought of this approach, I'll try and I'll get you back with my results.

0 Likes

Hi,

I've tried this solution you proposed and I get something quite similar to what I was expecting.  I've also added the command (cmd /c copy ${OutputDir}\${ProjectShortName}.hex ${ProjectDir}\..\firmware_builds\) in Post-Build User Options so I get all the builds in one folder.

0 Likes

Roger,

Excellent!  👍

Len
"Engineering is an Art. The Art of Compromise."
0 Likes