We are using Cortex-M0 DesignStart Pro to design MCU. When we use SWD to download grogram to flash in FPGA(Cortex_m0 mcu inside), we cannot to connect keil with FPGA, and Keil shows:" Could not stop Cortex-M device!Please check the JTAG cable. "
Attached are keil display error messages, simulation waveforms, and data analysis captured by the logic analyzer.
For FPGA prototype, after you entered debug view in Keil MDK, you can save the memory content using save command
For SoC design with embedded flash, you need to discuss with the embedded flash provider to see what they can provide. The STM32 flash algorithm in Keil MDK is designed to work with embedded flash controller designed by ST, and your flash controller is likely to be different so cannot be reused.
Potentially you need to create you own flash controller algorithm from scratch unless the embedded flash provider provide you the code. Please has a look at:
And the template in you Keil MDK installation (C:\Keil_v5\ARM\Flash\_Template)
You might also like to have a look at one of Arm's IP call CoreLink SDK 101 which has a flash controller