2016-01-25 09:22 AM
Who know? How to detect session of debugger in user program? This is need for prevent use coresponding i/o ports in program, during debugging the STM32F334.
Thanks. #debuging #debugging #debugging2016-01-25 10:28 AM
Look at DBGMCU clocks being enabled, and peripheral settings.
2016-01-25 02:30 PM
I read about it. Apparently there is no way to determine the connected debugger.
2016-01-25 03:41 PM
I'm pretty sure it is going to be perceptible in some manner. Look also at the ITM, DWT and CoreDebug registers.
By the time you reach main() some of the AHB/APB settings, and reset states are going to be a bit fogged up, but at the ResetHandler the debugger is likely to have tweaked enough settings for its own needs that you're going to be able to determine if you are running with/without a debugger attached.2016-01-25 05:00 PM
OutString(''Welcome to Nucleo F401RE\r\n'');
printf(''%08X %08X %08X %08X\n'', CoreDebug->DHCSR,CoreDebug->DCRSR,CoreDebug->DCRDR,CoreDebug->DEMCR); printf(''%08X %08X %08X\n'', ITM->TCR, ITM->TER, ITM->IMCR); printf(''%08X\n'', DWT->CTRL); Welcome to Nucleo F401RE (On Debugger) 01010001 00000000 00000000 01000000 00000000 00000000 00000000 40000001 Welcome to Nucleo F401RE (Reset One) 03010001 00000000 00000000 01000000 00000000 00000000 00000000 40000001 Welcome to Nucleo F401RE (Reset Two) 03010001 00000000 00000000 01000000 00000000 00000000 00000000 40000001 Welcome to Nucleo F401RE (Debugger restarted) 01010001 00000000 00000000 00000000 00000001 00000001 00000001 9D513BA1 S_RESET_ST seems to flagginghttp://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337e/CEGCJAHJ.html
2016-01-26 01:09 AM
Thank you very match. I so far do not know small details of machine debugger.
However, an unambiguous conclusion about the possible activity of the debugger can not be done, based on this information. Or is it, perhaps, not quite simple. Maybe C_DEBUGEN in DHCSR is unambiguous sign of activity the debugger? Description in ''8.2.2. Debug Halting Control and Status Register'' very insufficiently. I will explore.