One of the reasons we chose PlatformIO was that it was cross-platform and cross-IDE.
We have now found that it is not host-OS agnostic.
During a test, we found that the binaries produced when building on Windows 10, differed from the binaries built on Linux, this is even though we have specified platform = ststm32@8.1.0 which I believe should “lock” packages.
It was found that the versions of gccnonearmeabi used were different:
Windows: 1.80201.190214
Linux: 1.80201.181220
We thought this issue could be solved by setting platform_packages = toolchain-gccarmnoneeabi@1.80201.181220 but to no avail, as the Windows build does not recognize this version.
This is due to the fact that the binaries on bintray are built from different versions of gcc for different OSs, so 1.80201.181220 is not available for Windows.
Can this be remedied in some way? Either by aligning the versions available on bintray, or possibly to allow for choosing the Zephyr compiler (we use the Zephyr framework).
They’re not different. They’re both GCC 8.2.1 (80201). The last digits are just the datecodes when they were added (2019-02-12) – it uses the same underlying compiler version.
The problem happened when the code simply did not run on the target when built on Windows, this sparked the investigation.
A simple ls -l also shows a size difference of 8 bytes between the two binaries, additionally diff also reports the files are different.
Visually inspecting the bytes of the binaries using colordiff -y <(xxd foo1.bin) <(xxd foo2.bin) also shows multiple bits which are not equal.
I have also tested with the Blink example an empty main (using framework Zephyr), using ststm32@8.1.0, still diff tells me the files are different.
e.g. (Windows left, Linux right)
I have not tested if an empty application (sorry, did not use blinky, just empty main) runs on target, but the issue still remains that the binaries are different, when compiled under Windows vs Linux, as shown in the picture.
The platformio.ini is as follows.