This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM - differences between cross compilng on x86 and x64

I has an old project on ARM7TDMI-S which was developed on Windows XP. Currently I change system to newest and I have some problems with compilation: I use gcc-arm-none-eabi compiler.
  1. I download arm toolchain, release 9-2020-q2 (precompiled binaries, x64). During linking linker informs about ROM overflow. Compilation was done on Ubuntu 18.04 running on Windows 10 WSL2.

  2. In next iteration I downloaded same version of compilator like on WinXP (precompiled binaries, release 4_9-2015-q2, x86) and downloaded extra libs to allow running x86 apps:

libc6:i386 libncurses5:i386 libstdc++6:i386

There is progress, aplication was build correctly, but it do not work as expected. Some functions are broken.

  1. In last attempt I create virtual-machine with Ubuntu 16.04 i386 and use there compiler binaries such like in point 2. Everything works perfect.

Linker command:

arm-none-eabi-g++ -mcpu=arm7tdmi-s -march=armv4t -marm -mlittle-endian -mfloat-abi=soft -Os -fmessage-length=0 -ffunction-sections -fdata-sections -Wunused -Wuninitialized -Wextra -Wconversion -Wpointer-arith -Wpadded -Wshadow -Wlogical-op -Wfloat-equal -Wall -T<path_to_linker_script> -Xlinker --gc-sections -Wl,-Map,<path_to_map> -o <path_to_elf_file> <paths_to_o_files>

So my question is, anybody knows what can cause this problem? I know that easy way is use VM, but WSL is comfortable and much faster than VM.