From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22611 invoked by alias); 26 Jun 2004 12:31:20 -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 22594 invoked from network); 26 Jun 2004 12:31:16 -0000 Received: from unknown (HELO hermes.chez-thomas.org) (63.225.98.241) by sourceware.org with SMTP; 26 Jun 2004 12:31:16 -0000 Received: by hermes.chez-thomas.org (Postfix, from userid 2000) id 4E00D100D22; Sat, 26 Jun 2004 06:31:16 -0600 (MDT) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by hermes.chez-thomas.org (Postfix) with ESMTP id A7E8210000E; Sat, 26 Jun 2004 06:31:15 -0600 (MDT) From: Gary Thomas To: anton yakovlev Cc: ecos-discuss@sources.redhat.com In-Reply-To: <40DD6B84.1090208@inbox.ru> References: <40DBDDB9.6060204@inbox.ru> <1088162900.16739.1.camel@hermes> <40DD3AF5.6010609@inbox.ru> <1088250606.16739.53.camel@hermes> <40DD6B84.1090208@inbox.ru> Content-Type: text/plain Organization: MLB Associates Message-Id: <1088253075.16739.57.camel@hermes> Mime-Version: 1.0 Date: Sat, 26 Jun 2004 12:31:00 -0000 Content-Transfer-Encoding: 7bit X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on hermes.chez-thomas.org Subject: Re: [ECOS] One question.. X-SW-Source: 2004-06/txt/msg00271.txt.bz2 On Sat, 2004-06-26 at 06:26, anton yakovlev wrote: > Gary Thomas wrote: > > >On Sat, 2004-06-26 at 02:59, anton yakovlev wrote: > > > > > >>Gary Thomas wrote: > >> > >> > >>>On Fri, 2004-06-25 at 02:09, anton yakovlev wrote: > >>> > >>> > >>>>Hi, all! > >>>> > >>>>I have a programm: > >>>>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > >>>>#include > >>>>#include > >>>> > >>>>void first(cyg_addrword_t threadData) { > >>>> > >>>> (void) threadData; > >>>> printf("the first thread\n"); > >>>> > >>>>} > >>>> > >>>>static char stack_a[4096]; > >>>>static cyg_thread thread_a; > >>>>static cyg_handle_t handle_a; > >>>> > >>>>void cyg_user_start(void) { > >>>> > >>>> cyg_thread_create(10, first, 0, "first", stack_a, 4096, &handle_a, > >>>>&thread_a); > >>>> cyg_thread_resume(handle_a); > >>>> > >>>>} > >>>>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > >>>>but when i try to executing it, i see only following: > >>>>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > >>>>RedBoot> load -r -m y -b 0x205000 > >>>>Raw file loaded 0x00205000-0x00210500 > >>>>xyzModem - CRC mode, 363(SOH)/0(STX)/0(CAN) packets, 3 retries > >>>>RedBoot> go 0x205000 > >>>> > >>>> > >>>Why did you specify raw mode (-r)? When you do this, RedBoot loads the > >>>file directly into memory without any processing at all, probably not > >>>what you want to do. > >>> > >>> > >>Because I upload exactly raw image.. neither elf-image, nor s-record.. > >> > >> > > > >That's fine (many people make mistakes here, but you've not). > > > >Was the program linked to load at 0x205000? eCos programs are *not* > >position independent and must be loaded to memory that matches how they > >are built/linked. > > > > > Hm.. I did not think about this.. I use GNU ld with "-L > -Wl,--gc-sections -nostartfiles -Ttarget.ld -nostdlib" flags.. Simple > "hello, world" and some more complex programms work's properly.. How to > check, which way the program was linked?.. The command "XXX-objdump -h file.elf" will show how the program was linked. > > PS: When I turn on full kernel debug, that my above programm work's > fine.. but when I try to execute more complex multithreaded program, > this programm failed while system initialization with "ASSERT FAIL: > mutex.cxx cyg_bool Cyg_Mutex::lock()".. :( This would be a separate problem. Have you run the standard tests to see how they perform on your platform? > > >>>How did you create the file that's being downloaded? Is it an > >>>executable (ELF) image? or possibly S-records? > >>> > >>> > >> From elf-image using objcopy.. > >> > >> > >>>>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > >>>>i.e. thread want not to start.. Why so?.. > >>>> > >>>>I have Falcom fx35xxlsi (based on NEC V850 processors family) platform > >>>>with eCos 2.0.. I build eCos from the sources.. Maybe I have broken > >>>>configuration?.. > >>>> > >>>> -- Gary Thomas MLB Associates -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss