From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23774 invoked by alias); 27 Oct 2003 18:07:33 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 23767 invoked from network); 27 Oct 2003 18:07:32 -0000 Received: from unknown (HELO anchor-post-31.mail.demon.net) (194.217.242.89) by sources.redhat.com with SMTP; 27 Oct 2003 18:07:32 -0000 Received: from calivar.demon.co.uk ([212.228.213.211] helo=miso.calivar.com) by anchor-post-31.mail.demon.net with esmtp (Exim 3.35 #1) id 1AEBm6-000Mge-0V; Mon, 27 Oct 2003 18:07:31 +0000 Received: from miso.calivar.com (miso.calivar.com [127.0.0.2]) by miso.calivar.com (Postfix) with ESMTP id D6CC228DF45; Mon, 27 Oct 2003 16:49:26 +0000 (GMT) To: =?iso-8859-1?q?Rub=E9n_P=E9rez?= de Aranda Alonso Cc: ecos-discuss@sources.redhat.com References: <3F9CDCE5.9000106@sidsa.es> From: Nick Garnett Date: Mon, 27 Oct 2003 18:07:00 -0000 In-Reply-To: <3F9CDCE5.9000106@sidsa.es> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [ECOS] Execution of constructors in at91 X-SW-Source: 2003-10/txt/msg00465.txt.bz2 Rub=E9n P=E9rez de Aranda Alonso writes: > Hello, > I am working with the at91 eb40 porting of eCOS to develop another > port for a prototype based on the same microcontroller. I now use > the EmbeddedIce pod to debug the eCOS and execute the tests of the > different parts and layers, but I would like use the Redboot and its > GDB stub because it allows me write the falsh chips and the > comunication with the host is faster. I have installed a redboot > image in flash. With the load command in GDB I upload the > application in the RAM memory that has been compiled to be executed > in RAM and with a ROM monitor. The problem is when the eCOS startup > code calls to the cyg_hal_invoke_constructors() function. This > function uses the symbols allocated by the linker, __CTOR_LIST__ and > __CTOR_END__, to know the address of the constructors belonging to > *.ctors binary sections of the different object files. The function > calls to these constructors without verify if the function pointer > points to NULL, so the pc register branch to the 0x0 address and > execute the reset vector. There should not be NULL pointers in the constructor table. So the thing to do is find out why they are there. Make sure you have not corrupted the linker script in some way. Also, add the option "-Wl,-Map,map" to the linker options, take a look at the map file produced and see where the sections being added to the constructor table are coming from. --=20 Nick Garnett eCos Kernel Architect http://www.ecoscentric.com The eCos and RedBoot experts -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss