1

i have stm32 controller & debugging it via linux terminal. I have tried to read the real time date from ARM controller while debugging in ubuntu by arm-none-eabi-gdb but unfortunately i can only monitor the variables data if applied the break points over the source code so can you help me to live watch the variable without use any break points in source code in the Linux terminal ( same like IAR live watch)

suresh s2k
  • 11
  • 2
  • What are you using to connect gdb with stm32? If you are you using openocd there are commands such as mdw to display 32bits of memory. You can execute an openocd command from gdb prompt using "monitor" command. For example: (gdb) monitor mdw 0x20000000 Also, at a breakpoint you can make the program run with "monitor resume" – Balau Apr 14 '19 at 19:57
  • thanks lot for your support.... yes i am using openocd to connect with controller. but As you said , is there any possibility to monitor data continously without apply any break point in the source code – suresh s2k Apr 15 '19 at 05:00

2 Answers2

0

You need to use the trace. https://www.segger.com/products/debug-probes/j-trace/

http://blog.atollic.com/cortex-m-debugging-real-time-variable-watch-using-swv/swo

BTW Linux is not the best environment for the uC development as most of the debugging software was written to run under Windows. It is not because there is something wrong with Linux - the companies focus on the OS-es most of the customers use

0___________
  • 60,014
  • 4
  • 34
  • 74
0

Live expression works in ST CubeIDE 1.7 on Manjaro linux here.
Both stlink + openocd, and stlink + stlink server works.
I think live watching with some python code is possible (openocd + stlink)?

Tracing tells you where arm core walk through, however not the value of variables, as watching variables realtime is more difficult than tracing $PC changing with referencing elf file. Variable watching need much more bandwidth, I believe.

elan
  • 1