We have recently finished implementing a new platform for Loongson’s LoongArch64 family of processors and SoCs. We would like to share it here and see if we could work with you to upstream this new platform (along with its pre-built cross-compiling toolchain and builder framework).
Any suggestions and ideas are welcome.
What is Loongson?
Loongson processors and SoCs are based on the LoongArch ISA, found on MCUs, embedded SoCs, desktop, and server devices alike.
This repository hosts the development platform configuration for 64-bit LoongArch (or simply LoongArch64) devices and currently supports the following SoC/processors:
Processor Model |
Core Architecture |
Model Code |
Loongson 2K0300 |
Loongson LA264 |
ls2k0300 |
With more to come (mostly 2K family of industrial/embedded chips).
Usage
To help deploying this platform, we have prepared the following projects and toolchain - the toolchain is an x86-64 => LoongArch64 cross compiler.
Platform definition and examples (with links to toolchain and builder framework)
1 Like
Interesting. Honestly, I’m surprised to see new Loongson products after 3A6000
come to market after so much was redirected toward RISC-V. Will this be available outside China as reels with developer support for custom hardware, or are these only for Chinese-manufactured boards/eval boards?
I’ll say that I’m just a bystander here with no involvement in the project (I’m just a user that helps answer questions here from time to time), but I’ll say what you’ve probably already figured out during the month of silence. Decide on your own, but if you look at the GitHub queues for the last two years or so, patches to this project aren’t being integrated, and only extremely minor ones are being integrated. The project has already squabbled with two other chip companies, trying to get them to fund PlatformIO’s development, and that’s just resulted in a stalemate of angry customers of those products being cut off from development and updates, even from other users. My impression is that this project is now “pay to play.” If you really want it integrated, you should spark up a (funded) business conversation. Community integrations seem to no longer be accepted by the project.
So if you want this to be transparent, I’d suggest rolling it into a fork of PlatformIO and keeping it up to date (should be easy given the low volume) and offering it directly to your users. This has already been done by teams for Espressif parts and the RP2350 and 2340 lines.
Now, on to the contribution itself. I see only Linux releases of a very old GCC at GitHub - loongson-community/toolchain-loongarch64: GNU toolchain for LoongArch (x86 cross compiler) - PlatformIO. To minimize friction for your developers, current (GCC 14 or 15 + related glibc++ and friends) and hosting on MacOS and Windows, are table stakes. The days of developers putting up with bad tools is over and if your FSE’s are trying to sell into development houses running Windows or BYOD, you’re not likely to get them to install even VMs/Docker images of “alien” OSes because of the hit to developer productivity and security ops flipping out about having untrusted system images running with internal connectivity.
Anyway, I’m a bit of an architecture enthusiast with a strong MIPS background and have followed Loongson curiously through the years, so congrats on getting it this far. I even built the simulator for Godson years and years ago. With the new cold war, I’m not sure how accessible even simulators and data sheets for such things are these days. That would also likely hamper the volunteer pool for those willing to help maintain and support this project.
Anyway, good luck with however you decide to go with this!
Hi Robert,
Will this be available outside China as reels with developer support for custom hardware, or are these only for Chinese-manufactured boards/eval boards?
I think so.
Now, on to the contribution itself. I see only Linux releases of a very old GCC at GitHub - loongson-community/toolchain-loongarch64: GNU toolchain for LoongArch (x86 cross compiler) - PlatformIO. To minimize friction for your developers, current (GCC 14 or 15 + related glibc++ and friends) and hosting on MacOS and Windows, are table stakes.
Understood, I’ll see what can be done on this front.
Anyway, I’m a bit of an architecture enthusiast with a strong MIPS background and have followed Loongson curiously through the years, so congrats on getting it this far. I even built the simulator for Godson years and years ago. With the new cold war, I’m not sure how accessible even simulators and data sheets for such things are these days. That would also likely hamper the volunteer pool for those willing to help maintain and support this project.
Yeah let’s hope Loongson could figure something out in terms of international outreach, now that they have so much going on at the upstream’s end (Linux, compilers, etc.).
Thanks for your input!