AnsweredAssumed Answered

Why is shell terminated and MCU restarted in SDCard Demo?

Question asked by Manuel Malagon on Oct 8, 2019
Latest reply on Feb 6, 2020 by Daniel Chen

I successfully compiled and started a debug session for the mfs/examples/sdcard demo. But my serial terminal goes crazy and shows this over and over.


Shell (build: Oct 8 2019)
Copyright (c) 2013 Freescale Semiconductor;
shell> Terminating shell.
Shell exited, restarting...


Does anybody know if I need to do anything special to make this work? I single stepped through the Shell function in the shell.c file and I notice that the line:


if (!fgets(shell_ptr->CMD_LINE, sizeof(shell_ptr->CMD_LINE  ), shell_ptr->COMMAND_FP)) 


Always evaluates to true causing it to go to the "else" that contains:




So this function just sets shell_ptr->EXIT to true and finishes. But it is supposed to keep executing in a loop giving a shell for me to type commands in,  isn't it?


Could someone advice?