Startup Sequence
Posted: Fri Jun 07, 2019 3:31 am
Are the modules initialised in the order as listed in the ".map" file?
Background: I want to "intercept" the reset process at some point. Upon run-errors or some MCU faults, my process scheduler can reset and restart a single process and continue, as an attempt to keep the (unsupervised) program going. If the problem persists, and the faulty process is not essential, it can be shut down. Otherwise, at some point, I want to reset the whole program by resetting the processor, again, attempting to keep it going, in parallel to issuing an alarm (as with a watchdog reset). This can lead to repeated resets, obviously, which I need to detect, and stop, resulting in the final screeching halt.
Hence, I am now figuring out where to put this repeated-reset detection in the startup sequence. I think I can safely put it in Main.mod. Or do I miss something regarding the startup code here?
Background: I want to "intercept" the reset process at some point. Upon run-errors or some MCU faults, my process scheduler can reset and restart a single process and continue, as an attempt to keep the (unsupervised) program going. If the problem persists, and the faulty process is not essential, it can be shut down. Otherwise, at some point, I want to reset the whole program by resetting the processor, again, attempting to keep it going, in parallel to issuing an alarm (as with a watchdog reset). This can lead to repeated resets, obviously, which I need to detect, and stop, resulting in the final screeching halt.
Hence, I am now figuring out where to put this repeated-reset detection in the startup sequence. I think I can safely put it in Main.mod. Or do I miss something regarding the startup code here?