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.
My FPGA borad is Xilinx's XC7Z020, debug probe is ST-LINK V2.
I am not sure if you can use ST-LINK to program non ST devices. In the past I saw some forum posts said that the probe is locked down to ST device only
You might need to get a different debug adapter for your FPGA project.
OK, I see， which debug probe that you recommend?
It depends on your budget. If you want something really low cost, you can get a CMSIS-DAP from Adafruit
For educational use, J-LINK EDU is also affordable
For professional software development, I use ULINK Pro (http://www2.keil.com/mdk5/ulink) , but there are also others with many features:
J-Trace : https://www.segger.com/products/debug-probes/j-trace/models/j-trace/
I-Jet Trace : https://www.iar.com/iar-embedded-workbench/add-ons-and-integrations/in-circuit-debugging-probes/
Lauterbach u-Trace for Cortex-M : https://www.lauterbach.com/microtrace.html
Thank you very much! If we use one of these probe, 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?
We use ULINK to download program image to FPGA, but fail again, the Error Info and setup as follow :
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