Sysprogs forums › Forums › VisualGDB › Difference in compile size
Tagged: manifest
- This topic has 6 replies, 2 voices, and was last updated 5 years, 5 months ago by
mattia.
-
AuthorPosts
-
June 5, 2020 at 11:26 #28341
mattia
ParticipantHello,
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
June 5, 2020 at 15:40 #28343support
KeymasterHi,
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.
June 6, 2020 at 15:21 #28349mattia
ParticipantIt 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
June 7, 2020 at 23:34 #28358support
KeymasterYes, you can use the “Compare the current build to a specific version” button (see step #18 of the tutorial).
June 8, 2020 at 17:32 #28362mattia
ParticipantThank 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
June 10, 2020 at 18:06 #28375support
KeymasterSorry, 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.
June 10, 2020 at 21:24 #28376mattia
Participant- 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)?
- Regarding the differences, I will attach the screenshot.
-
AuthorPosts
- You must be logged in to reply to this topic.