Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#32 Read command-line options from file

Version 0.5.5
closed
None
5
2013-12-08
2013-12-08
Krzysztof Kuczek
No

Hi,
Is it possible, to use file, instead of command line to pass argument for gcc. The length of windows command line is limited to 8192 chars, and in case of a large projects, the make file fails, because too many file names are passed to gcc. The similar problem is with clean. The generated make file contains
-$(RM) $(OBJS)$(C_DEPS)$(SECONDARY_FLASH)$(CXX_DEPS)$(S_UPPER_DEPS)$(SECONDARY_LIST)$(SECONDARY_SIZE)$(C++_DEPS)$(ASM_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(C_UPPER_DEPS) blablabla.elf

It's too long for windows :(

The workaround is to create custom clean target.
my_clean:
-$(RM) $(OBJS)
-$(RM) $(C_DEPS)
-$(RM) $(SECONDARY_FLASH)
-$(RM) $(CXX_DEPS)
-$(RM) $(S_UPPER_DEPS)
-$(RM) $(SECONDARY_LIST)
-$(RM) $(SECONDARY_SIZE)
-$(RM) $(C++_DEPS)
-$(RM) $(ASM_DEPS)
-$(RM) $(CC_DEPS)
-$(RM) $(CPP_DEPS)
-$(RM) $(EXECUTABLES)
-$(RM) $(C_UPPER_DEPS)
-$(RM) blablabla.elf
-@echo ' '

regards
Krzysiek

Discussion

  • generally this is a cdt issue, but I'll check if I can do something in the plug-in to change the behaviour of the make generator to split the 'clean' target into multiple lines.

     
    • status: open --> accepted
    • assigned_to: Liviu Ionescu (ilg)
     
  • The clean is not the problem. The more important thing is invoking gcc like this..

    Invoking: ARM Sourcery Windows GCC C Compiler edge-toolchain\arm-none-eabi\include" -O0 -ffunction-sections -fdata-sections -Wall -Wa,-adhlns="Libraries/STM32F4xx_StdPeriph_Driver/src/misc.o.lst" -c -fmessage-length=0 -std=gnu99 -MMD -MP -MF"Libraries/STM32F4xx_StdPeriph_Driver/src/misc.d" -MT"Libraries/STM32F4xx_StdPeriph_Driver/src/misc.d" -mcpu=cortex-m4 -mthumb -g3 -gdwarf-2 -o "Libraries/STM32F4xx_StdPeriph_Driver/src/misc.o" "../Libraries/STM32F4xx_StdPeriph_Driver/src/misc.c" arm-none-eabi-gcc -DUSE_STDPERIPH_DRIVER -DARM_MATH_CM4 -DSTM32F429_439xx -I"C:\Users\kku\Documents\hobby\elektronika
    ...
    ...
    and more...

    Can you generate temporary file with all the gcc attributes and pass it like "@file" to gcc comand line?

    Regards
    Krzysiek

     
  • Can you generate temporary file with all the gcc attributes and pass it like "@file" to gcc comand line?

    unfortunately CDT does not allow to do this :-(

    but the line in the above example does not look longer than 8192 characters. where exactly is the problem? a large number of include folders?

     
  • OK,
    I didn't paste whole line.
    The whole is there
    https://copy.com/LLHy0iGZEEiT08m4

    I just wanted to compile STM peripheral lib with DSP lib ....

    Do you have any other idea how to compile big projects without splitting it to libs...
    The one option is to user shorter dir names, but many something more sophisticated :)

    Regards
    krzysiek

     
  • Do you have any other idea how to compile big projects without splitting it to libs...

    if you have to stick with windows, I'm afraid you have to split large projects and use libs.

    on Unix based platforms you do not have this limitation.

     
  • OK,
    Thank you.
    krzysiek

     
    • status: accepted --> closed