public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: 张天勇 <tyzhang01@gmail.com>
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] questrons about pc jump from rom to ram
Date: Tue, 21 May 2013 06:31:00 -0000	[thread overview]
Message-ID: <CAPkEfgZz7eE-Japfa_5Jc4KsNxq8aay8k49HfvVQs5ikAWfx0A@mail.gmail.com> (raw)

Hi all
I am working on the stm32f207zg board, and going to develop a
bootloader myself which works same as redboot.The loader will receive
the executable through the net and save which to the ram, and then
jump PC from ROM to RAM to execute the new executable.
In case of redboot,after load a new executable to the ram, type the
commend of go 0x64008011, then the new executable in RAM works.
But in case of my bootloader, i use the following code to realize the
same job. Disable the interrupt first, jump sp to the top of ram then
, and finally jump pc to the entry address of executable in ram.
HAL_DISABLE_INTERRUPTS(oldints);
__asm__ volatile("ldr sp,=0x64800000" );
(*(void (*)(void))(0x64008011))();
But it cannot work. so,would anybody give me some advice,thanks very much!

-- 
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:[~2013-05-21  6:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAPkEfgZz7eE-Japfa_5Jc4KsNxq8aay8k49HfvVQs5ikAWfx0A@mail.gmail.com \
    --to=tyzhang01@gmail.com \
    --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).