Running two RTEMS instances on two RISC-V harts

Jan.Sommer at dlr.de Jan.Sommer at dlr.de
Mon Oct 24 12:13:02 UTC 2022


Hi Jens,

Is there a real need to have the telescope driver twice in memory?
Would it be enough to implement the driver as “object oriented” in C?
Then you would just need to create a context struct during initialization based on the hartid with the correct interrupt assignment and base address of the memory mapped registers.

At least that is a common pattern in the driver implementations of RTEMS.

Best regards,

    Jan

PS: It is probably a good idea to remove the disclaimer in your email footer before posting to a public mailinglist.

From: users <users-bounces at rtems.org> On Behalf Of Schweikhardt, Jens (TSPCE6-TL5)
Sent: Montag, 24. Oktober 2022 13:53
To: 'users at rtems.org' <users at rtems.org>
Subject: Running two RTEMS instances on two RISC-V harts

hello, world\n

we’re currently in the design phase for a rocketchip RISC-V project with two harts.
Think a common HW platform where each hart drives a separate telescope unit.
The C code for each telescope is basically identical with the exception of memory mapped registers and interrupts.
Our idea is to compile the C code twice and link with different linkerscripts, separating the images in RAM
via different MEMORY { RAM: ORIGIN = 0x######## } declarations. A bootloader loads the images
to different addresses and branches depending on mhartid, starting two separate RTEMS applications, each
of which runs 10 tasks. There’s no communication between the RTEMS instances.

Are we attempting something crazy (too complex) and we should instead look into <your suggestion here>?

If not, is there a simple way to compile an app twice for different RAM: ORIGIN values?
I tried using a Linkerscript with -Wl,-T,Linkerscript with a different MEMORY but this draws a warning such as
warning: redeclaration of memory region `RAM'
and uses the value in the BSPs  linkcmds file. It looks like the last declaration wins and the linkcmds is
always read after linker scripts specified by my -Wl command line option.

Jens Schweikhardt

TL4 LCT Software Development

Phone:

Mail:

+49 7191 930-2849<tel:+4971919302849>

Jens.Schweikhardt at tesat.de<mailto:Jens.Schweikhardt at tesat.de>

[logo]<https://www.tesat.de/>

________________________________

Tesat-Spacecom GmbH & Co. KG
Gerberstraße 49
71522 Backnang

[fb]<https://www.facebook.com/TesatSpacecom/>[li]<https://www.linkedin.com/company/tesat>[tw]<https://www.twitter.com/TesatSpacecom>


This electronic message may contain highly confidential or privileged information from Tesat-Spacecom GmbH & Co. KG. Any of the information is only intended for the recipient and the use by any other party is not authorized. If you are not the intended recipient, be aware, that any disclosure, copying, distribution or use of the contents of this message is prohibited. If you have received this message by error please notify us immediately by telephone (+49 7191 930-2849) or by e-mail (Jens.Schweikhardt at tesat.de). Thank you.




________________________________

Tesat-Spacecom GmbH & Co. KG
Sitz: Backnang; Registergericht: Amtsgericht Stuttgart HRA 270977
Persoenlich haftender Gesellschafter: Tesat-Spacecom Geschaeftsfuehrungs GmbH;
Sitz: Backnang; Registergericht: Amtsgericht Stuttgart HRB 271658;
Geschaeftsfuehrung: Thomas Reinartz, Kerstin Basche, Ralph Schmid

[Image removed by sender. banner]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20221024/696f129a/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 1984 bytes
Desc: image001.gif
URL: <http://lists.rtems.org/pipermail/users/attachments/20221024/696f129a/attachment-0004.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1438 bytes
Desc: image002.gif
URL: <http://lists.rtems.org/pipermail/users/attachments/20221024/696f129a/attachment-0005.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.gif
Type: image/gif
Size: 1404 bytes
Desc: image003.gif
URL: <http://lists.rtems.org/pipermail/users/attachments/20221024/696f129a/attachment-0006.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.gif
Type: image/gif
Size: 1474 bytes
Desc: image004.gif
URL: <http://lists.rtems.org/pipermail/users/attachments/20221024/696f129a/attachment-0007.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.jpg
Type: image/jpeg
Size: 1925 bytes
Desc: image005.jpg
URL: <http://lists.rtems.org/pipermail/users/attachments/20221024/696f129a/attachment-0001.jpg>


More information about the users mailing list