Compilation for Kinetis with Codewarrior 10.6 provides empty object files

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Compilation for Kinetis with Codewarrior 10.6 provides empty object files

跳至解决方案
1,384 次查看
maciejwdowiarz-
Contributor III

Hi,

 

I try to add external library sources written in C to template MQX project.

 

The problem I have is when I compile the library, codewarrior first generates Makefiles which later are used for compiling files. There are no errors during compilation, however all object files are empty.

This is examplary snippet from console during compilation:

 

"C:/Freescale/CW MCU v10.6/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "../Sources/file.c" @"Sources/file.args" -Wa,-adhlns="Sources/file.o.lst" -MMD -MP -MF"Sources/file.d" -o"Sources/file.o"

 

However, when I try to compile single file using contect menu->Build Selected File(s) I got non-empty compiled object file.

Console contains:

 

"C:\Freescale\CW MCU v10.6\eclipse\../Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "..\Sources\file.c" @"Sources\file_1.args" -Wa,-adhlns="$@.lst" -o"Sources\file.o" Sources\file_1.args : -mcpu=cortex-m4 -mthumb -mfloat-abi=soft -g3 -gdwarf-2 -gstrict-dwarf -DMQX -I"C:/Freescale/Freescale_MQX_4_1/lib/twrk70f120m.cw10gcc/debug/bsp" -I"C:/Freescale/Freescale_MQX_4_1/lib/twrk70f120m.cw10gcc/debug/psp" -I"C:/Freescale/Freescale_MQX_4_1/lib/twrk70f120m.cw10gcc/debug" -I"C:/Freescale/Freescale_MQX_4_1/lib/twrk70f120m.cw10gcc/debug/bsp/Sources" -I"C:/Freescale/Freescale_MQX_4_1/lib/twrk70f120m.cw10gcc/debug/bsp/Generated_Code" -I"C:/Freescale/CW MCU v10.6/MCU/ProcessorExpert/lib/Kinetis/pdd/inc" -I"C:/Freescale/Freescale_MQX_4_1/lib/twrk70f120m.cw10gcc/debug/mfs" -I"C:/Freescale/Freescale_MQX_4_1/lib/twrk70f120m.cw10gcc/debug/shell" -I"C:/Freescale/Freescale_MQX_4_1/lib/twrk70f120m.cw10gcc/debug/rtcs" -I"C:/Sources/aux_hdrs" -I"C:/Sources/inc" -O0 -ffunction-sections -fdata-sections -Wall -std=gnu99 -c -fmessage-length=0 -D_EWL_C99=1 -M  

 

So, parameters I've defined in project specs are used here and compilation actually works.

 

What should I do with the project to have all files compiled properly ?

 

Thank you,

Maciej Wdowiarz-Bilski

标签 (1)
标记 (3)
0 项奖励
回复
1 解答
1,218 次查看
maciejwdowiarz-
Contributor III

There was problem with compillation option. "-M" has been responsible for generating dependiences only.

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,219 次查看
maciejwdowiarz-
Contributor III

There was problem with compillation option. "-M" has been responsible for generating dependiences only.

0 项奖励
回复