AW: Rust on RTEMS
Frank Kühndel
frank.kuehndel at embedded-brains.de
Tue Jan 30 10:03:06 UTC 2024
Hello Jan,
thanks for the info and all your efforts.
Are you planing to add a short "How to use Rust with RTEMS?" section to
the RTEMS user manual?
I am asking because I was thinking of writing a description on how to
use Rust with `#![no_std]` and `#![no_main]` into the user manual.
Basically the same text which I already attached to
https://lists.rtems.org/pipermail/users/2023-December/068914.html
Yet, because you are much ahead of me, does it still make sense for me
to put such a text into the manual (would it not be outdated by your
approach soon)?
Greetings,
Frank
On 1/29/24 19:27, Jan.Sommer at dlr.de wrote:
> Hi everyone,
>
> Sorry for the delayed response.
> Yes, that’s me. I am responsible for the RTEMS related work-package in the “cRustacea in Space” project.
> One of the goals is to create a prototypical port of Rust to RTEMS for our example target platform (Xilinx Zynq).
> The status is currently the following:
>
> * I have a custom target based added to the compiler sources which compiles Rust code for the Zynq
> * I ported the stdlib to work with RTEMS (using the POSIX API)
> * I ported the libc wrapper for this to work
> * I can now compile the below application and unit test and run it on the (simulated) target using cargo build/run/test without the need to use any extra attributes as a work-around.
>
> fn add_two_numbers(num1: i32, num2: i32) -> i32 {
> num1 + num2
> }
>
> #[test]
> fn test_add_two_numbers() {
> assert_eq!(add_two_numbers(2, 3), 5);
> }
>
> pub fn main() -> ! {
> println!("Hallo from println");
> println!("2 + 2 = {}", add_two_numbers(2,2));
>
> loop {}
> }
>
> My next goal is to add those changes to the official Rust repos in order to have it as a Tier3 target platform.
> I need to tidy up my commits and have a few open questions regarding naming conventions (I will start a corresponding thread here shortly).
> With that done, it should be much easier for others to play around with Rust on RTEMS as it only requires to install the nightly compiler via rustup.
>
> Cheers,
>
> Jan
>
> Von: Joel Sherrill<joel at rtems.org>
> Gesendet: Mittwoch, 20. Dezember 2023 23:38
> An: Frank Kühndel<frank.kuehndel at embedded-brains.de>
> Cc: Molock, Dwaine S. (GSFC-5820)<dwaine.s.molock at nasa.gov>;rtems-users at rtems.org <users at rtems.org>; Sommer, Jan<Jan.Sommer at dlr.de>
> Betreff: Re: Rust on RTEMS
>
> Karel Gardas posted in February that he has Rust on RTEMS on an arm.
>
> Frank. Are there instructions on building the tools chain somewhere?
>
> And is Jan Sommer part of the DLR Rust on RTEMS project?
>
> --joel
>
> On Wed, Dec 20, 2023, 3:59 PM Frank Kühndel <frank.kuehndel at embedded-brains.de<mailto:frank.kuehndel at embedded-brains.de>> wrote:
> Hello Dwaine,
>
> On 12/20/23 20:41, Molock, Dwaine S. (GSFC-5820) wrote:
> > Hello,
> >
> > Has anyone been able to execute Rust on RTEMS?
>
> Yes – to use RTEMS from within a Rust application, with
>
> #![no_std]
> #![no_main]
>
> >
> > If so, is there a how to guide and what architecture and development
> hardware was used?
>
> I have not yet found time to write a documentation despite I want to do
> so. Sorry for this. Ferrous Systems first extended Rust to run on
> Gaisler SPARC bare metal and then they figured it works with RTEMS 5
> from Gaisler, too. Their documentation is here:
> https://github.com/ferrous-systems/sparc-experiments/
>
> I did run my examples only on simulators. I tried two architectures with
> RTEMS 6: Leon3 and RISC-V.
>
> Greetings,
> Frank
>
> --
> embedded brains GmbH & Co. KG
> Herr Frank KÜHNDEL
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email:frank.kuehndel at embedded-brains.de<mailto:frank.kuehndel at embedded-brains.de>
> phone: +49-89-18 94 741 - 23
> mobile: +49-176-15 22 06 - 11
>
> Registergericht: Amtsgericht München
> Registernummer: HRA 117265
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
> _______________________________________________
> users mailing list
> users at rtems.org<mailto:users at rtems.org>
> http://lists.rtems.org/mailman/listinfo/users
>
--
embedded brains GmbH & Co. KG
Herr Frank KÜHNDEL
Dornierstr. 4
82178 Puchheim
Germany
email: frank.kuehndel at embedded-brains.de
phone: +49-89-18 94 741 - 23
mobile: +49-176-15 22 06 - 11
Registergericht: Amtsgericht München
Registernummer: HRA 117265
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
More information about the users
mailing list