public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] questrons about pc jump from rom to ram
@ 2013-05-21  6:31 张天勇
  0 siblings, 0 replies; only message in thread
From: 张天勇 @ 2013-05-21  6:31 UTC (permalink / raw)
  To: ecos-discuss

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-21  6:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-21  6:31 [ECOS] questrons about pc jump from rom to ram 张天勇

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).