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.

我有一个程序,用的二维数组是固定大小的数组,但是老是去到一行赋值语句就崩溃了!

Other Parts Discussed in Thread: SYSBIOS

数组定义为:double aa[4][8];

  • 没怎么理解,完整的相关代码是什么样的?崩溃具体是有什么报错?
  • 不知道什么报错呢!我在dsp这里纯菜鸟
  • 请问,这样的二维数组,dsp能支持分配多大内存?
  • 看你把这个二维数组放在哪块内存上了。cmd文件用于分配内存,map文件可以查看最终被分配在哪里。
    ccs调试的时候console里一般会显示报错。
  • MEMORY
    {
    IROM (RX) : org = 0x11700000, len = 0x100000
    IRAM (RWX) : org = 0x11800000, len = 0x38000
    L3_CBA_RAM (RWX) : org = 0x80000000, len = 0x20000
    SR_0 (RWX) : org = 0xc2000000, len = 0x10000
    SR_1 (RWX) : org = 0xc2010000, len = 0xff0000
    DSP_PROG (RWX) : org = 0xc3000000, len = 0x3000000
    }
    SECTIONS
    {
    ti.sdo.ipc.SharedRegion_0: { . += 0x10000;} run > 0xc2000000, type = NOLOAD
    ti.sdo.ipc.SharedRegion_1: { . += 0xff0000;} run > 0xc2010000, type = NOLOAD

    ti_sdo_ipc_init: load > DSP_PROG, type = NOINIT
    }
    xdc_runtime_Startup__EXECFXN__C = 1;
    xdc_runtime_Startup__RESETFXN__C = 1;
    TSK_idle = ti_sysbios_knl_Task_Object__table__V + 0;

    SECTIONS
    {
    .text: load >> DSP_PROG
    .ti.decompress: load > DSP_PROG
    .stack: load > DSP_PROG
    GROUP: load > DSP_PROG
    {
    .bss:
    .neardata:
    .rodata:
    }
    .cinit: load > DSP_PROG
    .pinit: load >> DSP_PROG
    .init_array: load > DSP_PROG
    .const: load >> DSP_PROG
    .data: load >> DSP_PROG
    .fardata: load >> DSP_PROG
    .switch: load >> DSP_PROG
    .sysmem: load > DSP_PROG
    .far: load >> DSP_PROG
    .args: load > DSP_PROG align = 0x4, fill = 0 {_argsize = 0x64; }
    .cio: load >> DSP_PROG
    .ti.handler_table: load > DSP_PROG
    .c6xabi.exidx: load > DSP_PROG
    .c6xabi.extab: load >> DSP_PROG
    .vecs: load > DSP_PROG
    .plt: load > DSP_PROG
    xdc.meta: load > DSP_PROG, type = COPY

    }
    大哥,link.cmd文件是这样的
  • 674X_0: Error: (Error -1 @ 0x0) Internal error: Invalid error code. Restart the application. If error persists, please report the error. (Emulation package 5.1.232.0)
    你好,我关闭arm程序后,console才出现这个信息,刚刚崩溃的时候console没有任何信息呢!
  • 看不出来有用的信息,memory大小肯定是够的,你现在是在674X上调试?直接在dsp上建立一个简单的工程,只给数组赋值试试。
  • 你好,我以前试过给一个指针分配内存,一个int数组分配到20大小,然后赋值,程序就崩溃了!