From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13272 invoked by alias); 20 Jun 2006 22:26:20 -0000 Received: (qmail 13151 invoked by uid 22791); 20 Jun 2006 22:26:19 -0000 X-Spam-Check-By: sourceware.org Received: from tomts20.bellnexxia.net (HELO tomts20-srv.bellnexxia.net) (209.226.175.74) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 20 Jun 2006 22:26:16 +0000 Received: from smtp1.sympatico.ca ([209.226.175.22]) by tomts20-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with SMTP id <20060620222612.YUVG16051.tomts20-srv.bellnexxia.net@smtp1.sympatico.ca> for ; Tue, 20 Jun 2006 18:26:12 -0400 X-Mailer: Openwave WebEngine, version 2.8.6.6 (webedge20-101-174-112-20020617)" From: Andre-John Mas Reply-To: ajmas@bigfoot.com To: Date: Tue, 20 Jun 2006 22:26:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Message-Id: <20060620222612.YUVG16051.tomts20-srv.bellnexxia.net@smtp1.sympatico.ca> X-IsSubscribed: yes 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 Subject: Re: [ECOS] Reading flash config value from application X-SW-Source: 2006-06/txt/msg00189.txt.bz2 Hi, I am not sure what I am doing wrong, but CYGACC_CALL_IF_FLASH_CFG_OP is not finding the value (returning false). I am trying to read the "bootp_my_ip" value. Every time the card restarts the redboot sees the right values, so it doesn't seem to be an issue of data getting over-written. Below are the modifications I made to network_support.c in the net/common package: #include // For fetching the IP info from RedBoot #include #ifndef CONFIG_IP #define CONFIG_IP 5 #endif typedef unsigned char ip_addr_t[4]; // // taken from redboot ... net/net_io.c // static bool flash_get_IP(char *id, ip_addr_t *val) { ip_addr_t my_ip[4]; int i; if (CYGACC_CALL_IF_FLASH_CFG_OP(CYGNUM_CALL_IF_FLASH_CFG_GET, id, &my_ip, CONFIG_IP)) { diag_printf("flash_get_IP %s\n", my_ip); if (my_ip[0] != 0 || my_ip[1] != 0 || my_ip[2] != 0 || my_ip[3] != 0) { // 'id' is set to something so let it override any static IP for (i=0; i<4; i++) (*val)[i] = my_ip[i]; } } else { return false; } } and then in the init_all_networks_interfaces() function I have: struct in_addr card_ip; flash_get_IP("bootp_my_ip", card_ip.s_addr); Any ideas what I might be doing wrong? Andre -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss