cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

PeSt_4842176
New Contributor II

Hi All,

Merry Christmas and happy holidays.  My professional development project has hit a block.

Purchased a CY8CKIT-064S0S2-4343W kit and am working with ModusToolbox v2.2.0. 

I have hit an issue when trying to provision the device.  I get the following error when I try to do the provisioning as spelt out in the the Provisioning Guide documentation.

Everything seems to be ok but it fails with this error message

"

2020-12-29 14:24:59,073 : C : ERROR : Early Production Units detected, please get earlier version of tools by running 'pip install --upgrade --force-reinstall cysecuretools==2.1.0'. Check the log for details

Error: Failed processing! "

This error is also returned if I try and run the entrance-exam command.

Based on the responses, I am sure that the hardware is communicating with my pc.  I can't actually run the earlier version of cysecuretools as when I try that, I get a stack of python errors about being unable to build the wheel for cryptography which use PEP 517 and cannot be installed directly. 

So I would like to get things working with all the current versions of ModusToolbox etc.    Please help, it seems to be a pretty pathetic way to be failing as I am just trying to get the demo code to work at this stage 😞

Here is the response to entrance-exam. 

"

I:\Foundry\Project\S1000072_AWS\FreeRTOS\vendors\cypress\MTB\psoc6\psoc64tfm\security>cysecuretools -t cy8ckit-064s0s2-4343w entrance-exam

2020-12-29 14:24:58,260 : C : INFO  : Target: cy8ckit-064s0s2-4343w

2020-12-29 14:24:58,292 : P : INFO  : Target type is cy8c64xa_cm4_full_flash

2020-12-29 14:24:58,306 : P : INFO  : DP IDR = 0x6ba02477 (v2 rev6)

2020-12-29 14:24:58,308 : P : INFO  : AHB-AP#0 IDR = 0x84770001 (AHB-AP var0 rev8)

2020-12-29 14:24:58,312 : P : INFO  : AHB-AP#2 IDR = 0x24770011 (AHB-AP var1 rev2)

2020-12-29 14:24:58,318 : P : INFO  : AHB-AP#0 Class 0x1 ROM table #0 @ 0xf1000000 (designer=034 part=102)

2020-12-29 14:24:58,322 : P : INFO  : AHB-AP#2 Class 0x1 ROM table #0 @ 0xe00ff000 (designer=034 part=102)

2020-12-29 14:24:58,329 : P : INFO  : [0]<e0080000:CTI class="9" designer=43b part=906 devtype=14 archid=0000 devid=40800:0:0>

2020-12-29 14:24:58,331 : P : INFO  : [3]<e008e000:TPIU-M3 class="9" designer=43b part=923 devtype=11 archid=0000 devid=ca1:0:0>

2020-12-29 14:24:58,341 : P : INFO  : [4]<e007f000:ROM class="1" designer=034 part=102>

2020-12-29 14:24:58,342 : P : INFO  :   AHB-AP#2 Class 0x1 ROM table #1 @ 0xe007f000 (designer=034 part=102)

2020-12-29 14:24:58,356 : P : INFO  :   [0]<e000e000:SCS-M4 class="14" designer=43b part=00c>

2020-12-29 14:24:58,358 : P : INFO  :   [1]<e0001000:DWT class="14" designer=43b part=002>

2020-12-29 14:24:58,369 : P : INFO  :   [2]<e0002000:FPB class="14" designer=43b part=003>

2020-12-29 14:24:58,371 : P : INFO  :   [3]<e0000000:ITM class="14" designer=43b part=001>

2020-12-29 14:24:58,380 : P : INFO  :   [4]<e0042000:CTI class="9" designer=43b part=906 devtype=14 archid=0000 devid=40800:0:0>

2020-12-29 14:24:58,382 : P : INFO  :   [5]<e0041000:ETM-M4 class="9" designer=43b part=925 devtype=13 archid=0000 devid=0:0:0>

2020-12-29 14:24:58,393 : P : INFO  : CPU core #1 is Cortex-M4 r0p1

2020-12-29 14:24:58,396 : P : INFO  : FPU present: FPv4-SP

2020-12-29 14:24:58,409 : P : INFO  : 4 hardware watchpoints

2020-12-29 14:24:58,410 : P : INFO  : 6 hardware breakpoints, 4 literal comparators

2020-12-29 14:24:58,423 : C : INFO  : Use system AP

2020-12-29 14:24:58,428 : P : INFO  : Clearing TEST_MODE bit...

2020-12-29 14:24:58,434 : C : INFO  : Probe ID: 19111301a419041100a4190400000000000000002e127069

2020-12-29 14:24:58,435 : C : INFO  : Secure Flash Boot version: 4.0.1.1089

