EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <20252026  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <20252026 
<== Date ==> <== Thread ==>

Subject: Re: Running EPICS on RTEMS/MVME3100
From: Vijay Kumar Banerjee via Tech-talk <[email protected]>
To: "Marks, Nicholas" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Fri, 24 Oct 2025 12:19:18 -0700
The patch should apply cleanly to the main branch. I have not tried applying on branch 6, but I would think that it should apply as the code related to patch has not changed during this time.

rtems-net-legacy is required if your application needs networking. rtems-net-legacy build on main for powerpc is currently broken due to a recent deprecation of "set_vector()" directive. I am working on a fix for this, but it might be next week because I generally get to work on this during weekends only :)

Meanwhile, you can try the patches with RTEMS 6. If it doesn't apply cleanly, I am happy to modify the patch accordingly


Best,

Vijay

On Fri, Oct 24, 2025 at 11:17 AM Marks, Nicholas <[email protected]> wrote:
Thank you all for the suggestions.

Vijay: I am working on trying your patches today. Is this intended to be applied to the version 6 branch, or to the main branch? If it is for the main branch, is the rtems-net-legacy package still required for using RTEMS on the MVME3100 with EPICS? Building rtems-net-legacy with waf on RTEMS 6.1 worked fine but not with RTEMS from the main branch...but perhaps this is expected.

- Nick

From: Vijay Kumar Banerjee <[email protected]>
Sent: Friday, October 24, 2025 1:16 AM
To: Heinz Junkes <[email protected]>
Cc: Marks, Nicholas <[email protected]>; [email protected] <[email protected]>
Subject: Re: Running EPICS on RTEMS/MVME3100
 
You don't often get email from [email protected]. Learn why this is important
Hello Nicholas, and others I was able to get the mvme3100 running with EPICS IOC on RTEMS 6 some time ago. I have a patchset to get the RTEMS libi2c properly initialized with mvme3100 Somehow, these patches fell through the cracks and didn't
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd


Hello Nicholas, and others

I was able to get the mvme3100 running with EPICS IOC on RTEMS 6 some time ago. I have a patchset to get the RTEMS libi2c properly initialized with mvme3100

Somehow, these patches fell through the cracks and didn't make it to RTEMS upstream.

I'm attaching the patches here. Could you please test them? I do not have access to a hardware to be able to test them. I have only checked that they apply cleanly on the current master. Please let me know if there are any issues with the patches.

Heinz, with these patches, you would not need to directly call _IO_All_drivers_initialized. The EPICS RTEMS application needs to have the following configure option added to the application code

#define CONFIGURE_APPLICATION_NEEDS_LIBI2C_DRIVER


If these patches fix the mvme3100 I2C issue, I am happy to open a merge request at upstream RTEMS and try to get it merged.

Thanks,

Vijay



On Thu, Oct 23, 2025 at 7:41 PM Heinz Junkes via Tech-talk <[email protected]> wrote:
Hello Marks,
We have been running the MVME3100 with the MVME3100 for quite some time now. But still with RTEMS5.

I applied the following kernel patch at the time, which solved a problem with the i2c driver.

rtems@rtems-dev:~/MVME3100$ cat kernel.patch
diff --git a/bsps/powerpc/mvme3100/start/bspstart.c b/bsps/powerpc/mvme3100/start/bspstart.c
index 0ec215e33b..96d6e2f9cd 100644
--- a/bsps/powerpc/mvme3100/start/bspstart.c
+++ b/bsps/powerpc/mvme3100/start/bspstart.c
@@ -52,6 +52,8 @@
 extern unsigned long __rtems_end[];
 extern unsigned      ppc_exc_lock_std, ppc_exc_gpr3_std;

+extern bool _IO_All_drivers_initialized;
+
 /*
  * Copy Additional boot param passed by boot loader
  */
