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.

C6416 自动搬flash 1k bootloader 后无法自启动



各位前辈好:

最近在调试C6416的bootloader代码,目前的情况是:

1、DSP有两套程序,分别为boot和app,外挂flash在EMIFB 的CE1,因为IPRAM有1M,够用了,就没用外挂的SDRAM

2、APP程序从0x400开始分配空间,之前的留给boot,可以用JTAG在线跑,没问题

3、boot程序中只写了main函数(疑问1,是否可以在boot程序中用main函数),没用任何中断,但是配置了中断向量表,以免c_int00不能用(疑问2,是否一定需要中断向量表,并给.vectors分配空间)。boot程序的思路是,首先初始化EMIFB,然后将flash存储APP的地址空间搬到IPRAM里面执行,IPRAM从0x400开始用,在APP中,.vectors的起始地址是0x400,最后跳转到0x400地址

因为APP程序运行起来会通过串口发包,现在串口没数据,表明APP没跑起来

另外还有个问题,用hex6x的时候,在ROMS里面写的那个地址和长度是什么意思,看了很多手册,确实也没理解

谢谢!期待回复!

附下boot程序和APP的cmd文件

boot:

MEMORY
{
BOOT_RAM: o = 0x00000000 l = 0x00000400
IPRAM: o = 0x000FD000 l = 0x00003000 /* 1MB L2 Internal RAM */

}

SECTIONS
{
BOOTloader > BOOT_RAM
.text > IPRAM
.stack > IPRAM
.bss > BOOT_RAM
.cio > BOOT_RAM
.const > BOOT_RAM
.data > BOOT_RAM
.switch > BOOT_RAM
.sysmem > BOOT_RAM
.far > BOOT_RAM
.args > BOOT_RAM
.ppinfo > BOOT_RAM
.ppdata > BOOT_RAM
.vectors > BOOT_RAM

/* COFF sections */
.pinit > BOOT_RAM
.cinit > BOOT_RAM

}

APP

MEMORY
{
IN_BOOT : origin =0x00000000,len =0x00000400
IN_VECT : origin =0x00000400,len =0x00000200
IN_INIT : origin =0x00000600,len =0x00004000
IN_CONST : origin =0x0004600,len =0x00001000
IN_CODE : origin =0x00005600,len =0x00071500
IN_DATAFAST: origin =0x00076B00,len =0x00080000

DRAM : origin =0x000F6B00,len =0x00006500
DRAM_s : origin =0x000FD000,len =0x00003000
IN_ALM : origin =0xA0000000,len =0x00002500
CE2_FAR : origin =0xA0002500,len =0x000FDB00

RESET_ADD: origin =0xA0100000,len =0x00020000

CE2_RS422 : origin =0xA0120000,len =0x000E0000

}

SECTIONS
{

.vectors : >IN_VECT


.cinit : >IN_INIT
.pinit : >IN_INIT
.switch : >IN_INIT
.const : >IN_CONST

.text : >IN_CODE


.data : >IN_DATAFAST
.bss : >DRAM

.far : >IN_DATAFAST
.cio : >DRAM
.args : >DRAM
.data_self : >DRAM
.data_far : >CE2_FAR
.stack : >DRAM_s
.reset_add : >RESET_ADD
.data_RS422 : >CE2_RS422
}