Create a custom BSP with ModusToolbox2.3 for PSoC4000S

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

cross mob
YoIs_1298666
Level 5
Level 5
250 sign-ins 100 replies posted 100 sign-ins

Hello,

In case of PSoC6, we can create a custom BSP in two ways.

https://community.cypress.com/t5/Knowledge-Base-Articles/Creating-Custom-BSPs-in-ModusToolbox-KBA230...

It's a CLI and Build Target method.

Both were able to build without error.

YoIs_1298666_0-1620287791877.png

In case of PSoC4000S, in either method, if TARGET = CustomName of Makefile is set, a build error will occur.

Is PSoC 4000S still unable to create a custom BSP?

Best regards,

Yocchi

 

0 Likes
1 Solution

Hello @YoIs_1298666,

The reason you are seeing the error is that you have specified the TARGET as MyCustomBSP which has COMPONENT_BSP_DESIGN_MODUS folder inside but in your makefile you have COMPONENT set to CUSTOM_DESIGN_MODUS.  

Since your COMPONENT_CUSTOM_DESIGN_MODUS folder doesn't have this particular target BSP, it cannot find the respective files and throws an error. 

Here are two ways in which you can solve this:
 
Method1: You change the makefile variable to the following so that the build can pick the BSP_DESIGN_MODUS folder that's inside your custom BSP by default.
COMPONENTS=BSP_DESIGN_MODUS

Method2: If you decide to go with the configuration you have in your makefile already - 
COMPONENTS=CUSTOM_DESIGN_MODUS
DISABLE_COMPONENTS=BSP_DESIGN_MODUS

Then create a new folder inside COMPONENT_CUSTOM_DESIGN_MODUS folder named "TARGET_MyCustomBSP" and add the respective design.modus, design.cycapsense files inside it as shown below:

DheerajK_81_0-1620366998636.png

Now you should be able to build successfully. Let me know your observations 🙂

Regards,
Dheeraj



View solution in original post

0 Likes
6 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello @YoIs_1298666 ,

Can you please let me know the DEVICE_GEN value you used to create the BSP? I tried for CY8C4045AZQ-S413 device and it seemed to work correctly for me. 

Once the BSP is created and Makefile TARGET variable is updated, the build should proceed successfully. What is the build error? Can you share the build console log?

Regards,
Dheeraj

0 Likes

Hello 

YoIs_1298666_0-1620344837076.png

Best regards,

Yocchi

 

0 Likes

Hello @YoIs_1298666,

The reason you are seeing the error is that you have specified the TARGET as MyCustomBSP which has COMPONENT_BSP_DESIGN_MODUS folder inside but in your makefile you have COMPONENT set to CUSTOM_DESIGN_MODUS.  

Since your COMPONENT_CUSTOM_DESIGN_MODUS folder doesn't have this particular target BSP, it cannot find the respective files and throws an error. 

Here are two ways in which you can solve this:
 
Method1: You change the makefile variable to the following so that the build can pick the BSP_DESIGN_MODUS folder that's inside your custom BSP by default.
COMPONENTS=BSP_DESIGN_MODUS

Method2: If you decide to go with the configuration you have in your makefile already - 
COMPONENTS=CUSTOM_DESIGN_MODUS
DISABLE_COMPONENTS=BSP_DESIGN_MODUS

Then create a new folder inside COMPONENT_CUSTOM_DESIGN_MODUS folder named "TARGET_MyCustomBSP" and add the respective design.modus, design.cycapsense files inside it as shown below:

DheerajK_81_0-1620366998636.png

Now you should be able to build successfully. Let me know your observations 🙂

Regards,
Dheeraj



0 Likes
lock attach
Attachments are accessible only for community members.

Hello Dheeraj-san,

Thank you very much for your help.

But I do not understand what you mean.

Compiler say that there is not "cycfg.h". but there is "cycfg.h" in "GenerateSource" under "COMPONENT_BSP_DESIGN_MODUS".

YoIs_1298666_1-1620368261204.png

and I will attached my Makefile.

Best regards,

Yocchi

 

0 Likes

Hello Dheeraj-san,

I arranged  the Makefile and set the peripherals and LED pins to the same settings as TARGET_CY8CKIT-145-40XX in Device Configurator, so I was able to build.

Best regards,

Yocchi

0 Likes

Hello @YoIs_1298666 ,

In the Makefile you attached, please see lines 82 to 85. You have specified the build to use CUSTOM_DESIGN_MODUS and to disable BSP_DESIGN_MODUS.

DheerajK_81_0-1620386713616.png

This means that the build will consider the files inside COMPONENT_CUSTOM_DESIGN_MODUS folder and not the COMPONENT_BSP_DESIGN_MODUS folder.

So, even if you have the file cycfg.h in the in "GenerateSource" under "COMPONENT_BSP_DESIGN_MODUS" it is not going to be detected by the build. 

Please follow the steps I have mentioned in the previous post to successfully configure your Custom BSP.

Regards,
Dheeraj

0 Likes