This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ARM-CGT: armcl output is different in ubuntu and windows

Part Number: ARM-CGT

I compiled the Tda4 Mcu1_0 code in windows and ubuntu using the same version of armcl downloaded from https://www.ti.com/tool/download/ARM-CGT/20.2.5.LTS and the same compilation parameters . I found that the size and content of out file and hex file are different. I want to know why this is happening and what I can do about it. 

  • Hello,

    Can you share the differences you are seeing? And what code are you trying to compile?

    Please share the following:

    1) The size difference and content difference you are seeing

    2) Are they functionally behaving differently when you run them?

    3) What program are you building? Is this from the RTOS SDK? For what device?

    Thanks,

    Erick

  • 1. Refer to the map file: it looks like there is a difference in const

    and the size of the hex file is also different.

     .

    2.No differences were found when burning to Tad4 and running. 

    3. It is a bootloader code from vector FBL.

    Another quetion, Is it normal to see differences when cross-compiling the same target code between two platforms?

  • Jano,

    Another quetion, Is it normal to see differences when cross-compiling the same target code between two platforms?

    Yes, there are differences in the code itself. For instance, whenever we build the SBL (Secondary Boot Loader), we take a timestamp of the build. This way when the device boots we print a build date/time stamp. You've probably seen it alongside the version name of the bootloader while the device is booting up. This is one instance in when building it on two different devices, or even on the same device, you will get different output (slightly).

    2.No differences were found when burning to Tad4 and running. 

    This is expected, that the actual functionality is the same.

    Regards,

    Erick

  • But not only the time starmp is different, the compiled size in linux is also smaller than windows, is this expected? 

    there are differences in the code itsel” means that the compilers of the two platforms have different algorithms in the compiler front end or compiler back end?

  • Hello,

    there are differences in the code itsel” means that the compilers of the two platforms have different algorithms in the compiler front end or compiler back end?

    That statement was regarding building across two different platforms, regardless if they were different architectures. On top of that, there are other differences:

    One is the build infrastructure is a bit different to handle Windows and Linux builds as well that can affect the contents. You'll notice some of the build scripts use different tools, bash scripts vs powershell scripts. This can introduce subtle differences in the final output as we try to mimic the behavior of Linux in Windows commands. We have not found any issues with the build system thus far.

    Regards,

    Erick