ti工程师您好,
我现在需要完成自制电路板的EMIF NOR FLASH 烧写自启动,芯片是C6678,EMIF 的CE0外接一个NOR FLASH,现有如下问题,希望能得到您的解答:
1、查看其它帖子,ti工程师给出 C6678EVM板上没有EMIF 外接 NOR FLASH 所以无法使用EMIF自加载烧写NOR FLASH ,官方给出的norwrite只适用于SPI NOR 烧写,是否是这样的情况呢?
2、在6678EVM 测试,当使用EMIF 自启动时,参照手册,bootmode【12:0】=00 0000 0100 000是否正确?
3、我的参考书上给出的emif自启动nor烧写方式中,需要给原工程加入bootloade汇编文件如下:
.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_CONST_START
.ref RAM_CONST_START
.ref CONST_SIZE
.ref FLASH_SWITCH_START
.ref RAM_SWITCH_START
.ref SWITCH_SIZE
.ref FLASH_VECT_START
.ref RAM_VECT_START
.ref VECT_SIZE
.sect "bootload"
_boot_start:
nop 5
mvkl copyTable, a3 ;load table pointer
mvkh copyTable, a3
copy_section_top:
ldw *a3+ +, b0 ; byte count
ldw *a3+ +, b4 ; load flash start (load) address
ldw *a3+ +, a4 ; ram start address
nop 2
[! b0] b copy_done
nop 5
copy_loop:
ldb *b4+ +,b5
sub b0,1,b0
[ b0] b copy_loop
[! b0] b copy_section_top
zero a1
[! b0] and 3,a3,a1
stb b5,*a4+ +
[! b0] and -4,a3,a5
[ a1] add 4,a5,a3
copy_done:
mvkl .S2 _c_int00, B0
mvkh .S2 _c_int00, B0
b .S2 B0
nop 5
copyTable:
;;.text
.word TEXT_SIZE
.word FLASH_TEXT_START
.word RAM_TEXT_START
;;.cinit
.word CINIT_SIZE
.word FLASH_CINIT_START
.word RAM_CINIT_START
;;.const
.word CONST_SIZE
.word FLASH_CONST_START
.word RAM_CONST_START
;;.switch
.word SWITCH_SIZE
.word FLASH_SWITCH_START
.word RAM_SWITCH_START
;;.vect
.word VECT_SIZE
.word FLASH_VECT_START
.word RAM_VECT_START
;;end of table
.word 0
.word 0
.word 0
linker的cmd文件如下:
-c
-heap 0x4100
-stack 0xa000
MEMORY
{
//CORE0
L1PSRAM(RWX) : org=0x00E00000, l=0x7FFF
L1DSRAM(RWX) : org=0x00F00000, l=0x7FFF
L2SRAM(RWX) : o = 0x00800000, l = 0x00080000
MSMCSRAM(RWX) : o = 0x0c000000, l = 0x00200000
DDR3(RWX) : o = 0x80000000, l = 0x10000000
boot : o = 0x70000000, l = 0x00000200
FLASH : o = 0x70000200, l = 0x003FFE00
}
SECTIONS
{
"bootload" :{} > boot
.text :{}> FLASH run = MSMCSRAM,LOAD_START(FLASH_TEXT_START),
RUN_START(RAM_TEXT_START),SIZE(TEXT_SIZE)
.cinit :{}> FLASH run = MSMCSRAM,LOAD_START(FLASH_CINIT_START),
RUN_START(RAM_CINIT_START),SIZE(CINIT_SIZE)
.const :{}> FLASH run = MSMCSRAM,LOAD_START(FLASH_CONST_START),
RUN_START(RAM_CONST_START),SIZE(CONST_SIZE)
.switch :{}> FLASH run = MSMCSRAM,LOAD_START(FLASH_SWITCH_START),
RUN_START(RAM_SWITCH_START),SIZE(SWITCH_SIZE)
.csl_vect :{}> FLASH run = MSMCSRAM,LOAD_START(FLASH_VECT_START),
RUN_START(RAM_VECT_START),SIZE(VECT_SIZE)
GROUP(NEAR_DP)
{
.neardata
.rodata
.bss
}load > MSMCSRAM
.stack > MSMCSRAM
.cio > MSMCSRAM
.data > MSMCSRAM
.far > MSMCSRAM
.fardata > MSMCSRAM
.sysmem > MSMCSRAM
.testMem > MSMCSRAM
}
利用工具转换成.bin文件后,利用官方给定的工具烧写(是否是指norwrite),这样操作是否正确?我该如何得知二级bootload是否进行了程序搬移?
3、如果以上均不能实现emif nor flash烧写,我该怎么操作?可否提供烧写流程及例程?十分感谢
Nancy Wang:
请参考以下链接的FAQ.
processors.wiki.ti.com/…/KeystoneI_Bootloader_Resources_and_FAQ
user6027759:
请问你的emif norflash成功了吗?