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

PSoC™ 6 Forum Discussions

kjs
Level 1
Level 1
First like given First solution authored First reply posted

I'm using Modus Toolbox 2.1, my target is a PSOC 6 MUC CY8C6XXA and I am using pyOCD v. 0.29.0 for programming and debugging.  I get the following error / console message during programming: 

0002572:ERROR:gdbserver:Exception while executing remote command 'reset init': unexpected value for reset_type option ('init')

Traceback (most recent call last):

  File "c:\python27\lib\site-packages\pyocd\gdbserver\gdbserver.py", line 1017, in handle_remote_command

    self._command_context.process_command_line(cmd)

  File "c:\python27\lib\site-packages\pyocd\commands\execution_context.py", line 300, in process_command_line

    invoc.handler(invoc)

  File "c:\python27\lib\site-packages\pyocd\commands\execution_context.py", line 369, in execute_command

    cmd_object.parse(invocation.args)

  File "c:\python27\lib\site-packages\pyocd\commands\commands.py", line 350, in parse

    self.reset_type = convert_reset_type(args[0])

  File "c:\python27\lib\site-packages\pyocd\utility\cmdline.py", line 143, in convert_reset_type

    raise ValueError("unexpected value for reset_type option ('%s')" % value)

ValueError: unexpected value for reset_type option ('init')

The programming continues and then gives an error messages (see attached image)

I have had the same setup working before, but my company charged domain, so had to redo the entire installation again. 

Any help is highly appreciated. 

 

Thanks 

 

0 Likes
1 Solution
kjs
Level 1
Level 1
First like given First solution authored First reply posted

Hi @AlenAn14 

The solution was found by changing version of pyOCD. As written I was using pyOCD v.0.29.0, when i downgrade to v.0.20.0, everything worked fine. I don't know what the issue is, because 0.29.0 (https://github.com/pyocd/pyOCD/releases/tag/v0.29.0) should be the last version support python 2, which I'm using. 

But thanks again for trying to help me. 

 

BR Karl-Johan 

View solution in original post

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

Hi @kjs ,

Can you please let me know the exact part number of the PSoC device you are using?
Are you also using any scripts for the programming using pyOCD that you can share here?

I believe the part cy8c6xx8 is not supported in pyOCD 0.29.0 (I found this part is not present in the list by running the command)

 

pyocd list --targets

 

Can you please let me know the output you get when running the following command?

 

pyocd gdbserver

 


Warm Regards
Alen

kjs
Level 1
Level 1
First like given First solution authored First reply posted

Hi @AlenAn14 

Thanks for the fast reply. I made a typo, the target is CY8C6XXA. When i run "pyocd gdbserver" i get:

