您好,谢谢您的回复。我现在基本上按照官网的做的,但是有点疑问想请教。
我的程序用仿真器在线调试的时候是正常的。烧写程序完成后,按复位键后程序照常运行(没有关电源),但是关闭电源重启系统,程序就运行不正常了。我们自己的板子和开发板似乎都有这个毛病。但是用合纵达给的例程BOOT都是正常的,重启电源运行也正常(例程是最简单的点灯程序)。因为在开发板上面也是这个情况,初步排除硬件的问题,我怀疑是我的程序问题,但是在线调试又是正常的,所以很纠结。
我的CMD文件如下:
因为程序较大与官网相比就只是修改了一下FLASH_REST:、IRAM的长度值。我不知道是不是这个问题,IRAM不是有192KB吗,我感觉我设置IRAM到30000应该没有问题吧,还是其他造成的呢?
MEMORY
{
/*the FLASH_BOOT and FLASH_REST sections are not needed if the hex converter */
/*is used to create the copy table*/
FLASH_BOOT: o = 0x90000000 l = 0x00000400 /* Flash − for custom boot code */
FLASH_REST: o = 0x90000400 l = 0x0002FC00 /* Flash – for application code */
BOOT_RAM o = 0x00000000 l = 0x00000400 /* L2− for custom boot code*/
IRAM: o = 0x00000400 l = 0x0002fc00 /* L2− for non−custom boot code*/
SDRAM: o = 0x80000000 l = 0x10000000 /* EMIF − CE1 − SDRAM */
}
SECTIONS
{
/*When using the hex converter to generate the copy table, the load
address as well as the LOAD_START, RUN_START, AND SIZE linker options
do not need to be specified. Only the run address must be specified */
.boot_load : LOAD = FLASH_BOOT, RUN = BOOT_RAM
.text : LOAD = FLASH_REST, RUN = IRAM
LOAD_START(_text_ld_start),
RUN_START(_text_rn_start),
SIZE(_text_size)
/*LOAD_START, RUN_START, AND SIZE are only required when using the linker
options to generate the copy table */
.const > FLASH_REST
.cinit > IRAM
.pinit > IRAM
.switch > IRAM
.data > IRAM
.cio > IRAM
.bss > IRAM
.far > IRAM
}
SECTIONS
{
/*When using the hex converter to generate the copy table, the load
address as well as the LOAD_START, RUN_START, AND SIZE linker options
do not need to be specified. Only the run address must be specified */
.boot_load : LOAD = FLASH_BOOT, RUN = BOOT_RAM
.text : LOAD = FLASH_REST, RUN = IRAM
LOAD_START(_text_ld_start),
RUN_START(_text_rn_start),
SIZE(_text_size)
/*LOAD_START, RUN_START, AND SIZE are only required when using the linker
options to generate the copy table */
.cinit > FLASH_REST
SDRAM初始化确实是配置寄存器,理论上应该是你主动配置的参数,因为不同的sdram的参数是不同的。不确定你说的INIT使能包不包括这部分。
是指二次BOOTLODER,这种用法也很常见,网上应该有例程吧,你再找找。
需要指导的话建议你去TI的官方论坛http://www.deyisupport.com/
虽然我没有解决,但是谢谢您的回复。:)
您好,谢谢您的回复。我现在基本上按照官网的做的,但是有点疑问想请教。
我的程序用仿真器在线调试的时候是正常的。烧写程序完成后,按复位键后程序照常运行(没有关电源),但是关闭电源重启系统,程序就运行不正常了。我们自己的板子和开发板似乎都有这个毛病。但是用合纵达给的例程BOOT都是正常的,重启电源运行也正常(例程是最简单的点灯程序)。因为在开发板上面也是这个情况,初步排除硬件的问题,我怀疑是我的程序问题,但是在线调试又是正常的,所以很纠结。
我的CMD文件如下:
因为程序较大与官网相比就只是修改了一下FLASH_REST:、IRAM的长度值。我不知道是不是这个问题,IRAM不是有192KB吗,我感觉我设置IRAM到30000应该没有问题吧,还是其他造成的呢?
MEMORY
{
/*the FLASH_BOOT and FLASH_REST sections are not needed if the hex converter */
/*is used to create the copy table*/
FLASH_BOOT: o = 0x90000000 l = 0x00000400 /* Flash − for custom boot code */
FLASH_REST: o = 0x90000400 l = 0x0002FC00 /* Flash – for application code */
BOOT_RAM o = 0x00000000 l = 0x00000400 /* L2− for custom boot code*/
IRAM: o = 0x00000400 l = 0x0002fc00 /* L2− for non−custom boot code*/
SDRAM: o = 0x80000000 l = 0x10000000 /* EMIF − CE1 − SDRAM */
}
SECTIONS
{
/*When using the hex converter to generate the copy table, the load
address as well as the LOAD_START, RUN_START, AND SIZE linker options
do not need to be specified. Only the run address must be specified */
.boot_load : LOAD = FLASH_BOOT, RUN = BOOT_RAM
.text : LOAD = FLASH_REST, RUN = IRAM
LOAD_START(_text_ld_start),
RUN_START(_text_rn_start),
SIZE(_text_size)
/*LOAD_START, RUN_START, AND SIZE are only required when using the linker
options to generate the copy table */
.const > FLASH_REST
.cinit > IRAM
.pinit > IRAM
.switch > IRAM
.data > IRAM
.cio > IRAM
.bss > IRAM
.far > IRAM
}
SECTIONS贴错了,是下面这样的
SECTIONS
{
/*When using the hex converter to generate the copy table, the load
address as well as the LOAD_START, RUN_START, AND SIZE linker options
do not need to be specified. Only the run address must be specified */
.boot_load : LOAD = FLASH_BOOT, RUN = BOOT_RAM
.text : LOAD = FLASH_REST, RUN = IRAM
LOAD_START(_text_ld_start),
RUN_START(_text_rn_start),
SIZE(_text_size)
/*LOAD_START, RUN_START, AND SIZE are only required when using the linker
options to generate the copy table */
.cinit > FLASH_REST
.const > IRAM
.stack > IRAM
.bss > IRAM
.data > IRAM
.far > IRAM
.switch > IRAM
.sysmem > IRAM
.cio > IRAM
}
一周热门 更多>