Compilation for Kinetis with Codewarrior 10.6 provides empty object files

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Compilation for Kinetis with Codewarrior 10.6 provides empty object files

Jump to solution
668 Views
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

Labels (1)
Tags (3)
0 Kudos
1 Solution
502 Views
maciejwdowiarz-
Contributor III

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

View solution in original post

0 Kudos
1 Reply
503 Views
maciejwdowiarz-
Contributor III

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

0 Kudos