From: Chris Holgate <chris@zynaptic.com>
To: ecos-devel@ecos.sourceware.org
Subject: Minor fix for CortexM vectors.S
Date: Tue, 18 Nov 2008 11:42:00 -0000 [thread overview]
Message-ID: <1227008854.29306.73.camel@hercules.zynaptic.com> (raw)
Hi folks,
This is a minor fix that I found while building the ROM based target for
my STM32 board. The hal_switch_state_vsr can generate invalid
EXC_RETURN values in the link register for certain alignments - the fix
is to ensure that bit 1 is always cleared. It's also possible to
reclaim a bit of RAM for the interrupt stack:
*** cvs-14.11.08/ecos/packages/hal/cortexm/arch/current/src/vectors.S
2008-11-03 14:53:51.000000000 +0000
---
working-14.11.08/ecos/packages/hal/cortexm/arch/current/src/vectors.S
2008-11-18 11:10:31.000000000 +0000
***************
*** 129,140 ****
--- 129,142 ----
isb // Insert a barrier
msr psp,sp // Copy SP to PSP
+ ldr sp,=hal_startup_stack // Reset SP to top of RAM
#if !defined(CYGPKG_KERNEL)
sub sp,#(CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE/2)
#endif
orr lr,#0xD // Adjust return link
+ bic lr,#0x2
bx lr // Return to init code on PSP
Chris.
next reply other threads:[~2008-11-18 11:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-18 11:42 Chris Holgate [this message]
2008-11-19 16:31 ` Nick Garnett
2008-11-19 18:00 ` Chris Holgate
2008-11-19 18:12 ` Nick Garnett
2008-11-19 19:21 ` Chris Holgate
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=1227008854.29306.73.camel@hercules.zynaptic.com \
--to=chris@zynaptic.com \
--cc=ecos-devel@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).