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.

C6678 大的堆 让 程序无法进入 _c_int00



我的程序是从CCS typical SYS/BIOS例程来的。

在main中,代码没做什么事情。只在BIOS_start之前增加了一行代码,将特定的值写入到0x80000004

--------------main.c---------------------

Void main() {

    Task_Handle task;

    Error_Block eb;

    System_printf("enter main()\n");

    Error_init(&eb);

    task = Task_create(taskFxn, NULL, &eb);

    if (task == NULL) {

        System_printf("Task_create() failed!\n");

        BIOS_exit(0);

    }

    *(volatile int *)0x80000004 = 0xace0ace; //Here is Test Code

    BIOS_start();

     /* enable interrupts and start SYS/BIOS */

}

我使用预设的SYS/BIOS设置来建立这个project(堆大小4096),然后把程序加载到从核,并发送IPCGR到从核,程序运行正常 (我能从0x80000004读到我写入的值)

接着我更改了SYS/BIOS设置,将堆大小增加到400000,我发现按照上面的步骤将程序加载到从核后,程序没运行起来,我以CCS查看发现,boot magic address (0x87fffc)上存放_c_int00的值未被清空,而程序也没跳到_c_int00位置。但当我以CCS将_c_int00的值手动写入到Core Register Program Counter(PC寄存器)后,程序这时候才运行起来。

这代表我配置的堆大小400000阻挡了程序跳到_c_int00,一旦程序进入_c_int00后确实可以运行正常。

请问TI专家们,我的堆是否覆盖了不应该被覆盖的位置呢?请给点意见及建议,谢谢。

 

堆大小400000的MAP文件

https://drive.google.com/file/d/0B-HUXA_alaLoaFlKVng5eTdkYkk/view?usp=sharing

備份: 

装置: DSPC-8681、6678EVM