Difference in compile size

Sysprogs forums Forums VisualGDB Difference in compile size

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #28341
    mattia
    Participant

    Hello,

    I’m using VisualGDB 5.5 (preview 5, build 3595). I am building a project starting from CubeMX. The same project built with Atollic Truestudio compiles in 8376 bytes, while with VisualGDB is 14k. Both Truestudio and VisualGDB uses GCC, so why there is such a difference?

    I attach the cubeMX file, so you can replicate the problem.

    Thank you,

    Mattia Berton

     

    #28343
    support
    Keymaster

    Hi,

    Most likely, some setting between the projects is different (e.g. different toolchain, different libc type).

    VisualGDB actually provides a convenient mechanism for troubleshooting this exact type of problem – differential view in Memory Explorer. Please follow this tutorial and you should be able to track down the differences.

    #28349
    mattia
    Participant

    It seems a great solution. My only question is: how can I import the project created for Truestudio in VisualGDB to compare with the differential view in Memory Explorer? Can I import a single elf file?

    Thank you,

    Mattia Berton

    #28358
    support
    Keymaster

    Yes, you can use the “Compare the current build to a specific version” button (see step #18 of the tutorial).

    #28362
    mattia
    Participant

    Thank you,

    the tool is very powerful, and I can find that there are differencies between the two versions. However how could I check the settings between the two projects? Shouldn’t be equal, since are both built with the same CubeMX project?

    Also, one thing about the differential comparison, because from the comparison between the two projects I see something which is not very clear: for each .c file there is the difference between brackets, but it is not the sum of the bytes differences for the functions of that .c file. For example, stm32f0xx_hal_gpio.c has (+952). The two functions called are HAL_GPIO_Init (+384) and HAL_GPIO_WritePin (+46). But 384+46 is not +952. Am I missing something?

    Thank you for your help,

    Mattia

    #28375
    support
    Keymaster

    Sorry, we do not have any special GUI for comparing two external projects.

    Regarding the differences, it’s hard to say why the numbers would not add up. The difference could be coming from other source files, or library functions that are not associated with any particular source file.

    #28376
    mattia
    Participant
    1. Isn’t it possible – in your opinion –  that the project compiled for the Atollic discards the unused functions, while the VGDB includes each function? Is there any way to check what setting is used in the two projects (perhaps checking the .proj file)?
    2. Regarding the differences, I will attach the screenshot.
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.