From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5366 invoked by alias); 18 Jun 2005 16:55:22 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 5341 invoked by uid 22791); 18 Jun 2005 16:55:18 -0000 Received: from sta-206-168-96-204.rockynet.com (HELO hermes.chez-thomas.org) (206.168.96.204) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 18 Jun 2005 16:55:18 +0000 Received: by hermes.chez-thomas.org (Postfix, from userid 2000) id D87E0100045; Sat, 18 Jun 2005 10:55:15 -0600 (MDT) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by hermes.chez-thomas.org (Postfix) with ESMTP id BAABA100009; Sat, 18 Jun 2005 10:55:12 -0600 (MDT) From: Gary Thomas To: twomol Cc: eCos Discussion In-Reply-To: <20050618145824.CXP22651.fep2.bj1860.net@bit> References: <20050618145824.CXP22651.fep2.bj1860.net@bit> Content-Type: text/plain; charset=UTF-8 Date: Sat, 18 Jun 2005 16:55:00 -0000 Message-Id: <1119113712.13965.272.camel@hermes> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ECOS] It's very strange about the TFTP load code! X-SW-Source: 2005-06/txt/msg00158.txt.bz2 On Sat, 2005-06-18 at 23:05 +0800, twomol wrote: > All,hello! > I'm using mx1ads with redboot downloaded from freescale.com. May be I am supposed to consult freescale not here. But it's about the common tftp code.So if > any one could help ,I'll be very appreciate! > I can't use tftp to load file from host: > ----------------------------------------------------- > RedBoot> load -r -b 0x50000 redboot.bin > Using default protocol (TFTP) > Can't load 'redboot.bin': illegal TFTP operation > ----------------------------------------------------------- > I checked the source , "There is no function set" equal to "TFTP_EBADOP" defined in tftp_surppot.h. but I didn't find any function have code to set the feild 'err' of 'getc_info' with this value. > I found that the error messge is printed by the following code (in redboot_gec_init): > > res = (funcs->open)(info, &getc_info.err); > if (res < 0) { > diag_printf("Can't load '%s': %s\n", info->filename, (funcs->error)(getc_info.err)); > return res; > } > > I didn't found any code in the tftp_stream_open function set the err with TFTP_EBADOP. > I use multiice-gdb-server and insight to debug this code , from insight ,I found that sometims funcs->open's value isn't > the address of tftp_stream_open, and it's not a fixed value. > After return from funcs->open, the getc_info.err become 4 (i.e.TFTP_EBADOP). > My toolchain is the one downloaded from ecoscentirc.com > I can load file use xmodem and http protocol. > Any ideas? > Much Thanks! This sounds like a TFTP server problem. It may be permissions as Andrew suggested, or some TFTP servers insist that you use the entire path name, starting with a "/" Check your TFTP server setup. -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss