public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: Ilija Kocho <ilijak@siva.com.mk>
To: eCos developers <ecos-devel@ecos.sourceware.org>
Subject: Cortex-M Vector Table Offset
Date: Wed, 22 Dec 2010 13:37:00 -0000	[thread overview]
Message-ID: <4D11FF19.6000304@siva.com.mk> (raw)

Hello

In a course of porting eCos to Cortex-M based devices, other than STM32,
an issue occurs that must be addressed.

The problem (In following discussion I refer to ROM start-up configuration):

In current Cortex-M port the Vector Table Offset is fixed (VTOR set) by
architecture port to 0x20000000 (CYGARC_REG_NVIC_VTOR_TBLBASE_SRAM
defined in hal/cortexm/arch/<version>/include/hal_io.h). This is the
place where it should be expected but on some devices this is not possible:

The example is NXP LPC 17xx family that has no RAM in Data (SRAM)
partition (i.e. at 0x20000000). Instead SRAM is located within Code
partition at address 0x10000000.

Proposed solution:

Define Vector Table base (CYGARC_REG_NVIC_VTOR_TBLBASE_SRAM) in the
variant with override option for the platform: respective var_io.h
and/or plf_io.h.

Also there is apparent dependence between
CYGARC_REG_NVIC_VTOR_TBLBASE_SRAM and devices' memory configuration(s)
so we could consider some shared defines with pkgconf files and/or CDL.
This could provide flexibility useful for some other devices such as
Freescale Kinetis family.

Patch(es) should be easy and harmless. I could produce ones after
discussion.

For the end I have one question: What is use of
CYGARC_REG_NVIC_VTOR_TBLOFF(0) (hal/cortexm/arch/current/src/hal_misc.c)

Best regards
Ilija

             reply	other threads:[~2010-12-22 13:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22 13:37 Ilija Kocho [this message]
     [not found] ` <D6050C555CC56940A7AF3265228302761394DC@mail2.STMIRV01.COM>
2010-12-31  9:01   ` Ilija Kocho

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=4D11FF19.6000304@siva.com.mk \
    --to=ilijak@siva.com.mk \
    --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).