public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Philipp Meier <pme.neratec@gmx.ch>
To: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] ecos-3.0 current stm32 bug?
Date: Thu, 25 Aug 2011 10:01:00 -0000	[thread overview]
Message-ID: <4E561D61.4000006@gmx.ch> (raw)
In-Reply-To: <D6050C555CC56940A7AF326522830276044AEAF7@mail2.STMIRV01.COM>

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 = {<text variable, no debug info>} 0x8040024 <hal_switch_state_vsr>

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"<ccoutand@stmi.com>
>>> An: "Philipp Meier"<pme.neratec@gmx.ch>, 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
>>>> <repeats 61 times>}
>>>> (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
>>>> <repeats 61 times>}
>>>> (gdb) print /fx&hal_vsr_table
>>>> $2 = 0x20000000
>>>>
>>>> Cheers
>>>> Philipp
>>>>
>>>> -------- Original-Nachricht --------
>>>>> Datum: Wed, 24 Aug 2011 07:22:53 -0700
>>>>> Von: "Christophe Coutand"<ccoutand@stmi.com>
>>>>> An: "Philipp Meier"<pme.neratec@gmx.ch>, "ecos discuss"<ecos-
>>>> ...


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2011-08-25 10:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-24 10:34 Philipp Meier
2011-08-24 11:35 ` Sergei Gavrikov
2011-08-24 14:11   ` Philipp Meier
2011-08-24 14:26     ` Christophe Coutand
2011-08-24 14:58       ` Philipp Meier
2011-08-24 16:44         ` Christophe Coutand
2011-08-25  8:49           ` Philipp Meier
2011-08-25  9:37             ` Christophe Coutand
2011-08-25 10:01               ` Philipp Meier [this message]
2011-08-25 10:38             ` Nick Garnett
2011-08-25 11:25               ` Philipp Meier
2011-08-25 12:12                 ` Nick Garnett
2011-08-25 12:13               ` Philipp Meier
2011-08-25 12:31                 ` Nick Garnett
2011-08-25 12:52                   ` Philipp Meier
2011-08-25 13:46                     ` Nick Garnett
2011-08-24 18:54     ` Sergei Gavrikov
2011-08-25  8:54       ` Philipp Meier
2011-08-25  9:07       ` Philipp Meier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E561D61.4000006@gmx.ch \
    --to=pme.neratec@gmx.ch \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).