2020-12-29 14:24:58,862 : C : INFO  : Device CyBootloader version: unknown

2020-12-29 14:24:58,863 : C : INFO  : Package CyBootloader version: 2.0.0.3345

2020-12-29 14:24:59,067 : C : INFO  : Chip protection state: Secure

2020-12-29 14:24:59,073 : C : ERROR : Early Production Units detected, please get earlier version of tools by running 'pip install --upgrade --force-reinstall cysecuretools==2.1.0'. Check the log for details

Error: Failed processing!

"

The response when attempting to provision is similar.

"

I:\Foundry\Project\S1000072_AWS\FreeRTOS\vendors\cypress\MTB\psoc6\psoc64tfm\security>cysecuretools --policy ./policy/policy_multi_CM0_CM4_tfm.json --target CY8CKIT-064S0S2-4343W provision-device

2020-12-29 14:22:50,975 : C : INFO  : ######################################################################

2020-12-29 14:22:50,975 : C : INFO  : Provisioning packet is created

2020-12-29 14:22:50,976 : C : INFO  : ######################################################################

..... "

The rest of the provisioning response is the same as for the entrance-exam.

Thanks in advance for any help.  Cheers!

Peter

0 Likes
Reply
1 Solution
MiRo_263836
Contributor II

I had a colleague that ran into this same issue earlier this week.  To resolve it, he opened a modus shell and executed the following command

pip install --force-reinstall cysecuretools==2.1.0

the ‘--force-reinstall’ flag as that clears the cache

He did a pip list and saw the cysecuretools was installed.  He proceeded to provision the board by executing the provisioning command in the modus shell.  

Mike Roberts
Arrow Infineon/Cypress Specialist 

View solution in original post

13 Replies
AditiB_81
Moderator
Moderator

Hi,

Can you refer to this thread and let us know whether the solution provided in this thread is helpful in your case?

Cannot provision PSoC 64 Secure Boot application

Happy Holidays!

Thanks

Aditi

0 Likes
Reply
PeSt_4842176
New Contributor II

Hi Aditi,

thanks for the response mate.  Unfortunately still the same status after erasing the flash. 

The erasing seems to run successfully to completion, prints out on screen.

Started with

C:\Users\PeterStephens>pyocd erase -s 0x10000000-0x101E0000

0000563:INFO:eraser:Erasing sector 0x10000000 (512 bytes)

..

and ended with

0059104:INFO:eraser:Erasing sector 0x101dfc00 (512 bytes)

0059119:INFO:eraser:Erasing sector 0x101dfe00 (512 bytes)

Tried provisioning after this and the message is the same.  Tried entrance-exam as well and the response is the same. 

The sticker on the box for the device says

CY8CKIT-064S0S2-4343W Rev **

2039SO00299

Kit purchased from Arrow.  Help much appreciated.  Thanks!

Peter

0 Likes
Reply
PeSt_4842176
New Contributor II

A little bit more info, tried to read the die info to see if there was more useful info and this failed as well....

I:\Foundry\Project\S1000072_AWS\FreeRTOS\vendors\cypress\MTB\psoc6\psoc64tfm\security>cysecuretools -t CY8CKIT-064S0S2-4343W read-die-id -o die_id.json

2020-12-30 14:59:16,144 : C : INFO  : Target: cy8ckit-064s0s2-4343w

2020-12-30 14:59:16,180 : P : INFO  : Target type is cy8c64_sysap

2020-12-30 14:59:16,191 : C : ERROR : Device 19111301a419041100a4190400000000000000002e127069 not found. Check the log for details

Error: Failed processing!

That device ID though is the same one returned in entrance-exam and provisioning.  What it means by not found is unclear.... 😞

cheers

Peter

0 Likes
Reply
Rakshith
Moderator
Moderator

Hi Peter, 

Apologies for the delay in response. 
Can you please let me know the results when you tried using the cysecuretools 2.1.0?
There were some significant changes in the new cysecuretools release which is why the earlier versions of the device which have the previous secure flash boot version are not supported.

If reverting back to 2.1.0 is not working can you please try a fresh install and let me know if that works?

Thanks and Regards,
Rakshith M B
0 Likes
Reply
PeSt_4842176
New Contributor II

Hi Rakshith,

thanks for getting back to me.  I can't get cysecuretools 2.1.0 to install, running the suggested command generates a lot of activity but it all starts to fall over around here 

 

