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.
You need to remove the STM32 flash option from your project. Otherwise the IDE will try to use the STM32 flash algorithm to to program verification which won't work on your FPGA.
And yes, you can use 3rd party debug probes for flash programming. If you are a SoC designer, and creating your own MCU, you need to create your flash algorithm. There is a template in
Yes，we first remove the STM32 flash option, but I don't know if the download have successful. So, I hope you tell us,can we directly access FLASH, to debug the SOC system?For our SOC FLASH access system, do we need to do anything with probe? Do we need to design for SWD in SOC?
If we don't use STM32 flash algorithm , which algorithm to write memory? For example, which address we should write?
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