我现在想以I2C模式启动进行烧写,下面是我的问题:
1.在分配CMD的时候 ,是不是不管是以nand 还是nor启动,都必须要避开IBL的运行空间0x00800000-0x0081BDFF这个区间?
2.我的工程文件中存在KeyStone_UART_Interrupts这个中断函数,并且我在使用过程中是可以执行的,但是当我修改CMD文件想去避开IBL的启动区域时,出现问题,不能正常执行中断函数的KeyStone_UART_write函数,我想知道这是什么原因导致的,下面是我的cmd最原始分配图,可以正常运行自己的代码,
MEMORY
{
/* Local L2, 0.5~1MB*/
VECTORS: o = 0x00800000 l = 0x00000200 /*set memory protection attribitue as execution only*/
LL2_CODE: o = 0x00800200 l = 0x0000FE00 /*set memory protection attribitue as execution only*/
LL2_R_DATA: o = 0x00810000 l = 0x00008000 /*set memory protection attribitue as read only*/
LL2_RW_DATA: o = 0x00818000 l = 0x000a8000 /*set memory protection attribitue as read/write*/
/* Shared L2 1MB for C6657 */
SL2: o = 0x0C000000 l = 0x00080000
SL2_RW_DATA: o = 0x18000000 l = 0x00080000 /*remapped SL2, set memory protection attribitue as read/write*/
/* External DDR3, upto 2GB per core */
DDR3_CODE: o = 0x80000000 l = 0x01000000 /*set memory protection attribitue as execution only*/
DDR3_R_DATA: o = 0x81000000 l = 0x01000000 /*set memory protection attribitue as read only*/
DDR3_RW_DATA: o = 0x82000000 l = 0x06000000 /*set memory protection attribitue as read/write*/
}
SECTIONS
{
vecs > VECTORS //中断向量,掉电保护
.text > SL2 //二进制代码,掉电保护
.cinit > SL2 //全局、静态,掉电保护
.const > SL2
.switch > SL2
.cio > SL2
.stack > LL2_RW_DATA //堆栈
GROUP
{
.neardata
.rodata
.bss
} > LL2_RW_DATA
.far > LL2_RW_DATA
.fardata > LL2_RW_DATA
.sysmem > LL2_RW_DATA
External_NonCache_Data > DDR3_RW_DATA
platform_lib >SL2
}
但是当我修改了cmd之后就无法正常工作了,下面是我修改后的cmd文件,请问是为什么,求大神指教。
MEMORY
{
/* Local L2, 0.5~1MB*/
VECTORS: o = 0x00820000 l = 0x00000200 /*set memory protection attribitue as execution only*/
LL2_CODE: o = 0x00820200 l = 0x0000FE00 /*set memory protection attribitue as execution only*/
LL2_R_DATA: o = 0x00830000 l = 0x00008000 /*set memory protection attribitue as read only*/
LL2_RW_DATA: o = 0x00838000 l = 0x000A8000 /*set memory protection attribitue as read/write*/
/* Shared L2 1MB for C6657 */
SL2: o = 0x0C000000 l = 0x00080000
SL2_RW_DATA: o = 0x18000000 l = 0x00080000 /*remapped SL2, set memory protection attribitue as read/write*/
/* External DDR3, upto 2GB per core */
DDR3_CODE: o = 0x80000000 l = 0x01000000 /*set memory protection attribitue as execution only*/
DDR3_R_DATA: o = 0x81000000 l = 0x01000000 /*set memory protection attribitue as read only*/
DDR3_RW_DATA: o = 0x82000000 l = 0x06000000 /*set memory protection attribitue as read/write*/
}
SECTIONS
{
vecs > VECTORS //中断向量,掉电保护
.text > SL2 //二进制代码,掉电保护
.cinit > SL2 //全局、静态,掉电保护
.const > SL2
.switch > SL2
.cio > SL2
.stack > LL2_RW_DATA //堆栈
GROUP
{
.neardata
.rodata
.bss
} > LL2_RW_DATA
.far > LL2_RW_DATA
.fardata > LL2_RW_DATA
.sysmem > LL2_RW_DATA
External_NonCache_Data > DDR3_RW_DATA
platform_lib >SL2
}
Andy Yin1:
check一下LL2 memory段的内存属性配置,有可能是代码中对一些LL2设置了只可读写等限制属性,可以对照corepac手册查到memory属性配置寄存器,或者将代码中内存属性的配置全部注释掉测试一下。
TI中文支持网



