我用的TI的DM6437评估板,板子bootload的例程是这样写的:(.asm).ref _c_int00
.ref FLASH_TEXT_START
.ref RAM_TEXT_START
.ref TEXT_SIZE
.ref FLASH_CINIT_START
.ref RAM_CINIT_START
.ref CINIT_SIZE
.ref FLASH_SWITCH_START
.ref RAM_SWITCH_START
.ref SWITCH_SIZE
.sect "bootload"
;; Copy the .text section from FLASH_TEXT_START to RAM_TEXT_START
_boot_start:
mvkl FLASH_TEXT_START,B4 ; B4 <- FLASH_TEXT_START
mvkh FLASH_TEXT_START,B4
mvkl RAM_TEXT_START,A4 ; A4 <- RAM_TEXT_START
mvkh RAM_TEXT_START,A4
zero A1
_boot_loop1:
ldb *B4++,B5 ; Read Flash
mvkl TEXT_SIZE,B6 ; B6 <- TEXT_SIZE
add 1,A1,A1
|| mvkh TEXT_SIZE,B6........
//......................................................................................................................................
cmd文件是MEMORY
{
L2RAM: o = 0x10800000 l = 0x00020000
DDR2: o = 0x80000000 l = 0x10000000
boot: o = 0x42000000 l = 0x00000200
FLASH: o = 0x42000200 l = 0x003FFE00
}
SECTIONS
{
"bootload": {} > boot
.text : {} > FLASH run = L2RAM, LOAD_START(FLASH_TEXT_START), RUN_START(RAM_TEXT_START), SIZE(TEXT_SIZE)
.cinit : {} > FLASH run = L2RAM, LOAD_START(FLASH_CINIT_START), RUN_START(RAM_CINIT_START), SIZE(CINIT_SIZE)
.switch : {} > FLASH run = L2RAM, LOAD_START(FLASH_SWITCH_START), RUN_START(RAM_SWITCH_START), SIZE(SWITCH_SIZE)
.bss > L2RAM
.cio > L2RAM
.const > L2RAM
.data > L2RAM
.far > L2RAM
.stack > L2RAM
.sysmem > L2RAM
.ddr2 > DDR2
}
问题:现在我的项目用到了BIOS操作系统,操作系统自己生CMD文件已将.cinit .switch .text 这3个段进行分配,我怎么修改bootload和cmd的程序,谢谢,接触时间不长,希望知道的能解释一下,还有这个过程和以上程序的理解,请指教。 |