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.

1310向Flash中读写数据问题



我用CCS编译得到的Hex文件最后总会有一个是写在最后一个page的数据,这段数据具体有什么用吗?想自己去写最后一个page中的数据,发现擦除时程序就跑挂了,能告诉我这段是需要我们配置的还是程序里面生成的,求教!

  • Flash的高地址用来存放ccfg配置,不要直接erase和write这部分空间。如果需要修改ccfg配置,可以通过修改ccfg.c文件的方式进行配置。

    MEMORY
    {
        /* Application stored in and executes from internal flash */
        FLASH (RX) : origin = FLASH_BASE, length = FLASH_SIZE
        /* Application uses internal RAM for data */
        SRAM (RWX) : origin = RAM_BASE, length = RAM_SIZE
    }
    /* Section allocation in memory */
    SECTIONS
    {
        .text           :   > FLASH
        .const          :   > FLASH
        .constdata      :   > FLASH
        .rodata         :   > FLASH
        .cinit          :   > FLASH
        .pinit          :   > FLASH
        .init_array     :   > FLASH
        .emb_text       :   > FLASH
        .ccfg           :   > FLASH (HIGH)
    #ifdef __TI_COMPILER_VERSION__
    #if __TI_COMPILER_VERSION__ >= 15009000
        .TI.ramfunc     : {} load=FLASH, run=SRAM, table(BINIT)
    #endif
    #endif
        .data           :   > SRAM
        .bss            :   > SRAM
        .sysmem         :   > SRAM
        .stack          :   > SRAM (HIGH)
        .nonretenvar    :   > SRAM
    }