When I use pyocd flashtool to burn mcuboot.bin into flash of frdm_k64f board, there has one fatal error,lists as follow:
[root@localhost zephyr]# pyocd-flashtool -t k64f -ce -a 0x0 mcuboot.bin INFO:root:DAP SWD MODE initialised INFO:root:K64F not in secure state Traceback (most recent call last): File "/usr/bin/pyocd-flashtool", line 9, in <module> load_entry_point('pyOCD==0.8.1a1', 'console_scripts', 'pyocd-flashtool')() File "/usr/lib/python3.4/site-packages/pyOCD/tools/flash_tool.py", line 152, in main frequency=args.frequency, blocking=False) File "/usr/lib/python3.4/site-packages/pyOCD/board/mbed_board.py", line 265, in chooseBoard mbed.init() File "/usr/lib/python3.4/site-packages/pyOCD/board/board.py", line 51, in init self.target.init() File "/usr/lib/python3.4/site-packages/pyOCD/target/target_kinetis.py", line 123, in init self.aps[0].init(bus_accessible=True) File "/usr/lib/python3.4/site-packages/pyOCD/coresight/ap.py", line 111, in init super(MEM_AP, self).init(bus_accessible) File "/usr/lib/python3.4/site-packages/pyOCD/coresight/ap.py", line 87, in init self.init_rom_table() File "/usr/lib/python3.4/site-packages/pyOCD/coresight/ap.py", line 92, in init_rom_table self.rom_table.init() File "/usr/lib/python3.4/site-packages/pyOCD/coresight/rom_table.py", line 178, in init self.read_id_registers() File "/usr/lib/python3.4/site-packages/pyOCD/coresight/rom_table.py", line 116, in read_id_registers regs = self.ap.readBlockMemoryAligned32(self.top_address + PIDR4, IDR_COUNT) File "/usr/lib/python3.4/site-packages/pyOCD/coresight/ap.py", line 344, in readBlockMemoryAligned32 resp += self._readBlock32(addr, n/4) File "/usr/lib/python3.4/site-packages/pyOCD/coresight/ap.py", line 205, in _readBlock32 resp = self.link.reg_read_repeat(size, reg) File "/usr/lib/python3.4/site-packages/pyOCD/pyDAPAccess/dap_access_cmsis_dap.py", line 590, in reg_read_repeat assert isinstance(num_repeats, six.integer_types) AssertionError [root@localhost zephyr]#
Why this error happened and How to resolve it? thanks you!
There was a recent issue with the Zephyr getting started guide that incorrectly instructed users to install pyOCD with pip3 instead of pip2. Can you please try installing pyOCD again with pip2?