From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14857 invoked by alias); 23 Jul 2007 04:25:17 -0000 Received: (qmail 14804 invoked by uid 22791); 23 Jul 2007 04:25:16 -0000 X-Spam-Check-By: sourceware.org Received: from pop132.ocn.ne.jp (HELO pop132.ocn.ne.jp) (60.37.31.215) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 23 Jul 2007 04:25:13 +0000 Received: from ariga (p7072-ipbf408marunouchi.tokyo.ocn.ne.jp [124.87.211.72]) by pop132.ocn.ne.jp (OCN) with SMTP id l6N4P9b9006194 for ; Mon, 23 Jul 2007 13:25:09 +0900 (JST) Message-ID: <000b01c7cce1$751496e0$1c0110ac@ariga> From: "ariga masahiro" To: References: <002501c7caa1$631c1a40$1c0110ac@ariga> Date: Mon, 23 Jul 2007 04:25:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-2022-jp"; reply-type=response Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Difference between "go" on Script and manual enter? X-SW-Source: 2007-07/txt/msg00171.txt.bz2 Hi everyone, Since I posted first question about Script "go" not going well (I re_post it below), I am still in a terrible predicament. So,I beseech you again to help me. I post since-then-found information. I examined "go 0x8c010000" manually and on Script. I traced do_go(int argc, char *argv[]) function in main.c in both cases. I checked that arguments are the same in both cases. Both traces same-routed until these critical points, --- // set up a temporary context that will take us to the trampoline HAL_THREAD_INIT_CONTEXT((CYG_ADDRESS)workspace_end, entry, go_trampoline, 0); // switch context to trampoline HAL_THREAD_SWITCH_CONTEXT(&go_saved_context, &workspace_end); --- and I found that all arguments are same in both cases, that in case of manual execution,when execute HAL_THREAD_SWITCH_CONTEXT, apllication run like previously posted output,whereas on Script execution,it hangs and nothing appeares. My questions are, are there any factors to not run properly HAL_THREAD_SWITCH_CONTEXT in case of Script- "go"- execution. I appreciate any help. -- Below is my previous question. > I tested and confirmed that it worked, > when I loaded ROM-reserved application using "fis load" > and executed "go" command manually(that is, entered commands at > RedBoot prompt). > > But when I tried to do the same thing on Boot Script, > application never ran !! > > Strangely,if I write only "fis load" on Script,execute Script, > and after that I enter "go" command manually and execute, > then application properly run. > > I wonder what is difference between excuting "go" manually > and on Boot Script. > > I tried some delays before "go", but no effect. > > I post both outputs,and "fconfig" entering log. > > first only execute "fis load" on Script, > ------------------ > My Flash ID is 4:22f9:19:0 > config=0x8ffee000 cfg_base=0xa03ff000 > Ethernet eth0: MAC address 00:40:31:08:01:00 > IP: 0.0.0.0/255.255.255.0, Gateway: 0.0.0.0 > Default server: 0.0.0.8, DNS server IP: 0.0.0.8 > > RedBoot(tm) bootstrap and debug environment [ROM] > Non-certified release, version v2_0 - built 13:16:32, Jul 20 2007 > > Platform: inserter (SH 7709S) > Copyright (C) 2000, 2001, 2002, Red Hat, Inc. > > RAM: 0x8c000000-0x90000000, 0x8c00afa0-0x8ffed000 available > FLASH: 0xa0000000 - 0xa0400000, 64 blocks of 0x00010000 bytes each. > == Executing boot script in 3.000 seconds - enter ^C to abort > RedBoot> fis load -b 0x8c010000 basic1 > RedBoot> > ------------------ > > then,enter "go" manually,and application ran, > ------------------ > RedBoot> go 0x8c010000 > Network stack using 65536 bytes for misc space > 65536 bytes for mbufs > 131072 bytes for mbuf clusters > [cyg_net_init] Init: mbinit(0x00000000) > [cyg_net_init] Init: cyg_net_init_devs(0x00000000) > Init device 'lan91cxx_eth0' > [cyg_net_init] Init: loopattach(0x00000000) > [cyg_net_init] Init: ifinit(0x00000000) > IFP: 0x8c0427e0, next: 0x8c0904d8 > IFP: 0x8c0904d8, next: 0x00000000 > [cyg_net_init] Init: domaininit(0x00000000) > [cyg_net_init] Init: cyg_net_add_domain(0x8c0431d4) > New domain internet at 0x00000000 > [cyg_net_init] Init: cyg_net_add_domain(0x8c042c5c) > New domain route at 0x00000000 > [cyg_net_init] Init: cyg_route_init(0x00000000) > [cyg_net_init] Done > Hello eCos World!!! > > Thread A, count: 1 message: 75 > Thread A, count: 2 message: 75 > Thread B, message: 68 > ------------------ > > then,excute both commands on Script, > Application never ran, > ------------------ > My Flash ID is 4:22f9:19:0 > config=0x8ffee000 cfg_base=0xa03ff000 > Ethernet eth0: MAC address 00:40:31:08:01:00 > IP: 0.0.0.0/255.255.255.0, Gateway: 0.0.0.0 > Default server: 0.0.0.8, DNS server IP: 0.0.0.8 > > RedBoot(tm) bootstrap and debug environment [ROM] > Non-certified release, version v2_0 - built 13:16:32, Jul 20 2007 > > Platform: inserter (SH 7709S) > Copyright (C) 2000, 2001, 2002, Red Hat, Inc. > > RAM: 0x8c000000-0x90000000, 0x8c00afa0-0x8ffed000 available > FLASH: 0xa0000000 - 0xa0400000, 64 blocks of 0x00010000 bytes each. > == Executing boot script in 3.000 seconds - enter ^C to abort > RedBoot> fis load -b 0x8c010000 basic1 > RedBoot> go 0x8c010000 -w 5 > About to start execution at 0x8c010000 - abort with ^C within 5 seconds > ------------------ > > next is "fconfig" entering log, > ------------------ > RedBoot> fconfig > Run script at boot: true > Boot script: > .. fis load -b 0x8c010000 basic1 > Enter script, terminate with empty line >>> fis load -b 0x8c010000 basic1 >>> go 0x8c010000 -w 5 >>> > Boot script timeout (1000ms resolution): 3 > Use BOOTP for network configuration: false > Gateway IP address: > Local IP address: > Local IP address mask: 255.255.255.0 > Default server IP address: 0.0.0.8 > Console baud rate: 38400 > DNS server IP address: 0.0.0.8 > GDB connection port: 9000 > Force console for special debug messages: false > Network hardware address [MAC]: 0x00:0x40:0x31:0x08:0x01:0x00 > Network debug at boot time: false > Update RedBoot non-volatile configuration - continue (y/n)? y > ... Erase from 0xa03f0000-0xa0400000: . > ... Program from 0x8ffef000-0x8ffff000 at 0xa03f0000: . > RedBoot> > ------------------ > > My Application is a sample program in Anthony J. Massa's "Embedded > Software Development with eCos". Masahiro Ariga -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss