[ECOS] questrons about pc jump from rom to ram

张天勇 tyzhang01@gmail.com
Tue May 21 06:31:00 GMT 2013


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



More information about the Ecos-discuss mailing list