Compile Size Problem - CooCox V2 STM32

Discussion in 'Embedded Systems and Microcontrollers' started by Stuntman, Aug 8, 2016.

  1. Stuntman

    Thread Starter Active Member

    Mar 28, 2011
    181
    47
    Having a real issue with CooCox Ver 2.0.3 (and GNU compiler (4.7 2013q3)) and the compiled size of a program for an STM32F07 chip. Perhaps this is simply a compiler misunderstanding on my end.

    I started out using Ver 1.7.5. and ended up with a compiled program of around 20kB. I ported the program over to 2.0.3 and continued development. It wasn't long and I realized my code was over 100kB. Something seemed very wrong. I went back and noticed that after switching to the newer IDE, the code size jumped from 17kB, to 70kB.

    So I began investigating. I piped my latest code, compile size of around 100kB, to the old IDE (1.7.3) using the same libraries. Compiled (and ran on device) at 37kB. Copied the project directory and retried with version 2.0.3. Now it comes in around 67kB. Why would it be bigger? Where did the 100kB go?

    Any clues on how to go about tracking this issue down?

    A side note, may be irrelevant. I downloaded a couple of mbed libraries recently to try a few routines. I thought it was interesting that I added them to the project within the IDE, used the function in the main.c, and it went off working. It wasn't until later I realized I never did #include them in any of the source code. Why would it include/compile files that I never #include in the main.c or any of the used source code? It certainly does not do this for the .h and .c libraries I have built.
     
  2. dannyf

    Well-Known Member

    Sep 13, 2015
    1,779
    360
    CoIDE 2.x should be avoided at all cost.

    from a big fan of CoIDE.
     
  3. Stuntman

    Thread Starter Active Member

    Mar 28, 2011
    181
    47
    I was afraid someone was going to say this. The only reason I ported over is because 2.x supported the chip for ST link programming. (it was too new for 1.7.5). IIRC, there was a 1.7.8 that may support the chip.
     
  4. dannyf

    Well-Known Member

    Sep 13, 2015
    1,779
    360
    I don't know what "the chip" you were referring to so cannot help you there. But to my knowledge, there aren't any newly supported devices in 2.0. The shift to 2.0 was to revise the component framework (for the worse in my view).
     
  5. Stuntman

    Thread Starter Active Member

    Mar 28, 2011
    181
    47
    danny,

    My particular chip was not supported for programming in 1.7.5. 1.7.8 supported the chip, but by that point, CoCenter was not working, so I was (ill?) advised to simply jump to 2.x and be done with it. I will try installing 1.7.8 and see if this solves my problems.

    Thanks for the info.
     
Loading...