La toolchain C/C++ pour CE est sortie en v9.0, basée donc sur LLVM pour le compilateur, qui remplace donc ZDS !
Félicitations à tous les contributeurs, et évidemment à Jacobly en particulier !
The major upgrade from ZDS to LLVMThe toolchain is from now on based on LLVM, an open-source retargetable compiler infrastructure, and @jacobly0 created an (e)z80 backend!
This is a major milestone as it allows the CE toolchain to move away from using the legacy Zilog ZDS compiler, which is closed-source, proprietary, only worked on Windows, and contained numerous bugs.
Thanks to LLVM, later standards of the C and C++ languages are supported (you're not stuck with C89 anymore!), code optimization actually works, and the compiler is able to run natively across multiple platforms. The fact that it is open-source and community-maintained means that bugs can actually be fixed and improvements/feedback can come from anyone.Note: No STL is provided for C++ source code (i.e. no
std::vector, etc.). Currently only language support is offered.Updating your projects for this new toolchain version
In programs you build with this new toolchain, you should notice performance or speed improvements, depending on the optimization level you choose ... or even both
But the massive internal changes in the toolchaindomean that some programs might not compile right away anymore.
In fact, first, after installing the new toolchain, you'll have to update your projects' makefile. It's only a few lines, and a template makefile can be found here.
Regarding potential source code related migration, don't worry, it shouldn't be too difficult to fix your code. Here are some differences:
- Old-style inline assembly will most likely not work, you'd have to write it like the compiler outputs it, in the format fasmg-ez80 expects. Update any assembly source modules with the guide described here.
- Many new errors and warnings may be generated as the compiler is able to better infer. These should be fixed, and programs should compile without any warnings.
- If your program was using 64-bit types (for instance
long long), it may not build (link, more specifically) anymore. In fact, the ZDS compiler even made those 32-bit. If there's enough justified demand for actually supporting 64-bit types properly, we may work on it.
- The convimg project has been updated to support a new YAML format that is easier for beginners and tooling. The previous toolchain release (v8.8) also used a YAML format, however some slight modifications were made in order to make it standard-compliant. Example
convimg.yamlconversion files can be found in the examples.Other changes and improvements
You can find the a more detailed list of changes (and a link to the commits) in the changelog file, but here are the other important changes in addition to the compiler change:
- Lots of cleanup and improvements to the standard includes and headers in general, made possible by the compiler change mentioned above.
ti_SetGCBehaviorto set routines to run before and after a garbage collect would be triggered.
- Newkeypadcdefines: many keypad key defines corresponding to the TI-83 Premium CE keypad were added for easier coding.
usb_BatteryChargingto check if the battery is currently charging.
- Revamped v/s/printf functions, now available if needed thanks to a light third-party library, see docs.
- New: fileioc-powered (by default) implementation for file IO functions, see docs.
- New C++ header-only "library" for easily manipulating "TI real" numbers (see this PR), making some math operations easier. See examples.
abort()doesn't generate code that would make CEmu open its debugger anymore - you can use the specific debug functions for that now.
- Documentation improved and revamped. Available on online here, which replaces the repo's wiki.
Let's thank once again @jacobly0 for his spectacular work (years in the making), as well as everybody who contributed in one way or another, to this release 🥂
Une news sera prochainement écrite
Niveau 15: CC (Chevalier des Calculatrices)
- Level up: 89.9%
- Posts: 1024
- Images: 4
- Joined: 08 Dec 2014, 17:38
- Class: ENSIMAG
Users browsing this forum: No registered users and 3 guests