This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

rm48 bootloader 应用程序跑飞

我最近在做bootloader,现在应用程序仿真时会跑飞。

         bootloader的程序,cmd文件分配地址时,vectors是从0x00000000开始的,即系统复位地址从0开始。

         但是app程序的vectors地址我指向了其它位置,0x00180000,这样编译成功后,烧写程序后仿真,不能运行到main函数,程序直接跑飞。

         我分析的原因是vectors的复位地址指向了其它位置而不是0x00000000,这样硬件复位后找不到入口,从而不能从_cint_00开始执行。

         所以我的问题是:若将vectors地址指向其它位置,还需要配合什么其它的操作处理?

bootloader的cmd文件:

MEMORY
{
    VECTORS    (X)   : origin=0x00000000 length=0x00000020
     FLASH0     (RX)  : origin=0x00000020 length=0x0017ffe0   //LS31x and RM48 Flash size is 0x300000
    SRAM       (RW)  : origin=0x08002000 length=0x0002D000
    STACK      (RW)  : origin=0x08000000 length=0x00002000
}
SECTIONS
{
   .intvecs : {} > VECTORS

   .text  > FLASH0
   .const > FLASH0
   .cinit > FLASH0
   .pinit > FLASH0
   .data  > SRAM
   .bss   > SRAM
}
应用程序cmd文件:
MEMORY
{
    VECTORS (X)  : origin=0x00180000 length=0x00000020
    FLASH1  (RX) : origin=0x00180020 length=0x0017ffe0
    STACKS  (RW) : origin=0x08000000 length=0x00001500
    RAM     (RW) : origin=0x08001500 length=0x0003EB00
}
/*----------------------------------------------------------------------------*/
/* Section Configuration                                                      */
SECTIONS
{
    .intvecs : {} > VECTORS
    .text    : {} >  FLASH1
    .const   : {} > FLASH1
    .cinit   : {} > FLASH1
    .pinit   : {} > FLASH1
    .bss     : {} > RAM
    .data    : {} > RAM
    .sysmem  : {} > RAM
}