Asking all super-dev geeks who know how the Particle chips work. In my embedded microprocessor programming experience, I know how easy it is to lose control of the stack in assembler. My question: Say I’m in a “while()” loop, and jump out with a “goto”, because a “break” won’t exit far enough? Will that foul the Particle Core/Photon’s stack?
while (x < 5)
case 1: …
case 2: …
if (TOut) goto Fail;
Fail: Serial.println(“Routine failed!”);
I don’t know how the stack is implemented on the Particle chips, but in my case, that would foul the stack, as the WHILE arguments would never get popped off. And when the stack runs out of control, a hard reset usually follows.
P.S. I’m just curious, as code can usually be written a couple of different ways.