Collecting setuptools
Using cached setuptools-51.1.2-py3-none-any.whl (784 kB)
Using legacy 'setup.py install' for cbor, since package 'wheel' is not installed.
Using legacy 'setup.py install' for intervaltree, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pyrsistent, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pywinusb, since package 'wheel' is not installed.
Using legacy 'setup.py install' for future, since package 'wheel' is not installed.
Building wheels for collected packages: cryptography
Building wheel for cryptography (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\peterstephens\appdata\local\programs\python\python39\python.exe' 'c:\users\peterstephens\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\PeterStephens\AppData\Local\Temp\tmpmw1ndmmf'
cwd: C:\Users\PeterStephens\AppData\Local\Temp\pip-install-zxolv7io\cryptography_7b89fb715ae84839add122237f9c1785
Complete output (137 lines):

.

...

and then at the end 

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

 

So can't get cysecuretools 2.1.0 to install.

I will try and get a fresh install of everything by uninstalling all the cypress stuff on my machine and reinstalling but not real confident that this will do anything.

regards

cheers

Peter

0 Likes
Reply
PeSt_4842176
New Contributor II

Hi Rakshith,

I uninstalled Modus fully and reinstalled version 2.2.0.2801 and then the 2.2.1.3335 patch and tried again and got the same error.

Pretty bummed because I am doing everything according to cypress and AWS documentation but it seems like I landed a lemon with the devkit even though I ordered it in December.   😞

Any suggestions?  Am I able to get a replacement board sent out?

Thanks Rakshith.

cheers

Peter

0 Likes
Reply
Rakshith
Moderator
Moderator

Hi Peter, 

Can you please confirm that you are using the cysecuretools and the command inside the modus shell?

Thanks and Regards,
Rakshith M B
0 Likes
Reply
GrCa_1363456
Contributor II

Hi Peter and Rakshith,

I've run into some issues with the provisioning process that were due initially to my mis-understanding of the tools and how the paths are setup inside and outside of ModusShell. A concept that helped me was the realization that different tools may be utilized from a Windows Command Prompt than are used from ModusShell.

I recommend trying the following commands in both Windows Command Prompt and Modus Shell to see the different tools that may already be installed along with which ones are being used based on which internal Terminal program is being used.

"where python" or "where <command>"   <-- This is a nice way to see what tool is actually being used.  I found this command often returns a list of multiple sources. I have a copy of Python in Windows and another that was installed with ModusToolbox.

"pip list"   <-- This is a nice way to see the version of python tools installed including cysecuretools, cryptography and pyOpenSSL. 

 

There may be some tools that are pre-installed with ModusToolbox that don't get linked back to the Windows Path. In the end, I've found the provisioning process works best if all commands are run from within the Modus Shell and NOT Windows Command Prompt.

Greg - an FAE

MiRo_263836
Contributor II

I had a colleague that ran into this same issue earlier this week.  To resolve it, he opened a modus shell and executed the following command

pip install --force-reinstall cysecuretools==2.1.0

the ‘--force-reinstall’ flag as that clears the cache

He did a pip list and saw the cysecuretools was installed.  He proceeded to provision the board by executing the provisioning command in the modus shell.  

Mike Roberts
Arrow Infineon/Cypress Specialist 

View solution in original post

Rakshith
Moderator
Moderator

Hi Greg, Mike, 

Thank you very much for sharing the information.
I tried running the command multiple times and on a few different PCs. The command worked without any issues in the modus shell. As you have mentioned, I too believe that the issue Peter is facing might be because the command is executed in the Windows command prompt and not the modus shell.

Peter, please let us know if the issue persists even after executing the command in the modus shell.

Thanks and Regards,
Rakshith M B
PeSt_4842176
New Contributor II

Rakshith, Greg and Mike, 

gents!  Thanks very much for your input.  I had not realised there was a diff running in modus shell(cygwin in the  modus tools directory) as opposed to running from the windows command prompt.

I can confirm that the pip install --force-reinstall cysecuretools==2.1.0 command is successfully executed from within the modus shell.

I will test the provisioning again when I am next to the hardware but this seems to be very promising.  Thanks again for the help guys. Much appreciated. 🙂

cheers

Peter

0 Likes
Reply
PeSt_4842176
New Contributor II

Gents, thanks again for the suggestions to use modus shell which is the cygwin hosted interface.

This worked perfectly!  Wooohooo!!

One suggestion is that the document on the cypress website, "Provisioning Guide for the Cypress CY8CKIT-064S0S2-4343W – KBA231073" should have an explicit instruction to use the modus shell.

This thread is actually the only place I heard about the modus shell as I assumed that the windows based installation would take care of things.  

As Greg and Mike have pointed out, the location and versions of components installed within cygwin and the windows native python are quite different.

Thanks again for your help gents! 🙂

 Much appreciated, onwards and upwards!

cheers

Peter

0 Likes
Reply
Rakshith
Moderator
Moderator

Hi Peter, 

Thank you for the update. Glad your issue is resolved 🙂

Thanks and Regards,
Rakshith M B
0 Likes
Reply
Top labels