<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 8, 2020 at 9:46 PM Heinz Junkes <<a href="mailto:junkes@fhi-berlin.mpg.de">junkes@fhi-berlin.mpg.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hallo Mritunjay,<br>
everything looks pretty good. I'm commenting on the text. I also send this mail<br>
to two EPICS experts (Andrew Johnson and Michael Davidsaver). Maybe they also have some ideas.<br></blockquote><div><br></div><div>Thank you so much Heinz! It will be really a great help! </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
> <br>
> Current Status: <br>
> <br>
> 1) Successfully built EPICS7 with RTEMS5 by hand for pc-386<br>
> 2) Worked for RSB recipe. <br>
> In its due process, I Wrote: <br>
> i) rsb/rtems/config/epics/epics-7-1.cfg <br>
> ii)rsb/rtems/config/epics/epics-base.bset <br>
> iii)rsb/source-builder/config/epics-7-1.cfg<br>
> 3) Added Patch for RTEMS-pc-386 support which made the above recipe work successfully. <br>
> 4) Therefore, Successully built EPICS7 with RTEMS5 by using RSB recipe as well for pc-386 as of now. <br>
> 5) Sent 4 Patches for review of the same. <br>
> <br>
> What problems are in the next steps?<br>
> <br>
> 1) How to make it work across different architectures?<br>
> 2) Exisiting EPICS works on the old legacy network stack.<br>
> 3) I am not using EPICS upstream branch. It is being built<br>
> by Heinz's epics playground. <br>
> 4) Doubts in how to start with testing. <br>
> <br>
> My Resarch work for the Problem no: 1<br>
> <br>
> I have gone through the EPICS developer guide from here<br>
> exhaustively in the past couple of day and here are few interesting things<br>
> that I found which can help: <br>
> <br>
> 1) "The main ingredients of the build system are:<br>
> • A set of configuration files and tools provided in the EPICS base/configure directory<br>
> • A corresponding set of configuration files in the <top>/configure directory of a non-base <top> directory<br>
> structure to be built. The makeBaseApp.pl and makeBaseExt.pl scripts create these configuration files. Many of<br>
> these files just include a file of the same name from the base/configure directory.<br>
> • Makefiles in each directory of the <top> directory structure to be built<br>
> • User created configuration files in build created $(INSTALL_LOCATION)/cfg directories.<br>
> "<br>
> <br>
> Remarks: Now since it is also mentioned in the guide that "makeBaseApp.pl <br>
> creates directories and then copies template files into the newly created directories <br>
> while expanding macros in the template files. EPICS base provides two sets of template files: simple and example."<br>
> Can we think of using makeBaseApp.pl to that end? Making the user allow <br>
> to change the configurations from the terminal? <br>
<br>
I don't think that makeBaseApp.pl will help you. This is intended to build an example IOC. It takes the settings from the above mentioned configuration files.<br>
<br>
You "only" need to specify the location of the RTEMS installation in configure/os/CONFIG_SITE.Common.RTEMS.<br>
RTEMS_VERSION =<br>
RTEMS_BASE =<br>
<br>
Then you have to define the target in configure/CONFIG_SITE:<br>
...<br>
# Which target architectures to cross-compile for.<br>
# Definitions in configure/os/CONFIG_SITE.<host>.Common<br>
# may override this setting.<br>
CROSS_COMPILER_TARGET_ARCHS=<br>
…<br>
e.g. “CROSS_COMPILER_TARGET_ARCHS=RTEMS-xilinx_zynq_a9_qemu"<br>
<br>
And for each target there must be a file in configure/os:<br>
e.g. CONFIG_Common.RTEMS-xilinx_zynq_a9_qemu<br>
If it is not provided by EPICS, the RSB should install it there (adapted to the target to be used by epics make).<br></blockquote><div><br></div><div>Yes, Heinz. I followed the above steps and created a patch which I applied in the configuration files of RSB recipe.</div><div>The problem with it is that it's made only for pc-386 and I have to hardcode there about location of the RTEMS installation in </div><div>configure/os/CONFIG_SITE.Common.RTEMS. My doubt is how to modify the patch that can it offer user-specific location of the RTEMS </div><div>installation and bsp? </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> <br>
> 2) "The startup directory in EPICS base contains a perl script, EpicsHostArch.pl, which can be used to define<br>
> EPICS_HOST_ARCH. This script can be invoked with a command line parameter defining the alternate compiler (e.g.<br>
> if invoking EpicsHostArch.pl yields solaris-sparc, then invoking EpicsHostArch.pl gnu will yield<br>
> solaris-sparc-gnu).<br>
> The startup directory also contains scripts to help users set the path and other environment variables”<br>
This has nothing to do with 2)<br></blockquote><div><br></div><div>I am sorry for the misunderstanding. All the 4 points mentioned here are my observations only for the Problem No.1 </div><div>`1) How to make it work across different architectures?`</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
There's no need to adjust anything here. The EPICS make recognizes the architecture on which it is started.<br>
<br>
> Remarks: As EPICS_HOST_ARCH, can we do something similar for CROSS_COMPILER_TARGET_ARCHS?<br>
> <br>
> 3) ") The following is a summary of targets that can be specified for gnumake:<br>
> • <action><br>
> • <arch><br>
> • <action>.<arch><br>
> • <dir><br>
> • <dir>.<action><br>
> • <dir>.<arch><br>
> • <dir>.<action>.<arch><br>
> where:<br>
> <arch> is an architecture such as solaris-sparc, vxWorks-68040, win32-x86, etc.<br>
> <action> is help, clean, realclean, distclean, inc, install, build, rebuild, buildInstall, realuninstall, or uninstall"<br>
> <br>
> Remarks: Now similar to the above stated, can we work for Cross Compiler target Architecture? <br>
> <br>
<br>
But this does not refer to 3) ?</blockquote><div><br></div><div>No no, this remark is also for the problem 1 only as told above. Slight misunderstanding here :) </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
3) You have to take "my" repo at the moment, because the adaptations to RTEMS5 are not yet included in the official epics-base. This is a hen-and-egg problem because RTEMS is only now in the release phase, so my changes have not been implemented yet. <br></blockquote><div><br></div><div>Ok, I hope Dr. Gedare and Chris can help you with that. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
2) I'm just about to figure out in the Epics Makefiles whether the target was built with the legacy-stack or libbsd-stack. It's working already.<br>
Now I also have to adjust the rtems_init.c accordingly. Here I have to clean up a little bit. But I hope to have this finished by the middle of the week. <br></blockquote><div><br></div><div>Thank you so much for the update! </div><div><br></div><div>So I would like to ask my other mentors - what can I do for the time being? What should be the next steps for this week? <br></div><div>And yes how to begin the testing part? </div><div>I have tried to find some resources but I think it will be </div><div>better if you can help somewhere to look at. </div><div><br></div><div>Thanks</div><div>Mritunjay Sharma</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> These were the little doubts that originated from the research work I did. <br>
> I will like the opinion of mentors that what can be the optimal way now to approach the<br>
> project after this? What can be some resources for better research work of the<br>
> above problems? <br>
> <br>
> Also, for the reference: <br>
> Link to the changes in commits of rsb can be found here: <a href="https://github.com/RTEMS/rtems-source-builder/compare/master...mritunjaysharma394:epics-support" rel="noreferrer" target="_blank">https://github.com/RTEMS/rtems-source-builder/compare/master...mritunjaysharma394:epics-support</a><br>
> <br>
> The patch for epics can be found here: <a href="https://github.com/mritunjaysharma394/epics-mritunjay/tree/master/patches" rel="noreferrer" target="_blank">https://github.com/mritunjaysharma394/epics-mritunjay/tree/master/patches</a><br>
> <br>
> <br>
> Thanks <br>
> Mritunjay Sharma<br>
> <br>
> <br>
> <br>
> <br>
Heinz</blockquote></div></div>