0196677:INFO:board:Target type is cortex_m
0196722:INFO:dap:DP IDR = 0x6ba02477 (v2 rev6)
0196742:INFO:ap:AHB-AP#0 IDR = 0x84770001 (AHB-AP var0 rev8)
0196752:INFO:ap:AHB-AP#1 IDR = 0x84770001 (AHB-AP var0 rev8)
0196762:INFO:ap:AHB-AP#2 IDR = 0x24770011 (AHB-AP var1 rev2)
0196791:INFO:rom_table:AHB-AP#0 Class 0x1 ROM table #0 @ 0xf1000000 (designer=034 part=102)
0196802:INFO:rom_table:AHB-AP#1 Class 0x1 ROM table #0 @ 0xf0000000 (designer=034 part=102)
0196812:INFO:rom_table:[0]<e00ff000:ROM class=1 designer=43b part=4c0>
0196812:INFO:rom_table: AHB-AP#1 Class 0x1 ROM table #1 @ 0xe00ff000 (designer=43b part=4c0)
0196822:INFO:rom_table: [0]<e000e000:SCS-M0+ class=14 designer=43b part=008>
0196832:INFO:rom_table: [1]<e0001000:DWT-M0+ class=14 designer=43b part=00a>
0196832:INFO:rom_table: [2]<e0002000:BPU class=14 designer=43b part=00b>
0196847:INFO:rom_table:[1]<f0002000:CTI-M0+ class=9 designer=43b part=9a6 devtype=14 archid=1a14 devid=1040800:0:0>
0196853:INFO:rom_table:[2]<f0003000:MTB-M0+ class=9 designer=43b part=932 devtype=31 archid=0a31 devid=0:0:0>
0196868:INFO:rom_table:AHB-AP#2 Class 0x1 ROM table #0 @ 0xe00ff000 (designer=034 part=102)
0196879:INFO:rom_table:[0]<e0080000:CTI class=9 designer=43b part=906 devtype=14 archid=0000 devid=40800:0:0>
0196884:INFO:rom_table:[3]<e008e000:TPIU-M3 class=9 designer=43b part=923 devtype=11 archid=0000 devid=ca1:0:0>
0196884:INFO:rom_table:[4]<e007f000:ROM class=1 designer=034 part=102>
0196884:INFO:rom_table: AHB-AP#2 Class 0x1 ROM table #1 @ 0xe007f000 (designer=034 part=102)
0196904:INFO:rom_table: [0]<e000e000:SCS-M4 class=14 designer=43b part=00c>
0196910:INFO:rom_table: [1]<e0001000:DWT class=14 designer=43b part=002>
0196916:INFO:rom_table: [2]<e0002000:FPB class=14 designer=43b part=003>
0196919:INFO:rom_table: [3]<e0000000:ITM class=14 designer=43b part=001>
0196922:INFO:rom_table: [4]<e0042000:CTI class=9 designer=43b part=906 devtype=14 archid=0000 devid=40800:0:0>
0196932:INFO:rom_table: [5]<e0041000:ETM-M4 class=9 designer=43b part=925 devtype=13 archid=0000 devid=0:0:0>
0196932:INFO:cortex_m:CPU core #0 is Cortex-M0+ r0p1
0196942:INFO:cortex_m:CPU core #1 is Cortex-M4 r0p1
0196952:INFO:cortex_m:FPU present: FPv4-SP-D16-M
0196952:INFO:dwt:2 hardware watchpoints
0196962:INFO:fpb:4 hardware breakpoints, 0 literal comparators
0196972:INFO:dwt:4 hardware watchpoints
0196983:INFO:fpb:6 hardware breakpoints, 4 literal comparators
0197037:INFO:server:Semihost server started on port 4444 (core 0)
0197121:INFO:gdbserver:GDB server started on port 3333 (core 0)
0197141:INFO:server:Semihost server started on port 4445 (core 1)
0197146:INFO:gdbserver:GDB server started on port 3334 (core 1)

So everything seems fine, when I use pyocd in the command line. I am also able to compile the code i modus toolbox and flash it using "pyocd flash" in the cmd-interface. But the issue is that I cannot flash or debug in modus-toolbox. 

Thanks 

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

Hi @kjs ,

Can you please let me know the procedure you followed to enable pyOCD in ModusToolbox?
Also, the command type "init" for 'reset' command is not available in pyOCD but only in openOCD and hence the error.
Can you please try removing this line and see if this error still persist?

Warm Regards
Alen

kjs
Level 1
Level 1
First like given First solution authored First reply posted

Hi @AlenAn14 

The solution was found by changing version of pyOCD. As written I was using pyOCD v.0.29.0, when i downgrade to v.0.20.0, everything worked fine. I don't know what the issue is, because 0.29.0 (https://github.com/pyocd/pyOCD/releases/tag/v0.29.0) should be the last version support python 2, which I'm using. 

But thanks again for trying to help me. 

 

BR Karl-Johan 

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

Hi @kjs ,

Glad your query is resolved!

I believe ModusToolbox v2.1 was using the pyOCD version 0.20.0 which may have been the cause of this as 0.29.0 is used with the latest ModusToolbox v 2.4. I will take a look into this as well. Thank you for pointing this out and taking the time to share the solution with the community 🙂 .

Please feel free to post any queries or issues you may have on Infineon products in the community and we will be happy to help.

Warm Regards
Alen

0 Likes