Compile for mutiple targets

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

cross mob
user_4495571
Level 2
Level 2
5 replies posted 10 sign-ins 5 questions asked

Hi,

I need to compile with PSoC Creator 4.4 for mutiple PSoC 5 controllers.

We use, due to delivery problems I guess, different variants of the same controller. (CY8C5888, CY8C5867..)

Now I need to change the controller under Project/Select Device and build the project, saving the hex file, go to Project/Select Device ......

I need to do this four times at least.

Is it possible to build for multiple targets in on step?

Via make file(s) e.g.?

Thanks!

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

user_4495571,

When I want to create the same app for multiple targets, I create all the .c and .h files in the first target CPU project and get it working.

Steps:

  1. Copy the working project.
  2. Paste the copy into the workspace.  
  3. Repeat 3. for each new project needed to support the additional IC part numbers.  This copies ALL project elements (source code, TopDesign, DWR parameters)
  4. (Optional) Rename the new projects to make some sense.
  5. Select a different PSoC IC for each of the new projects using "Device SelectLen_CONSULTRON_1-1661558065144.png
  6. At this point, each project should have all the elements to build.  Due to the selection of a different PSoC part #, it might be that some resources may not be available.
  7. At this point all the application specific source files are duplicated.  This means if source code modifications are needed later, ALL affected files need to be updated. There is a way to avoid this.  (Recommended).
    1.  Delete all the app source (.c & .h) files from all projects but the original project.
    2. In each of the new projects I "Add/Existing Item..." all the .c and .h files from the first project.  (Note:  DO NOT copy the Generated_Source files from the original project.  This will get built based on the TopDesign components.)
      Len_CONSULTRON_0-1661557466998.png
    3. Referencing the source files in Step 7.2 allows one set of .c and .h files across all projects.  A modification in these files ripples to all projects sharing them.  The exceptions to this are the TopDesign and DWR parameters which are specific to the project.
  8. "Build" each project separately to determine if any PSoC part-specific modifications are needed.  This might be TopDesign or DWR parameters.
    Len_CONSULTRON_2-1661559197567.png

Once the above steps are followed, then you can then select the Workspace and then perform a "Build All Projects" to build new .hex files based on the new changes.

Len_CONSULTRON_3-1661559283204.png

I believe this is what you were looking to do..

 

 

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

View solution in original post

0 Likes
5 Replies
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

Have a look in "PSoC Creator User Guide" and search for "CyPrjMgr Command Line Tool".  The guide is accessible from the Help/Documentation menu in PSoC Creator.  Or download it from here:
PSoC Creator User Guide (infineon.com)

I've not tried this, but this is where I'd start looking/experimenting.

From within Creator, you can create a list of commands for a project to control it, to build/save a project, including selecting devices.  Do this 4 times (different devices) with a long command string and you should be able to accomplish what you need.

BTW, there are other CLI tools described in this document as well.

Hope this helps.

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

user_4495571,

When I want to create the same app for multiple targets, I create all the .c and .h files in the first target CPU project and get it working.

Steps:

  1. Copy the working project.
  2. Paste the copy into the workspace.  
  3. Repeat 3. for each new project needed to support the additional IC part numbers.  This copies ALL project elements (source code, TopDesign, DWR parameters)
  4. (Optional) Rename the new projects to make some sense.
  5. Select a different PSoC IC for each of the new projects using "Device SelectLen_CONSULTRON_1-1661558065144.png
  6. At this point, each project should have all the elements to build.  Due to the selection of a different PSoC part #, it might be that some resources may not be available.
  7. At this point all the application specific source files are duplicated.  This means if source code modifications are needed later, ALL affected files need to be updated. There is a way to avoid this.  (Recommended).
    1.  Delete all the app source (.c & .h) files from all projects but the original project.
    2. In each of the new projects I "Add/Existing Item..." all the .c and .h files from the first project.  (Note:  DO NOT copy the Generated_Source files from the original project.  This will get built based on the TopDesign components.)
      Len_CONSULTRON_0-1661557466998.png
    3. Referencing the source files in Step 7.2 allows one set of .c and .h files across all projects.  A modification in these files ripples to all projects sharing them.  The exceptions to this are the TopDesign and DWR parameters which are specific to the project.
  8. "Build" each project separately to determine if any PSoC part-specific modifications are needed.  This might be TopDesign or DWR parameters.
    Len_CONSULTRON_2-1661559197567.png

Once the above steps are followed, then you can then select the Workspace and then perform a "Build All Projects" to build new .hex files based on the new changes.

Len_CONSULTRON_3-1661559283204.png

I believe this is what you were looking to do..

 

 

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
rajpoot_2
Level 1
Level 1
First reply posted Welcome!

The CyPrjMgr Command Line Tool can be found in the "PSoC Creator User Guide" under the "CyPrjMgr Command Line Tool" section.  The guide can be accessed from the Help/Documentation menu within the PSoC Creator application.  You can also download it from the following link:
PSoC Creator User Guide (infineon.com)

It is not something I have tried, but I would start by exploring this and experimenting in this area.

A list of commands can be created within Creator in order to control a particular project and to build and save the project, as well as to select devices within a project.  Using a long command string and repeating this process four times (on different devices) should enable you to accomplish what you are trying to accomplish.

By the way, this document also discusses other CLI tools that you can use.

Thank you for taking the time to read this. I hope it is helpful.

0 Likes
rajpoot_2
Level 1
Level 1
First reply posted Welcome!

I've not tried this, but this is where I'd start looking/experimenting.

From within Creator, you can create a list of commands for a project to control it, to build/save a project, including selecting devices.  Do this 4 times (different devices) with a long command string and you should be able to accomplish what you need.

0 Likes
Gautami_12
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi ,

The thread was locked due to inactivity for a long time, you can continue the discussion on the topic by opening a new thread with reference to the locked one. The continuous discussion in an inactive thread may mostly be unattended by community users.

Thanks and Regards,
Gautami J
Cypress Semiconductor Corporation
An Infineon Technologies Company

0 Likes