Hello all,
I just want to ask if there is any tutorial related to use st-link v2 with CW308 targets like STM32F0/F3?
thanks a lot
Hello all,
I just want to ask if there is any tutorial related to use st-link v2 with CW308 targets like STM32F0/F3?
thanks a lot
I use it with PyOCD which is rather easy to integrate with programmatically.
After installing PyOCD (pip3 install pyocd
), you’ll also need to download the CMSIS packages for the targets you want to program. In your case, you’ll need to run the following commands:
$ pyocd pack -i stm32f303rctx
$ pyocd pack -i stm32f071rbtx
To program a target, you need to create a session (look at pyocd.core.helpers.ConnectHelper
class for that) and then use pycod.flash.file_programmer.FileProgrammer
class to actually program the chip.
I unfortunately can’t share code yet, although it’s fully written and working. But it will be released (hopefully this year) on Github as part of our SCAAML repository with all the custom widgets and Jupyterlab notebook I’m currently designing.
And just for completeness, here is the mapping between all the PyOCD compatible CW308 targets (unless I missed one) and the corresponding device reference to give to PyOCD to install the required CMSIS pack:
efm32tg11b340f64gq48
efr32mg21a020f1024im32
mimxrt1062dvl6a
mk24fn1m0vll12
k82f25615
nrf52840
cy8c6247bzi-d44
atsam4lc2a
stm32f071rbtx
stm32f100rb
stm32f215retx
stm32f303rctx
stm32f415rgtx
stm32l443rctx
stm32l562retx
thanks for your reply.
it would be great if you can let me know how I can create a session exactly using helpers.
best regards