Miosix Toolchain: Difference between revisions

From Miosix Wiki
Jump to navigation Jump to search
m (Reanmed links so that commands in other tutorials work)
No edit summary
Line 27: Line 27:
* [https://miosix.org/toolchain/MiosixToolchainInstaller.exe Miosix Toolchain Windows] (sha1sum a1277181d1a46c09f012299c5583317bf733c6d1) This is a self-installing .exe
* [https://miosix.org/toolchain/MiosixToolchainInstaller.exe Miosix Toolchain Windows] (sha1sum a1277181d1a46c09f012299c5583317bf733c6d1) This is a self-installing .exe
Both versions will automatically detect a previous version of the compiler and uninstall it.
Both versions will automatically detect a previous version of the compiler and uninstall it.
* [https://miosix.org/toolchain/MiosixToolchainInstaller.pkg Miosix Toolchain Mac OS] (sha1sum 1386c407167f9be370d5c48031f292d42bff66fb)
Released January 10th, 2023. Contributed by Daniele Cattaneo, it is a release build of the Miosix toolchain for Mac OS (Intel).


== Previous version of the Miosix Toolchain ==
== Previous version of the Miosix Toolchain ==
Line 34: Line 36:
_MIOSIX_GCC_PATCH_VERSION is set to 1 in this release.
_MIOSIX_GCC_PATCH_VERSION is set to 1 in this release.


You can download it here
No longer supported, if you need it you will have to rebuild this toolchain from sources.
* [https://miosix.org/toolchain/4.7.3mp1/MiosixToolchainInstaller.run Miosix Toolchain Linux] (sha1sum 6952ce2106e5a6f830a250b9b384e8dba0fe4100) This is self-installing shell script, run it with
<source lang="bash">sh MiosixToolchainInstaller.run</source>
* [https://miosix.org/toolchain/4.7.3mp1/MiosixToolchainInstaller.exe Miosix Toolchain Windows] (sha1sum 9750cef4593c5eb5df8fc497cdd888d33f1e006d) This is a self-installing .exe


[[Category:Installation and Configuration]]
[[Category:Installation and Configuration]]

Revision as of 09:39, 10 January 2023

Information on the Miosix Toolchain

The Miosix Toolchain is a patched version of the GCC compiler, Newlib C library, and libstdc++ library. The patches to the compiler and standard libraries are required to:

  • Provide thread safety. Cooperation between the compiler and kernel is needed to make certain C/C++ standard library functions and certain C++ language constructs thread safe. For example throwing C++ exception, constructors of static objects, accessing the same FILE * handle from more threads. This cannot be done by the kernel alone and is the primary motivation for the patches.
  • Improved speed of the pthread and C++11 thread APIs. For example, by modifying Newlib so that pthread_mutex_t is not a generic opaque pointer but the real struct containing the mutex implementation, a 7x speedup can be achieved for mutexes.
  • Code size and RAM requirement reductions, such as reducing the size of large buffers found in the C stdio library.

Some of the patches have been contributed upstream, but to date compiling Miosix still requires patches. Patches are updated from time to time, and users are required to upgrade to the latest version of the compiler when necessary. The build system will warn you when it's time to upgrade the compiler.

Latest version of the Miosix Toolchain

Released August 12th, 2020. This version:

  • upgrades GCC to 9.2.0
  • supports the C++11 thread API in Miosix (before only the POSIX one was supported)
  • supports C++14
  • reduces code size of printf-related functions
  • provides many improvements and bug fixes to Miosix userspace processes
  • provides more comprehensive atomic operation support through GCC's libatomic

_MIOSIX_GCC_PATCH_MAJOR is set to 3, and _MIOSIX_GCC_PATCH_MINOR is set to 1 in this release.

You can download it here

  • Miosix Toolchain Linux (sha1sum 061ec4bb98a83c5529f9fb1a7aea650838fcf94f) This is self-installing shell script, run it with
sh MiosixToolchainInstaller.run

Both versions will automatically detect a previous version of the compiler and uninstall it.

Released January 10th, 2023. Contributed by Daniele Cattaneo, it is a release build of the Miosix toolchain for Mac OS (Intel).

Previous version of the Miosix Toolchain

Released June 8th, 2014. This version provides GCC 4.7.3.

_MIOSIX_GCC_PATCH_VERSION is set to 1 in this release.

No longer supported, if you need it you will have to rebuild this toolchain from sources.