Skip navigation
Home > All Places > USB > EZ-PD Type-C USB > Blog > Authors EddieZ_31

EZ-PD Type-C USB

2 Posts authored by: EddieZ_31 Moderator
EddieZ_31

Post_build Script Failure

Posted by EddieZ_31 Moderator Aug 13, 2019

When using PSoC Creator compiling a new project generated from CCGx Host SDK, you could meet such error:

 

"Post-Build Script failed: Primary and backup binaries are overlapping."

The command '.\post_build.bat' failed with exit code '1'.

--------------- Rebuild Failed: 08/13/2019 15:50:15 ---------------

 

There are two ways to avoid this problem.

  • Creating Project from Start Page

The SDK example projects are listed underKits -> EZ PD CCG CCGx Host SDK on the Start Page. Click on the workspace name to copy it. When copying the workspace, the complete workspace directory along with all the projects associated with the workspace are copied to the selected destination location. PSoC Creator automatically opens the copied workspace after completing the copy.

In this way, the Post-Build Script failure problem could be avoid, but the project name could not be changed.

  • Creating Project from Code Examples
  1. Use File->New->Project to create a new project. Modify the workspace name and project name to whatever you want.
  2. Right click on workspace name and use Add a Existing Project to add backup_fw.cyprj to the workspace.
  3. Right-click on workspace name and use Dependencies to add a code dependency for the CYPD3125-40LQXI_notebook project on the backup_fw project.

    4. Edit the post_build.bat script file in the project folder. Change CYPD3125-40LQXI_notebook in @set "PROJ=CYPD3125-40LQXI_notebook" to your project name.

Take CYPD3125 for example. Here are the steps to change it to CYPD3123:

1.Right click on Project ‘CYPD-3125-40LQXI_notebook01’ [CYPD-3125-40LQXIT] and choose Device Selector…

Change the part number from CYPD3125-40LQXIT to CYPD3123-40LQXIT

2. TopDesign.cysch page, double click on Bootloadable_1 component. Click on Dependencies tab and change the path of Bootloader HEX file. The bootloader file of CYPD3123-40LQXIT can be found in “C:\Program Files (x86)\Cypress\EZ-PD CCGx SDK\CCG3-CCG4\Firmware\projects\CYPD3123-40LQXI_ctd_us\CYPD3123-40LQXI_ctd_us.cydsn\Bootloader”. The Bootloader ELF file path will be changed automatically when Bootloader HEX file path has been modified.

3.Compile the project.

 

The project still uses the USB bootloader of the CYPD3123. If you want a CYPD3123 project with I2C bootloader, then you’ll need project file for the bootloader of CYPD3125 (which is not included in the current version of SDK). Change the device part number with the same steps above, then use the generated HEX file for bootloader dependency.