2812_RAM_lnk.cmd中有这么一段:
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} > PRAMH0, PAGE = 0
#else
ramfuncs : > PRAMH0 PAGE = 0 #endif
#endif
但是编译之后会弹出警告:“creating output section “ramfuncs” without SECTION specification”。查看map文件,发现ramfuncs段被分配到了程序空间RAMM0中,索性把上面那一段直接改成ramfuncs : > PRAMH0 PAGE = 0,这时警告消失了,ramfuncs也被分配到了PRAMH0中。那么问题来了,为啥?难道是__TI_COMPILER_VERSION__不存在吗?
mangui zhang:
供参考
http://www.deyisupport.com/question_answer/wireless_connectivity/f/45/t/127524.aspx
2812_RAM_lnk.cmd中有这么一段:
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} > PRAMH0, PAGE = 0
#else
ramfuncs : > PRAMH0 PAGE = 0 #endif
#endif
但是编译之后会弹出警告:“creating output section “ramfuncs” without SECTION specification”。查看map文件,发现ramfuncs段被分配到了程序空间RAMM0中,索性把上面那一段直接改成ramfuncs : > PRAMH0 PAGE = 0,这时警告消失了,ramfuncs也被分配到了PRAMH0中。那么问题来了,为啥?难道是__TI_COMPILER_VERSION__不存在吗?
Brian Wang0:
这是个条件编译语句啊
当你的编译器版本比较新 即__TI_COMPILER_VERSION__>=15009000
就只编译了.TI.ramfunc : {} > PRAMH0, PAGE = 0
而没有编译ramfuncs : > PRAMH0 PAGE = 0
因此会提示没有给ramfuncs指定内存,编译器自动分配到了RAMM0中。
2812_RAM_lnk.cmd中有这么一段:
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} > PRAMH0, PAGE = 0
#else
ramfuncs : > PRAMH0 PAGE = 0 #endif
#endif
但是编译之后会弹出警告:“creating output section “ramfuncs” without SECTION specification”。查看map文件,发现ramfuncs段被分配到了程序空间RAMM0中,索性把上面那一段直接改成ramfuncs : > PRAMH0 PAGE = 0,这时警告消失了,ramfuncs也被分配到了PRAMH0中。那么问题来了,为啥?难道是__TI_COMPILER_VERSION__不存在吗?
han zhang3:
回复 Brian Wang0:
但是为什么要加这个条件编译语句呢?编译的这个段.TI.ramfunc : {} > PRAMH0, PAGE = 0有啥用处呢