Announcement

Collapse
No announcement yet.

Rust Lands Support For The Motorola 68000 Processors

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rust Lands Support For The Motorola 68000 Processors

    Phoronix: Rust Lands Support For The Motorola 68000 Processors

    With the m68k community continuing to be active around supporting the vintage Motorola 68000 series with modern open-source software, Rust has now merged support for these old processors...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Architectures supported by Rust:

    Code:
    let optional_components = &[
        "x86",
        "arm",
        "aarch64",
        "amdgpu",
        "avr",
        "mips",
        "powerpc",
        "systemz",
        "jsbackend",
        "webassembly",
        "msp430",
        "sparc",
        "nvptx",
        "hexagon",
        "riscv",
        "bpf",
    ];
    A safe, concurrent, practical language. Contribute to glaubitz/rust development by creating an account on GitHub.
    Last edited by uid313; 20 September 2021, 10:17 AM.

    Comment


    • #3
      People forget how widespread these processors were, and continue to be. Many of them have their own MMU and for many years ran all kinds of Unix boxes, right up until the RISC revolution. Everything from early Suns, to Apple computers, to AT&T Unix PCs and more.* Various incarnations still get made for embedded systems though I can't say for certain how many still get used to run unix-like operating systems over RTOSs (though Rust is certainly applicable in the latter case).

      *All of those are still supported by NetBSD. One day I'd love to acquire an SE/30, max out the ram, install an ethernet card, and put NetBSD on it as a small workstation.

      Comment


      • #4
        The ready-made target may only be for Linux/m68k target, but this is good for other uses too, because it provides the building blocks if someone wants to whip up a bare-metal target definition and their own support library and experiment with using nightly-channel Rust to treat something like the SEGA Genesis/Mega Drive, Atari ST, etc. as a microcontroller akin to the existing support for platforms like the various STM32 ARM boards.

        (Speaking of which, I should stop forgetting to order that 3D printed bracket I need to install my reflashed Gotek floppy emulator in the Atari ST 520FM I rescued on garbage day a while ago.)

        Comment


        • #5
          experiment with using nightly-channel Rust to treat something like the SEGA Genesis/Mega Drive, Atari ST, etc. as a microcontroller akin to the existing support for platforms like the various STM32 ARM boards.
          I've been waiting for LLVM's recent m68k work to officially make its way to Rust. I'll be undertaking exactly this for the Sega Genesis this week, and other m68k platforms to follow. The approach I take is precisely that of the embedded Rust community, using svd2rust, as they do with microcontrollers. The difference is that the SVDs are vendor-provided for microcontrollers, while I have to manually roll my own from hardware docs the homebrew community has reverse engineered. This is mostly not hard, but tedious. There's a little more low-level support code on top of that. I've got a nearly-complete GameBoy Advance crate already written in this way.

          One of the challenges is that consoles of this era all have one or more secondary processors/dsps, so complete hardware support has to address that in an ergonomically programmable way. I have ideas for that, but they're the main impedence to full and hardy platform support.

          There are some other people out there doing Rust on game consoles, even someone who had already been working on m68k/genesis, by building his own compiler ahead of the nightly support, but AFAIK I'm the only one taking the embedded Rust / svd2rust approach.

          Comment


          • #6
            Haha, this is great news. I first learned about this effort when I was going to give a talk about the Amiga to an office full of Rust coders. Unfortunately that talk never happened, but perhaps the universe decided that I simply couldn't give it until this was ready. Having only just revived Gentoo Linux on m68k, I shall definitely be trying this.

            Comment


            • #7
              Ah this is cool.

              I put together a Mega Drive (GCC based) toolchain a while back (here). Would be really interesting to do similar for Rust.

              It is also great to see Rust targeting a wider range of platforms. This does increase my confidence in it.

              Comment


              • #8
                I wonder, does RedoxOS support m68k? Could it be ported to something like an amega?

                Comment


                • #9
                  Originally posted by Developer12 View Post
                  I wonder, does RedoxOS support m68k? Could it be ported to something like an amega?
                  Nah, it's not just about the CPU. You need hardware drivers too, and the Amiga's hardware is very special, especially the graphics hardware. Even on Linux, you can't do much graphical stuff. You get a basic framebuffer, but it's only good for text and the Tux logo. You can run X but it has to do some CPU-killing pixel format conversions.

                  Comment


                  • #10
                    Can you actually run rustc on m68k machines to compile code there?

                    Comment

                    Working...
                    X