[Debian-lego-team] Release of a Combined GNU Legacy Toolchain for h8300-hitachi-coff
Matthew Sheets
mesheets at hotmail.com
Sat Jun 28 19:25:11 BST 2025
I think I have the GNU-Legacy-Toolchain project at a reasonably stable point for the creation of a release, and I also have a GitHub Action setup to run on a weekly basis, which should provide a timelier warning of any breaking changes introduced by newer tool versions as they evolve.
More details are available on the project GitHub page [1], but briefly this project bundles parts the following for a combined build:
• binutils-2.16.1
• gcc-3.4.6
• gcc-4.4.7
• gpc-2.1-20070904
• newlib-1.19.0
• config-latest
• gdb-5.3 -or- gdb-6.8
Interestingly, GCC 3.4.6 generates much more compact binaries for brickOS-bibo than GCC 4.4.7 (kernel is over 1 kb smaller when using GCC 3.4.6); more details are on the project page noted above.
Collectively, gdb-6.8 appears to be the ideal GDB version for a combined toolchain build; however, the GDB server capabilities that were integrated into the BrickEmu emulator were based on GDB v5 and do not work with GDB v6. So, I currently have the project setup to be selectively built with either GDB v5 or GDB v6.
In addition to the main README.md on the project site, I would also call out the README.md files in both the "patches" subdirectory [2] and the "sym-combined" subdirectory [3] for even further details on how this project is setup and what patches have been applied.
More build details are available on the project site [4], but I would highlight that if targeting the RCX, instead of running the "sym-combined/configure" or "sym-combined/h8300-hitachi-coff-configure" scripts, run the "sym-combined/rcx-lego-configure" script to appropriately setup the configure script.
If everything is adequately configured, BrickEmu still works with the latest version of DDD, which was nice to see. There are a few quirks in how things work compared to a perhaps more typical debug session, but the debugging guide on the original BrickEmu project site still appears usable [5]. Briefly, DDD's "Run" and "Stop" should not be used with a BrickEmu setup. Instead, load your program, set your breakpoints, press "Continue" in DDD, and then start your program in the virtual RCX.
If this toolchain is stable, I hope to be able to focus more on brickOS-bibo and BrickEmu….
Thank you,
Matthew
[1] https://github.com/BrickBot/GNU-Legacy-Toolchain
[2] https://github.com/BrickBot/GNU-Legacy-Toolchain/blob/master/patches
[3] https://github.com/BrickBot/GNU-Legacy-Toolchain/tree/master/sym-combined
[4] https://github.com/BrickBot/GNU-Legacy-Toolchain?tab=readme-ov-file#quick-start-build-guide
[5] https://jochen-hoenicke.de/rcx/brickemu.html#sec-5
More information about the Debian-lego-team
mailing list