pyOCD icon indicating copy to clipboard operation
pyOCD copied to clipboard

st-info --chipid and --descr like functionality

Open eugene-bright opened this issue 2 years ago • 2 comments

st-info can rougtly identify the chip:

$ st-info --chipid 
0x0466

$ st-info --descr
G030/G031/G041

I wonder if such functionality can be added to the pyOCD.

eugene-bright avatar May 31 '22 18:05 eugene-bright

It looks like the chipid is stored in magic register 0xE000ED00 in case of STM32 chips https://github.com/stlink-org/stlink/blob/924e1ec93b9080593a10c02c25e483a0ceb60a04/src/common.c#L187 https://github.com/stlink-org/stlink/blob/cb551d50f879ec21e3d54c75041bffe506e830e5/doc/dev/developer.txt#L333

eugene-bright avatar May 31 '22 19:05 eugene-bright

pyOCD's 'User script' feature is very handy to do things like this.

And also there is a valuable accumulation of knowledge in pystlink's repo nicely licensed under MIT license. https://github.com/pavelrevak/pystlink/blob/master/lib/stm32devices.py

elfmimi avatar May 31 '22 21:05 elfmimi