qzroger 发表于 2014-3-26 16:49 
int main()
{
SDRAMInit(); - if( 0x10000000 == (*(uint32_t *)(APPLICATION_ADDRESS) & 0xffff0000))
- {
- /* Test if user code is programmed starting from address "APPLICATION_ADDRESS" */
- if (((*(__IO uint32_t*)APPLICATION_ADDRESS) & 0x1FFE0000 ) == 0x10000000)
- {
- cm3_int_close();
- led_off();
- /* Jump to user application */
- JumpAddress = *(__IO uint32_t*) (APPLICATION_ADDRESS + 4);
- Jump_To_Application = (pFunction) JumpAddress;
- /* Initialize user application's Stack Pointer */
- __set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS);
- Jump_To_Application();
- }
- }
上面是跳转的代码
你的main里面应该少了load的代码,不过这些都比较简单了,memcpy就可以了。
- ; *************************************************************
- ; *** Scatter-Loading Description File generated by uVision ***
- ; *************************************************************
- LR_IROM1 0xa0000000 0x00080000 { ; load region size_region
- ER_IROM1 0xa0000000 0x00080000 { ; load address = execution address
- *.o (RESET, +First)
- *(InRoot$$Sections)
- .ANY (+RO)
- }
- RW_IRAM1 0xa0080000 0x00010000 { ; RW data
- .ANY (+RW +ZI)
- }
- }
|