Error in KBA231373 Custom BSP 2.2+

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

cross mob
Panometric
Level 5
Level 5
100 sign-ins 100 replies posted 10 solutions authored

Following: https://community.infineon.com/t5/Knowledge-Base-Articles/ModusToolbox-2-2-and-later-Make-a-Custom-B...

"As an alternative, you can create your application with a kit BSP that has more functionality. For example, if your design uses capacitive sensing, use a BSP for a kit that has CapSense functionality. The design files and libraries used by the BSP are set up for that kit. When you start with a more capable BSP, you modify and/or remove functionality to match your hardware, but the principles outlined here are identical."

But at least come examples do not work. The instructions for a generic BSP are OK. for example, if you choose
https://github.com/Infineon/mtb-example-psoc6-ble-findme

1. make bsp TARGET_GEN=my_bsp DEVICE_GEN=CYBLE-416045-02

....

INFO: The design file was last saved with a different version of the tools than was used to perform code generation. Last saved with: Tools Package 2.2.0.2790. Current: Tools Package 2.4.0.5972 (C:/Users/Mike/ModusToolb
ox/tools_2.4)

my_bsp TARGET created at ./TARGET_my_bsp

2. Change makefile: TARGET=TARGET_my_bsp

3. make config

*** Build support for the target device not found. Run "make getlibs" to ensure all required build and code dependencies are present.. Stop.

4. make getlibs also fails, none of configurators work, etc. 

Errors at every turn, it's a dead end..

 

0 Likes
1 Solution
AlenAn14
Moderator
Moderator
Moderator
500 replies posted 100 solutions authored 250 replies posted

Hi @Panometric ,

You have made a mistake when mentioning the TARGET in the MakeFile.

It is not 'TARGET=TARGET_my_bsp'  but instead 'TARGET=my_bsp' .
This is because you gave the following command for making the bsp
'make bsp TARGET_GEN=my_bsp DEVICE_GEN=CYBLE-416045-02'.
The 'TARGET_my_bsp' is the folder name containing the target source bsp source files.

This is mentioned in the KBA as shown below:

AlenAn14_1-1639727169972.png

Also please make sure to move the created 'TARGET_my_bsp' folder into the libs folder.
Please do the build after making the above mentioned changes and let me know if you are facing any errors.

Regards
Alen

 

View solution in original post

0 Likes
4 Replies
AlenAn14
Moderator
Moderator
Moderator
500 replies posted 100 solutions authored 250 replies posted

Hi @Panometric ,

I will evaluate this procedure for the CYBLE-416045-02 device and let you know on my observations on the same.

Regards
Alen

0 Likes
AlenAn14
Moderator
Moderator
Moderator
500 replies posted 100 solutions authored 250 replies posted

Hi @Panometric ,

You have made a mistake when mentioning the TARGET in the MakeFile.

It is not 'TARGET=TARGET_my_bsp'  but instead 'TARGET=my_bsp' .
This is because you gave the following command for making the bsp
'make bsp TARGET_GEN=my_bsp DEVICE_GEN=CYBLE-416045-02'.
The 'TARGET_my_bsp' is the folder name containing the target source bsp source files.

This is mentioned in the KBA as shown below:

AlenAn14_1-1639727169972.png

Also please make sure to move the created 'TARGET_my_bsp' folder into the libs folder.
Please do the build after making the above mentioned changes and let me know if you are facing any errors.

Regards
Alen

 

0 Likes
Panometric
Level 5
Level 5
100 sign-ins 100 replies posted 10 solutions authored

Thanks @AlenAn14 , you are right about the makefile, it should not have TARGET= prefix. My mistake. 

About your comment to move to libs, the procedure does not say that. Can you explain why?

Also, I did struggle with the 5 bullet points in step 4 of the document:

1. This works, if I navigate into the project where it was created.

2.  This advice to put it in the root of another project is contrary to what you have said to put it in libs. Is this a method to convert an existing project? What if the old project uses LIB flow?

3.  "Add the BSP files directly to an application project in an IDE." I wanted to place the BSP at the same level as the applications with a relative path.  So I expected changing the makefile and "make import_deps IMPORT_PATH=../TARGET_MyBSP" is all I needed. But when it says I need to run "make getlibs", even if I ran it OK. 

 

startex.mk:398: *** Build support for the target device not found. Run "make getlibs" to ensure all required build and code dependencies are present..  Stop.

 

4. I did not try. 

5. I created the manifest.loc and a manifest file, but could not see how to use a relative path. My developers use Macs and Windows, so I cannot use an absolute path.   Also it complained about not having a version string like the git URI, so that a local file may not work at all. 

 

0 Likes
AlenAn14
Moderator
Moderator
Moderator
500 replies posted 100 solutions authored 250 replies posted

Hi @Panometric 


About your comment to move to libs, the procedure does not say that. Can you explain why?
A: This is not a necessity, but for clarity of code, usually the BSP files are kept in the libs folder as a best practice. You can place the same anywhere in the project folder.

2.  This advice to put it in the root of another project is contrary to what you have said to put it in libs. Is this a method to convert an existing project? What if the old project uses LIB flow?
A: yes this method is to help use the created BSP for an existing project. (Again, you can place the same anywhere in the new project)
Please refer section 6.3 of Library Manager User guide on information on Lib Flow.

3.  "Add the BSP files directly to an application project in an IDE." I wanted to place the BSP at the same level as the applications with a relative path.  So I expected changing the makefile and "make import_deps IMPORT_PATH=../TARGET_MyBSP" is all I needed. But when it says I need to run "make getlibs", even if I ran it OK. 
A: This method of locating the BSP outside the project root will not work as the make system requires the BSP folder to be present anywhere inside the project root directory for the same to be detected. Support for relative search of the BSP folder is not available. The command 'make import_deps' will not import your TARGET_MyBSP folder as a whole into your project directory but instead only the dependency libraries necessary for the operation of TARGET_MyBSP  that are present in the folder 'TARGET_MyBSP/deps'  (i.e. the .mtbx files present in this folder) to your projects deps folder.

5. I created the manifest.loc and a manifest file, but could not see how to use a relative path. My developers use Macs and Windows, so I cannot use an absolute path.   Also it complained about not having a version string like the git URI, so that a local file may not work at all. 
A: As section 6.2 of the Modus Toolbox user guide mentions as shown below,

AlenAn14_0-1639985009138.png

You can add only absolute paths and not relative paths to your local folder containing the super-manifest.xml in the manifest.loc file. 

Regards
Alen