From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10881 invoked by alias); 27 Oct 2003 08:51:44 -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 10872 invoked from network); 27 Oct 2003 08:51:42 -0000 Received: from unknown (HELO urano.sidsa.es) (195.53.86.130) by sources.redhat.com with SMTP; 27 Oct 2003 08:51:42 -0000 Received: from sidsa.es ([195.53.86.199]) by urano.sidsa.es (8.12.10/8.11.4) with ESMTP id h9R8blit022452 for ; Mon, 27 Oct 2003 09:37:47 +0100 Message-ID: <3F9CDCE5.9000106@sidsa.es> Date: Mon, 27 Oct 2003 08:51:00 -0000 From: =?ISO-8859-1?Q?Rub=E9n_P=E9rez_de_Aranda_Alonso?= Organization: SIDSA User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ecos-discuss@sources.redhat.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: [ECOS] Execution of constructors in at91 X-SW-Source: 2003-10/txt/msg00447.txt.bz2 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. If I do not permit to target execute the call to this function (cyg_hal_invoke_constructors()) using the GDB, the execution of the code goes on right until the execution of HAL_THREAD_LOAD_CONTEXT( &next->stack_ptr ) in line 384 of sched.cxx file. These two problems don't occur when I compile an image of the application with ROM startup and I upload it to target with the Embedded ICE pod. Thanks, Rubén -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss