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.

求大侠帮忙解决关于AM3358片内SRAM数据存放的问题



我用的是米尔科技的MYB-AM3358开发板,利用starterware在裸机环境下,想要测试某次算法运行所需时间,3358的手册中给出的Menmry Map 是这样的:

 SRAM internal : 0x402F0400-----0x402FFFFF,    L3 OCMC0 : 0x40300000- 0x4030FFFF,   EMIF0 SDRAM:   0x80000000(板子上的外设是两片256M的DDR3起始地址0x080000000)

我通过CMD文件将代码段和数据都放在外设DDR3中,加载程序运行没有问题,  但是将数据和代码段放在片内的SRAM后,加载程序,进入main()之后就跑飞了,数据和代码放在片内SRAM足够,求各位大侠帮忙解决一下问题:   图片是CMD文件的截图


  • 我们starterware的MLO引导程序是跑在SRAM里的,可以参考下.cmd文件如下:

    -stack  0x0008                             /* SOFTWARE STACK SIZE           */
    -heap   0x2000                             /* HEAP AREA SIZE                */
    -e Entry
    /* Since we used 'Entry' as the entry-point symbol the compiler issues a    */
    /* warning (#10063-D: entry-point symbol other than "_c_int00" specified:   */
    /* "Entry"). The CCS Version (5.1.0.08000) stops building from command      */
    /* line when there is a warning. So this warning is suppressed with the     */
    /* below flag. */

    --diag_suppress=10063

    /* SPECIFY THE SYSTEM MEMORY MAP */

    MEMORY
    {
            IRAM_MEM        : org = 0x402F0400  len = 0x1FBFF            /* RAM */
    }

    /* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */

    SECTIONS
    {
        .init    : {
                     bl_init.obj (.text)
                   } load > 0x402F0400

        .text    : load > IRAM_MEM              /* CODE                         */
        .data    : load > IRAM_MEM              /* INITIALIZED GLOBAL AND STATIC VARIABLES. */
        .bss     : load > IRAM_MEM              /* UNINITIALIZED OR ZERO INITIALIZED */
                                                /* GLOBAL & STATIC VARIABLES.   */
                        RUN_START(bss_start)
                        RUN_END(bss_end)
        .const   : load > IRAM_MEM              /* GLOBAL CONSTANTS             */
        .stack   : load > 0x4030FFF0            /* SOFTWARE SYSTEM STACK        */
    }

  • 您好,请问您的代码中的:

    -diag_suppress=10063

     以及

     .init    : {
                     bl_init.obj (.text)
                   }

    分别代表什么意思,是否必须要用???

  • 这部分也应该可以改成:

    .text:Entry : load > 0x40300000

    我们demo里有运行在SRAM的程序,是没问题的