@@ -419,7 +421,14 @@ void bsp_start( void )

 static void mvme3100_i2c_initialize(void)
 {
+  printk("-------- call BSP_i2c_initialize() with _IO_All_drivers_initialized = true\n");
+  /*
+   * we need the drivers registered as they appear, due to get
+   * the i2c devices ready
+   */
+  _IO_All_drivers_initialized = true;
   BSP_i2c_initialize();
+  _IO_All_drivers_initialized = false;
 }

 RTEMS_SYSINIT_ITEM(
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/Makefile.am b/c/src/lib/libbsp/powerpc/mvme3100/Makefile.am
index 48a61b9329..842cb92d67 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/mvme3100/Makefile.am
@@ -43,8 +43,8 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/shared/start/bspgetworka
 librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/shared/start/zerobss.c
 librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/shared/start/sbrk.c
 librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
-librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
 librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-empty.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/mvme3100/start/bspclean.c
 # tod
 librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/rtc/rtc-support.c
 librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/mvme3100/rtc/todcfg.c
rtems@rtems-dev:~/MVME3100$


To what extent
has this now been incorporated into the official release?
I'll be happy to look into this when I get the chance.


HTH,
Heinz
------------------------------------------------------------------------------
Fritz-Haber-Institut  | Phone: (+49 30) 8413-4270
Heinz Junkes          | VC: https://zoom.fhi.berlin/junkes
Faradayweg 4-6        | Visitors: Hittorfstrasse 29 (Bld S (Slough House) )
D - 14195 Berlin 
------------------------------------------------------------------------------
“Sorry I’m a bit late, had a terrible time…
All sort of things cropping up at the last moment. Uh, how are we for time?”
—Zarquon's address to Milliways

> On 24. Oct 2025, at 00:12, Marks, Nicholas via Tech-talk <[email protected]> wrote:
>
> Hello,
>
> Has anyone succeeded recently in getting an IOC to run on RTEMS on the MVME3100?  I've been trying but haven't had much luck. I have built RTEMS 6.1 using the RTEMS source builder with the MVME3100 BSP and I have successfully run several of the provided test applications (https://github.com/RTEMS/rtems/tree/main/testsuites/samples). I also built EPICS base 7.0.9 for RTEMS-mvme3100, however any EPICS applications I create do not work. I believe the failure is during BSP initialization before the IOC code even enters the picture since if I remove everything from the IOC's main function except a single printf, the same crash is present, and no print. I've pasted the VME console output below this message.
> Note that the console hangs for several minutes after this line "ds1375_probe (open): No such file or directory" before printing the
> ""%s" is not a valid command pathname." message, which comes from either
> base/modules/libcom/RTEMS/score/rtems_init.c
> or
> base/modules/libcom/RTEMS/posix/rtems_init.c
>
> When running the RTEMS test programs that work, the "ds1375_probe..." line is not present.
> Any suggestions would be appreciated. Thank you.
>
> MVME3100> go -a4000000
> -----------------------------------------
> Welcome to rtems-6.1.0 (PowerPC/Generic (no FPU)/mvme3100)
> BSP: mvme3100, CVS Release ($Name$)
> CPU 0x8020 - rev 0x20
> Additionnal boot options are H
> Initial system stack at 465df0
> Going to start PCI buses scanning and initialization
> Board Type: MVME3100-1263 (S/N EFDD3B6)
> External (=PCI Bus) Clock Freq   :   66666666 Hz
> Core Complex Bus (CCB) Clock Freq:  333333330 Hz
> CPU Clock Freq:                     166666665 Hz
> Ethernet 0                  EC:9E:CD:19:41:FF
> Ethernet 1                  EC:9E:CD:19:42:00
> Ethernet 2                  EC:9E:CD:19:42:01
> Number of PCI buses found is : 3
> BUS:SLOT:FUN  VENDOR-DEV_ID: COMMAND STATUS BASE_ADDR0 BASE_ADDR1 IRQ_PIN ->
>   0:0x00:0    0x1057-0x0008:  0x0006 0x20b0 0x80000000 0x00000000       0 ->
>   0:0x11:0    0x10e3-0x0148:  0x0146 0x02b0 0x80100004 0x00000000       1 ->
>   0:0x12:0    0x10b5-0x6520:  0x0147 0x02b0 0x00000000 0x00000000       0 ->
>   0:0x13:0    0x10b5-0x6520:  0x0147 0x02b0 0x00000000 0x00000000       0 ->
>   0:0x14:0    0x1095-0x3124:  0x01c7 0x02b0 0x80400004 0x00000000       1 ->   2 (=0x0
>   2:0x00:0    0x1033-0x0035:  0x0146 0x0210 0x80300000 0x00000000       1 ->   4 (=0x0
>   2:0x00:1    0x1033-0x0035:  0x0146 0x0210 0x80301000 0x00000000       2 ->   5 (=0x0
> Memory:                             536870912 bytes
> Cleared PCI errors: pci_stat was 0x20b0
> OpenPIC Version 1.2 (1 CPUs and 56 IRQ sources) at 0x3775135744
> OpenPIC Vendor 0 (Unknown), Device 0 (Unknown), Stepping 0
> OpenPIC timer frequency is 41666666 Hz
> MSR is 0x00001000, TCR 0x04000000
> -----------------------------------------
> Exit from bspstart
> Tundra Tsi148 PCI-VME bridge detected at 0x80100000, IRQ 0
> Tsi148 Outbound Ports:
> Port  VME-Addr   Size       PCI-Adrs   Mode:
> 0:    0x20000000 0x0e000000 0xc0000000 A32, SUP, D32, SCT
> 1:    0x00000000 0x00ff0000 0xcf000000 A24, SUP, D32, SCT
> 2:    0x00000000 0x00010000 0xcfff0000 A16, SUP, D32, SCT
> 7:    0x00000000 0x01000000 0xce000000 CSR, SUP, D32, SCT
> Tsi148 Inbound Ports:
> Port  VME-Addr   Size       PCI-Adrs   Mode:
> 0:    0xc0000000 0x20000000 0x00000000 A32, PGM, DAT, SUP, USR, MBLT, BLT
> vmeTsi148 IRQ manager: looking for registers on VME...
> Trying to find CSR on VME...
> vmeTsi148 - IRQ manager using VME CSR to flush FIFO
> libi2c: Library not initialized
> Registering mpc8540 i2c bus driver :No such file or directory
> Registering /dev/console as minor 0 (==/dev/ttyS0)
> ds1375_probe (open): No such file or directory
> "%s" is not a valid command pathname.
>
> *** FATAL ***
> fatal source: 11 (RTEMS_FATAL_SOURCE_PANIC)
> fatal code: 3444772 (0x00349024)
> RTEMS version: 6.1.0.not-released
> RTEMS tools: 13.3.0 20240521 (RTEMS 6, RSB no-repo, Newlib 1b3dcfd)
> executing thread ID: 0x0b010001
>
>
>
> Copyright(C)2008-2013,Emerson Network Power-Embedded Computing,Inc.
> All Rights Reserved
> Copyright Motorola Inc. 1999-2007, All Rights Reserved
> MOTLoad RTOS Version 2.0,  PAL Version 1.2 RM04
> Wed Nov  6 17:17:43 MST 2013
>
> MPU-Type             =MPC8540
> MPU-Int Clock Speed  =833MHz
> MPU-CCB Clock Speed  =333MHz
> MPU-DDR Clock Speed  =166MHz
> MPU-PCI Clock Speed  =66MHz, PCI, 64-bit
> MPU-Int Cache(L2) Enabled, 256KB, L2CTL =A8000300
>
> Reset/Boot Vector    =Flash0
>
> Local Memory Found   =20000000 (&536870912)
> User Download Buffer =0159D000:0179CFFF
>
> MVME3100>



Replies:
Re: Running EPICS on RTEMS/MVME3100 Marks, Nicholas via Tech-talk
References:
Running EPICS on RTEMS/MVME3100 Marks, Nicholas via Tech-talk
Re: Running EPICS on RTEMS/MVME3100 Heinz Junkes via Tech-talk
Re: Running EPICS on RTEMS/MVME3100 Vijay Kumar Banerjee via Tech-talk
Re: Running EPICS on RTEMS/MVME3100 Marks, Nicholas via Tech-talk

Navigate by Date:
Prev: Re: Running EPICS on RTEMS/MVME3100 Marks, Nicholas via Tech-talk
Next: Re: Running EPICS on RTEMS/MVME3100 Marks, Nicholas via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <20252026 
Navigate by Thread:
Prev: Re: Running EPICS on RTEMS/MVME3100 Marks, Nicholas via Tech-talk
Next: Re: Running EPICS on RTEMS/MVME3100 Marks, Nicholas via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  <20252026 
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·