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.

常量 怎么放到 指定Flash



比方 把 const Uint16 a=10; 放到 0x3f4000     怎么弄?

  • 建议你跟踪看看TI提供的头文件和相关源码  

    头文件里面寄存器的定义不就是对应一个地址吗    对这个寄存器的操作就是对一个地址的操作

    结合CMD你就明白了

  • 在CMD里面新建一个存储空间,放到PAGE1,设置起始地址0X3F4000,然后长度是2.

    再新建一个section, 比如叫section1,并且:>在新建的存储空间里

    然后在这个变量的定义前加上:

    #pragma DATA_SECTION(a"section1");