AnsweredAssumed Answered

The question about the tftpsrv in the MQX

Question asked by Robin Zou on Apr 9, 2015
Latest reply on May 6, 2015 by Daniel Chen


The “tftpsrv.c” is used in my application. When I write the file to my application by tftp for many times, there is an error “TFTP Server Failure”. The error happens when writing the file in the 6th times. I set the break pointer to find the reason. I find that the source code run to the red part as follow shown. But if I read the file for many times, there is not any error. Can you help me find out the reason?




  1. 1.My hardware : TWRK64F120M.The compiler is IAR7.4.
  2. 2.The MQX: Freescale_MQX_4_1_TWRK64F120M
  3. 3.The PC software is “Tftpd32 by Ph.Jounin”
  4. 4.The error happens in the source code of “tftpsrv.c”.


/* create a socket for the new transaction */


   trans_ptr->SOCK = socket(PF_INET, SOCK_DGRAM, 0);


   if (trans_ptr->SOCK == RTCS_SOCKET_ERROR) {


TFTP_SEND(tftpsrv_ptr->SRV_SOCK, _tftp_error_srv, sockaddr_t);








   } /* Endif */