Wednesday, January 19, 2011

Re-entrant output routines

  • Juan is here and I am showing him my current issue w.r.t. trying to import or re-code re-entrant version of the STDIO output routines fprintf() and/or fputs(), to allow the remote command routines to produce output w/o interfering with the output from the PPS ISR. Juan is researching what it would take to import the latest version of newlib into our environment, while Mike studies what it would take to re-implement.
  • Ray came by and we talked about plans/strategy/schedule. He wants to be ready to put demo in CLC by end of year. I'm not sure we can get that far along in time.
  • Juan found the newlib source used in our system. It appears that fputs() may already be re-entrant. So we are just going to try using it. Ditto for fprintf().
  • Mike thinks he found a way to burn the design into Flash! 1st try didn't work but we should try again later.
  • Code compiles now but is hanging upon startup. Juan and Mike went to lunch to mull things over. At lunch, Mike realized he probably just should have initialized his re-entrancy structures (still used in _printf_r()).
  • After lunch, Mike looked at the reent.h header file, and sure enough, there is a macro _REINT_INIT() that should have been used in the structure initializer. With that done, the code works perfectly now. Well, no... There's no STDOUT output! Maybe I should have initialized those fields of the re-entrancy structure explicitly. OK, that's fixed now.
  • Mike wrote a command processor for GO/STOP/RESET/RESTART commands, and added support for them to the Wi-Fi autorun script (to pass them through from the server), but none of this is tested yet. First, the autorun script needs to be recompiled & reloaded onto the Wi-Fi module. But it's almost 6:30 now, and Mike needs to head home. Finish this next week.

No comments:

Post a Comment