This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Hex file size is bigger in Segger Embedded Studio than Keil

Hi, I use the original "nRF5_SDK_14.2\examples\ble_peripheral\ble_app_uart" no any modification, in Keil the .hex file size is 71k while it is 153k in SES.

My questions are:

  1. which .hex file i should use?

  2. is there any comparison for code effectiveness between Keil and SES ?

Thanks.

  • Yes, different compile makes different binaries, that's well know thing;) However more then 100% difference is very suspicious.

    • Are you sure these code bases are equal?
    • Are you talking about HEX file size on the PC? That means nothing as HEX files i text file coding both binary FW data and memory addresses. You need to compare raw binaries.
    • What optimizations you use in each of the compilation chains?

    My answers would be:

    1. Until the FWs work you can use any HEX file you want.
    2. Yes there are sources on the internet comparing different C compilers/linkers and there is nice blog post from Nordic here.

    Note that this is still evolving thing, all active open source (GCC) projects as well as companies like Keil/SEGGER/IAR are working on their products so if you really care about this you need to revisit the topic at least once a year. Set up some benchmark projects which suit your use cases and do the judgement yourself (also note that code size, RAM demand and performance are usually tight together and you cannot freely play with one without impacting the others;).

Related