AVR32studio 2.7 Linux & Win - different output

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi guys, could you help me get the same compilation result in Windows and Linux? My two systems are:
- Win7-64 + updated Cygwin + AVR32studio 2.7
- Ubuntu 11.10 + AVR32studio 2.7-64

The toolchain version is the same. The Makefile and source are the same. I do make clean between compilation runs.

Still, the resulting .elf file is 169224 bytes on Linux and 412991 bytes on Win7. An .elf generated on the Linux system seems to perform better in a realtime application.

Are there configuration files or compiler defaults which differ?

Where do I start looking in order to make the two systems behave the same?

Please let me know how I can provide you with more info to get to the bottom of this.

Thanks!

Børge

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's an interesting question! I'd check that both toolchains are based on the same gcc version.

If you use the same makefile with identical compiler and linker options, I'd asume that the output should almost be the same. Since ELF-Files include a lot of additional data (e.g. debug symbols) I'd advise you rather to compare the raw binaries.

Maybe you'd get best answers in the AVR GCC forum.

I'll be interested in answers, too, since I'm developing on Linux (I do my builds with the standalone gcc toolchain) but our Integrator builds official software releases on Windows...

-sb

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
An .elf generated on the Linux system seems to perform better in a realtime application.

Sure? Generate the .hex files and compare them, if the binary is not the same. Or compare the .lss files.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

On both systems I cd to the toolchain's /bin directory and get
$ ./avr-gcc-4.4.3.exe --version
avr-gcc-4.4.3.exe (AVR_8_bit_GNU_Toolchain_3.1.0_200) 4.4.3

A web search came up with:
'avr32-objcopy -O ihex myfile.elf myfile.hex'
Is this the recommended method? I made sure to use the absolute path to the tools in the toolchain.

The two resulting .hex files have the same length but different contents.

How should I proceed here? Feel free to suggest some more test which I can run across the two systems.

Børge

Børge

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could also do a disassembly and compare the two outputs, e.g. do avr32-objdump -d .

Hans-Christian