由于需要使用…代表不定参数,故放开了–relaxed_ansi这个选项,能编译通过,但是运行时,发现采集的数据都不对了,好像是没有对齐的问题,但不用该选项时一切正常,这怎么能解决呢?难道时编译选项–relaxed_ansi的问题。
'Building file: ../source/main.c'
'Invoking: C6000 Compiler'
"C:/ti/ccsv5/tools/compiler/c6000_7.4.4/bin/cl6x" -mv6740 –abi=coffabi -Ooff -g –include_path="C:/ti/ccsv5/tools/compiler/c6000_7.4.4/include" –include_path="Z:/sl100/sl100_uav_onboard_ccs5p5/sl100_uav_onboard_ccs5p5/StarterWare/drivers" –include_path="Z:/sl100/sl100_uav_onboard_ccs5p5/sl100_uav_onboard_ccs5p5/StarterWare/include/c674x/c6748" –include_path="Z:/sl100/sl100_uav_onboard_ccs5p5/sl100_uav_onboard_ccs5p5/StarterWare/include/hw" –include_path="Z:/sl100/sl100_uav_onboard_ccs5p5/sl100_uav_onboard_ccs5p5/StarterWare/include" –include_path="Z:/sl100/sl100_uav_onboard_ccs5p5/sl100_uav_onboard_ccs5p5/include" –include_path="Z:/sl100/sl100_uav_onboard_ccs5p5/sl100_uav_onboard_ccs5p5/StarterWare/include/nandlib" –include_path="Z:/sl100/sl100_uav_onboard_ccs5p5/sl100_uav_onboard_ccs5p5/StarterWare/include/c674x" –include_path="/StarterWare/include/nandlib" –relaxed_ansi –define=c6748 –display_error_number –diag_suppress=383 –diag_warning=225 –diag_wrap=off –preproc_with_compile –preproc_dependency="source/main.pp" –obj_directory="source" "../source/main.c"
怎么办?谢谢
Shine:
请问能定位到具体运行到哪里出错了吗?
s w:
回复 Shine:
就是原先读EMIF的数据与打开–relaxed_ansi后不一样了
s w:
回复 s w:
已经确认时对齐问题了,一旦附加–relaxed_ansi后,对齐__attribute__就无效了,怎么解决。
Shine:
回复 s w:
感谢反馈!