CCS是7.4版本,调试器是XDS220U,把66AK2G12的一个官方软件包K1_STK_v1.1里面的一个GPIO演示工程编译通过,然后用调试器下载到K2GICE板子上,结果CCS7.4的Console上一直不停的滚动 memory protection execption cause by local access at 0x80F4A0,看样子程序是对这个存储区域的写入导致CPU保护了,程序就没法往下运行了。
首先,这个K1_STK_v1.1软件包里的这个代码我没做任何修改,就写入到K2GICE的板子上去了,不知道这样做是否适合,然后K2GICE这个板子本来最开始上面的CPU是66AK2G02,但我从TI那边买过来后发现CPU是66AK2G12,两者主频差了很多。
K2GICE板子上默认的BOOT模式是24MHZ下由SD卡启动,这个启动模式我没有动过,然后出现这个存储器异常保护的情况后,我试着把BOOT模式用拨码开关改成24MHZ下的调试器引导模式,情况还是一样的.
综合以上情况,不知道那个存储器异常保护的问题该怎么解决,希望TI的大神能帮帮忙
Nancy Wang:
K2GICE属于keystone2,请测试k2 stk的例程。
e2echina.ti.com/…/74528
user18914063:
回复 Nancy Wang:
你好,用了K2_STK_DSP_v1.1.zip这个参考例程包里面的几个代码,效果还是一样的,memory protection execption cause by local access at,只是地址有些变化
Nancy Wang:
回复 user18914063:
有没有单步调试看看,程序到哪里会报错。
user18914063:
回复 Nancy Wang:
不行,刚一点运行,面板那里就一直报错,然后程序自动跳转到一个汇编源文件那里,指示程序出错
Nancy Wang:
回复 user18914063:
再核对一下步骤:
The test program can be run on all KeyStone 2 EVM.
The steps to run the test cases on EVM board are:
1. extract (or install) the package, and switch CCS workspace to the extracted folder (or installation folder)
2. import the projects to CCS6.1 or higher;
3. build the projects. You may need to change the CSL including path, by default the project use CSL header files in: C:\ti\pdk_keystone2_3_01_01_04\packages\ti\csl
4. Set the boot mode of the device on EVM to no boot.
5. load the program to core 0 of a DSP.
6. run the core, then, you should see output in console window.
Refer to appendix of this document to see the typical test output.0x80F4A0是预留内存空间,一般都不会去访问这段地址空间。
processors.wiki.ti.com/…/MemoryProtectionOnKeystoneDevices
user18914063:
回复 Nancy Wang:
psc_regs= (K2_ARM_LPSC_Regs *)&gpARM_regs->PD_CPU0_PTCMD;
Description Resource Path Location Type
#20 identifier "gpARM_regs" is undefined K2_common.c /I2C/src line 1110 C/C++ Problem
现在是这么个情况,要报错
user18914063:
回复 user18914063:
我直接把那条语句屏蔽了能编译通过,但运行还要报错,不过不是地址保护报错了,看信息像是就是时钟那块的问题,应该和这条语句有关系
user18914063:
回复 user18914063:
KeyStone.cmd
66AK2Gxx_C66.cmd
现在就有两个CMD文件,选第一个的话,就是那个时钟报错,选第二个的话,就还是地址保护报错,但地址说是在0x02的位置,和先前保护的位置差异很大
user18914063:
回复 user18914063:
[C66xx] JTAG ID= 0x8bb0602f. This is a unknown device, version variant = 8
DEVSTAT= 0x000e0081. little endian, unknown boot, boot master is ARM core, PLL configuration implies the input clock for core is bypassed
SmartReflex VID= 0, required core voltage= 0.700V.
Die ID= 0x19011019, 0x0c00eb3c, 0x00000000, 0x45e40000
DSP speed grade = 800MHz, ARM speed grade= 800MHz
Initialize main core clock = 122.88MHz/4×39 = 1198MHz
Enable Exception handling…
External exception happened. MEXPFLAG[3]=0x80000000.EMC_BUSERR Bus Error Interrupt for global configuration space between 0x01C00000 – 0x07FFFFFFCFG write status error detectedXID (Transaction ID)= 14Addressing error
NRP=0x804098, NTSR=0x1000d, IRP=0x0, ITSR=0x0, TSCH= 0x0, TSCL= 0xe1056B3=0x803e88, A4=0x2, B4= 0xe003, B14= 0x812cf8, B15= 0x811b98
External exception happened. MEXPFLAG[3]=0x80000000.EMC_BUSERR Bus Error Interrupt for global configuration space between 0x01C00000 – 0x07FFFFFFCFG write status error detectedXID (Transaction ID)= 12Addressing error
NRP=0x80be20, NTSR=0x1800d, IRP=0x0, ITSR=0x0, TSCH= 0x0, TSCL= 0xf0883B3=0x800694, A4=0x47694000, B4= 0x3e8, B14= 0x812cf8, B15= 0x811b60
Exception happened at a place can not safely return!这是现在的一个完整的报错信息,那个BOOT模式我配置成了第一个,也就是NO BOOT/EMULATION24MHZ模式
user18914063:
回复 user18914063:
哦,对了,忘了补充了,这个K2GICE板子,本来应该是66AK2G02的CPU,但我买来拿到手后发现是66AK2G12,两个CPU主频不一样,会不会和这个有关系啊,时钟配置那块我也没动过
TI中文支持网