From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24357 invoked by alias); 25 Aug 2011 10:01:24 -0000 Received: (qmail 24343 invoked by uid 22791); 25 Aug 2011 10:01:23 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mailout-de.gmx.net (HELO mailout-de.gmx.net) (213.165.64.22) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Thu, 25 Aug 2011 10:01:07 +0000 Received: (qmail invoked by alias); 25 Aug 2011 10:01:05 -0000 Received: from mail.neratec.ch (EHLO [192.168.11.84]) [80.75.119.105] by mail.gmx.net (mp072) with SMTP; 25 Aug 2011 12:01:05 +0200 Message-ID: <4E561D61.4000006@gmx.ch> Date: Thu, 25 Aug 2011 10:01:00 -0000 From: Philipp Meier User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: ecos-discuss@ecos.sourceware.org References: <20110824103404.51600@gmx.net> <20110824141051.115980@gmx.net> <20110824145744.116000@gmx.net> <20110825084845.184240@gmx.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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] ecos-3.0 current stm32 bug? X-SW-Source: 2011-08/txt/msg00053.txt.bz2 0x8040025 is only the entry in the hal_vsr_table[11] (seems to always be the real address + 1). I.e. (gdb) print /fx hal_vsr_table[11] $6 = 0x8040025 (gdb) print hal_switch_state_vsr $4 = {} 0x8040024 Philipp On 08/25/2011 11:33 AM, Christophe Coutand wrote: > Try to word align hal_switch_state_vsr (currently you have 0x8040025) and see what happens. Also can you post the dissembled version to understand why hal_switch_state_vsr is placed like that. > > Christophe > >> -----Original Message----- >> From: Philipp Meier [mailto:pme.neratec@gmx.ch] >> Sent: 25. august 2011 10:49 >> To: Christophe Coutand; ecos-discuss@ecos.sourceware.org >> Subject: Re: RE: RE: [ECOS] ecos-3.0 current stm32 bug? >> >> Hello Christophe >> >> it is the SWI instruction ("svc 0" in disassem code) that triggers the >> exception (therefore breakpoint in hal_switch_state_vsr is never >> reached). >> >> Where does the SWI instruction get's it's information about where to >> jump to? Is it the hal_vsr_table (located at 0x20000000)? In entry 11 I >> have 0x8040025 which is the address for hal_switch_state_vsr - and yet >> it does not jumps to 0x8040025 but instead to 0x8040042 >> (hal_default_exception_vsr). >> >> Any idea about the reason for this behaviour? >> >> Cheers Philipp >> >> -------- Original-Nachricht -------- >>> Datum: Wed, 24 Aug 2011 09:40:02 -0700 >>> Von: "Christophe Coutand" >>> An: "Philipp Meier", ecos- >> discuss@ecos.sourceware.org >>> Betreff: RE: RE: [ECOS] ecos-3.0 current stm32 bug? >>> What about setting a breakpoint in hal_switch_state_vsr? Is it the >> SWI >>> instruction that triggers the exception or is it the execution of the >>> hal_switch_state_vsr routine? >>> >>> Christophe >>> >>>> -----Original Message----- >>>> From: ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss- >>>> owner@ecos.sourceware.org] On Behalf Of Philipp Meier >>>> Sent: 24. august 2011 16:58 >>>> To: ecos-discuss@ecos.sourceware.org >>>> Subject: Re: RE: [ECOS] ecos-3.0 current stm32 bug? >>>> >>>> Hello Christophe, >>>> >>>> Yes - both are ROM startup type. The bootloader without offset >> (i.e. >>>> offset 0x0), the application with offset 0x40000. >>>> >>>> In the bootloader elf file hal_vsr_table is 20000000 and the same >> is >>>> true for the application. >>>> >>>> GDB debug output when debugging the startup of the application: >>>> >>>> Bad case (Linux built bootloader): >>>> ---------------------------------- >>>> (gdb) print /fx hal_vsr_table >>>> $1 = {0x441c4c08, 0x61232301, 0x8040043, 0x8040043, 0x8040043, >>>> 0x8040043, 0x8040043, 0x8040043, 0x8040043, 0x8040043, >>>> 0x8040043, 0x8040025, 0x8040043, 0x8040043, 0x8040089, 0x8040075 >>>> } >>>> (gdb) print /fx&hal_vsr_table >>>> $2 = 0x20000000 >>>> >>>> Good case (Cygwin built bootloader): >>>> ---------------------------------- >>>> (gdb) print /fx hal_vsr_table >>>> $1 = {0x4024f8df, 0xf04f4d09, 0x8040043, 0x8040043, 0x8040043, >>>> 0x8040043, 0x8040043, 0x8040043, 0x8040043, 0x8040043, >>>> 0x8040043, 0x8040025, 0x8040043, 0x8040043, 0x8040089, 0x8040075 >>>> } >>>> (gdb) print /fx&hal_vsr_table >>>> $2 = 0x20000000 >>>> >>>> Cheers >>>> Philipp >>>> >>>> -------- Original-Nachricht -------- >>>>> Datum: Wed, 24 Aug 2011 07:22:53 -0700 >>>>> Von: "Christophe Coutand" >>>>> An: "Philipp Meier", "ecos discuss">>> ... -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss