Page 1 of 1

Controlling linker behaviour

Posted: Wed Nov 20, 2019 11:48 am
by RobMeades
I have a complex application in which I suspect there is memory corruption going on. My usual approach to this is to put guard variables either side of the suspect variables (e.g. arrays) and then to check periodically if those guard variables are as expected.

However, the ESP32 linker has a mind of its own concerning where variables end up in memory, I cannot find a way to declare two variables beside each other and have them appear that way in the linker map.

Does anyone know of a way to control the linker behaviour that might help me out here?