This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

使用CCS4.2 给 TMS570LS3137 下载程序出错

Other Parts Discussed in Thread: HALCOGEN, TMS570LS3137

CCS版本:4.2.4

HalCoGen版本:3.01.01

Emulator:XDS100v2 (Blackhawk: BH-USB-100v2)

Target board:按照HDK板原理图自己做的TMS570LS3137的实验板

使用HalCoGen产生工程代码,使用CCS编译下载,build过程没有问题,debug之后出现:

在CCS的console中输出信息:

CortexR4: GEL Output:     Memory Map Setup for Flash @ Address 0x0CortexR4: Loader: One or more sections of your program falls into a memory region that is not writable.  These regions will not actually be written to the target.  Check your linker configuration and/or memory map.
CortexR4: File Loader: Data verification failed at address 0x00000002 Please verify target memory and memory map.
Error found during data verification.
Ensure the linker command file matches the memory map.

另外,使用的cmd文件配置如下:

MEMORY
{
    VECTORS (X)  : origin=0x00000000 length=0x00000020
    FLASH0  (RX) : origin=0x00000020 length=0x0017FFE0
    FLASH1  (RX) : origin=0x00180000 length=0x00180000
    STACKS  (RW) : origin=0x08000000 length=0x00001500
    RAM     (RW) : origin=0x08001500 length=0x00026B00

/* USER CODE BEGIN (2) */
/* USER CODE END */
}

/* USER CODE BEGIN (3) */
/* USER CODE END */


/*----------------------------------------------------------------------------*/
/* Section Configuration                                                      */

SECTIONS
{
    .intvecs : {} > VECTORS
    .text    : {} > FLASH0 | FLASH1
    .const   : {} > FLASH0 | FLASH1
    .cinit   : {} > FLASH0 | FLASH1
    .pinit   : {} > FLASH0 | FLASH1
    .bss     : {} > RAM
    .data    : {} > RAM

/* USER CODE BEGIN (4) */
/* USER CODE END */
}

不过,同样的配置在TMDX570LS31USB (for USB Stick)出现的问题不同,输出信息如下;

CortexR4: GEL Output:     Memory Map Setup for Flash @ Address 0x0CortexR4: Flash operation timed out waiting for the algorithm to complete. Operation cancelled.
CortexR4: Trouble Writing Memory Block at 0x0 on Page 0 of Length 0x32d4
Cannot write to target

不知道问题出在了什么地方。求大神帮助!

谢谢!

LOOK

  • Hi LOOK,

       Data verification问题是个比较常见的问题,但是引起这个问题的原因却不容易确认。

       所以还得请你尝试以下的办法:

       1. CCS的License和安装问题。

            如果CCS的License过期或没有安装好License,可能导致这个问题,请你查看一下License信息,应该在[Help]->[Code composer license information]中。

            还有一种情况是CCS本身没有安装完整,或者出了问题,最好重新安装。

            建议下载最新的CCS V5.3来安装使用。

            HALCoGen最好也更新一下,目前正式版最高3.03.01.

       2. 配置问题的可能性

           但是看起来应该没有太大问题,除了cmd文件中RAM的长度应该是256KB, 

           RAM     (RW) : origin=0x08001500 length=0x0003EB00

       3. 硬件连接问题。

           也很有可能是调试接口配置问题,能够把调试接口发上来看一下最好。

        如您描述,USBKIT也不能正常工作?那么看来还是软件环境和工程配置有问题的可能性大一些。

        建议您可以先不用HALCoGen,因为它生成的代码量比较大,可以用一个空工程,看看是否能够连接目标板。

  • Hi Renton,

        谢谢你的回答!我按照你的提示,把CCS4.24卸载干净(附带的东西挺多的,下载起来还是比较麻烦的),手头上只有CCS5.2,就安装了。后来新建了CCS工程,修改了sys_link.cmd文件“RAM     (RW) : origin=0x08001500 length=0x0003EB00”,最后程序下载运行成功!

    Tkx!

    LOOK

  • Hi LOOK,

        解决了就好啦!

        后面我们多交流。