how to detect which line of code has modified the global variable (not debug mode)
Development environment: STM32F417ZG/keil uvision 5/FreeRTOS
Problem description: During the normal working phase of my product, a global variable is suddenly found to have been modified accidentally. This variable was not modified by my normal code as there is only one place where the normal code is modified and I am sure enough it doesn't get triggered. So it could have been caused by a memory stepping, thread safety or some other exception.
This is a very low probability problem, so it is difficult to reproduce the problem in keil's debug mode and use data breakpoint to locate the problematic code that modified this global variable.
My question is: how can I locate which line in my project's source code caused the global variable to be modified during the normal working phase of the product.
Does anyone have any good ideas on how to do this?
