[ABANDONED] huge hexfiles

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] huge hexfiles

    Hi,

    with a CubeMX-project for Keil, the uVision5-ARM-Compiler hex-output is about 41k long, using about 15k of Flash memory.
    I imported this Keil-project in emStudio. All I had to change manually was the name of the scatter file in "External Build - Link Command".
    The emStudio hex-output has 101k which is about 36k of Flash memory though the same compiler with inherited settings had been used.
    Which settings should I use to reduce the memory usage ? With uVision there is a removal of unused sections which I cannot see with emStudio.

    Regards
    Detlef
  • Hello Detlef,

    Thank you for your inquiry.
    Are you using the external Keil compiler or Embedded Studio's GCC?
    If you are using the external compiler make sure to use the same exact commands as Keil calls the compiler.
    When you call them exactly the same you should also receive the exactly same output.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Detlef,

    The issue you are describing sounds like some optimization is not set when calling the compiler from ES.
    For comparison you can export the build options of ES and compare them to the Keil CL in project options for example.
    In ES simply right click your project and select Export Build.
    There you see how the external compiler gets called from ES for each file in your project.
    Now compare this with the CL from the Keil project options in uVision. Make sure the ES build is exactly the same as the one in Keil.
    Then you will get the same output as well.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.