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

PSoC™ 6 SDK Forum Discussions

HakanJ_21
Employee
First like given 10 sign-ins 5 replies posted
Employee

I get build errors when trying to follow the step by step instructions here:
https://github.com/cypresssemiconductorco/mtb-example-psoc6-mcuboot-basic

Example error message:

COMPONENT_CUSTOM_DESIGN_MODUS/TARGET_CY8CPROTO-062-4343W/GeneratedSource/cycfg_peripherals.c:38:30: error: initializer element is not constant
38 | .enableMutliProcessorMode = false,

I can reproduce the build error from scratch using the command line sequence below:

git clone https://github.com/cypresssemiconductorco/mtb-example-psoc6-mcuboot-basic.git
cd mtb-example-psoc6-mcuboot-basic/bootloader_cm0p
make getlibs
make program TARGET=CY8CPROTO-062-4343W TOOLCHAIN=GCC_ARM

Is something broken or am I missing a step somewhere?

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

Hello @HakanJ_21 ,

I'm able to reproduce this error. I simply added this line of code in cycfg_peripherals.c and cycfg_syspm.c file:
#define true 1
#define false 0

I was able to get past these errors, but ended up in a pool of new errors in the mbed-tls library. I believe something is broken in this CE because of some updates in the third-party libraries involved. I have notified the internal team and they are evaluating this. 

Regards,
Dheeraj

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

Hello @HakanJ_21 ,

This is caused by the latest version of MCUBoot. Please use the following version of MCUboot: v1.6.1-cypress

Please follow the steps below to successfully compile and run the CE:

We are in the process of updating the mtb-example-psoc6-mcuboot-basic CE to work the latest version of MCUboot library, will release it on GitHub soon.

Regards,
Dheeraj

0 Likes
HakanJ_21
Employee
First like given 10 sign-ins 5 replies posted
Employee

Hi Dheeraj,

I'm glad to hear the example is getting updated. The proposed build steps for the current example still fails with the same error for me, though.  I now did:

git clone https://github.com/cypresssemiconductorco/mtb-example-psoc6-mcuboot-basic.git
cd mtb-example-psoc6-mcuboot-basic/bootloader_cm0p
echo "https://github.com/mcu-tools/mcuboot/#v1.6.1-cypress" > deps/mcuboot.lib
make getlibs
make program TARGET=CY8CPROTO-062-4343W TOOLCHAIN=GCC_ARM

 

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

Hello @HakanJ_21 ,

Please try the following steps to get it working:

>> git clone https://github.com/cypresssemiconductorco/mtb-example-psoc6-mcuboot-basic.git
>> cd mtb-example-psoc6-mcuboot-basic/bootloader_cm0p
>> echo "https://github.com/mcu-tools/mcuboot/#v1.6.1-cypress" > deps/mcuboot.lib
>> echo "https://github.com/cypresssemiconductorco/cy-mbedtls-acceleration/#release-v1.2.0" > deps/cy-mbedtls-acceleration.lib

In case you have already run "make getlibs" before, you need to delete the folders - mcuboot, mbedtls and cy-mbedtls-acceleration from the libs folder.

>> rm -rf libs/mbedtls libs/cy-mbedtls-acceleration libs/mcuboot


Now run "make getlibs" and you should be able to build successfully once the import is complete. 

>> make getlibs
>> make build


If you are doing this from the Eclipse IDE, here are the steps:

1. Click "New Application" under the Quick Panel
2. In the Project Creator window > Choose BSP > MCUBoot Based Basic Bootloader > Click Create
3. Once imported, in the bootloader_cm0p project folder within the deps folder, replace the contents of the following .libs files:

4. In MTB use right-click "Open with Text editor" to make these files editable.

5. Delete the following folders from the project directory:

  • bootloader_cm0p/libs/cy-mbedtls-acceleration
  • bootloader_cm0p/libs/mcuboot
  • bootloader_cm0p/libs/mbedtls

6. Close MTB and delete the folders outside of MTB to avoid access issues.

7. In MTB, under the project folder open Library Manager 1.2. Once loaded, choose Update. After updating select Close. Now you should be able to see libs/cy-mbedtls-acceleration and libs/mcuboot with the correct version numbers in bootloader_cm0p. The folder libs/mbedtls should no longer be present.

8. Build the project, builds successfully

Hope this helps 🙂

Regards,
Dheeraj

0 Likes