Inconsistent Binary Output When Building STM32CubeIDE Project on Linux and Windows
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2023-03-30 5:11 AM
I am facing an issue where the binary output of my STM32CubeIDE project built on Linux and Windows is inconsistent. I have installed STM32CubeIDE Version 1.6.1 and the fixed Toolchain: GNU Tools for STM32 (7-2018-q2-update) on both platforms. Upon comparing the makefiles, I found that they match, but the resulting binaries do not.
Can you suggest steps that I can take to ensure consistent binary output on both platforms? Additionally, which files should I compare to troubleshoot the issue?
Solved! Go to Solution.
- Labels:
-
STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2023-04-05 9:04 AM
Yeah - posting your findings will help others in the same situation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2023-04-13 8:04 AM
@Pavel A.ā and @Bob Sā, thank you for your patience.
Unfortunately, I have not yet been able to solve the problem completely.
But I have found out when the problem occurs. It only occurs when the G++ compiler optimization is set to -O2. If I set it to -O0 for a part of the project, namely a folder with several modules, the build from Windows is the same as the build from Linux. However, I could not figure out in the code what exactly is optimized differently from G++ on Linux than from G++ on Windows.

- Ā« Previous
-
- 1
- 2
- Next Ā»