1 of 1 people found this helpful
The solution is to specify the correct serial number of the desired MP4 device in the CLI script. The simple way to find out serial number is to use the CYP GUI:
- Run GUI
- In the Log (view) you can find info about “Connected” devices
- In my case there are 2 devices: MP4 (serial 0E13188B02237400) and KP3 (serial 1616176C03227400)
- The last part in the device description is the actual serial number (SN)
- Copy the SN of the interested device to clipboard (MP4 in my case has serial: 0E13188B02237400, selected in the figure below)
- Close CYP GUI app.
- Run terminal and go to the openocd/bin directory
- Modify your script to include the serial number of the device using command “cmsis_dap_serial SN”. For example to select my MP4 device I include command “cmsis_dap_serial 0E13188B02237400” into the script after specifying the interface. (Note: the position of it is important)
./openocd -s ../scripts -c "interface kitprog3; cmsis_dap_serial 0E13188B02237400; transport select swd; adapter_khz 1500" -f target/psoc6.cfg -c "init; reset init; flash erase_sector 0 0 last; shutdown"