Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT: tweak makefiles for bsd compatibility #98

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

klauer
Copy link
Contributor

@klauer klauer commented Oct 27, 2023

These changes allow a TcBSD system to build ads-ioc instances using pytmc

TODO

  • Ensure changes still work on Linux

Testing is going on here:
https://github.com/pcdshub/tcbsd-ioc-boot-tool/
Specifically this script: https://github.com/pcdshub/tcbsd-ioc-boot-tool/blob/master/boot.sh

@klauer
Copy link
Contributor Author

klauer commented Nov 7, 2023

@ZLLentz @tangkong this is part of the prototyping effort; unclear what should be done about it overall.
If this specific makefile tweak works on Linux, this PR could probably be merged without issue.

@ZLLentz
Copy link
Member

ZLLentz commented Nov 8, 2023

OK so what I do here is clone this branch to a dev folder, pick a PLC ioc, point it to this dev folder, and verify that I still get a working IOC at the end?

@klauer
Copy link
Contributor Author

klauer commented Nov 8, 2023

Right, if it still works on psbuild-rhel7 (generating the same IOC as before) we should be good to go

@ZLLentz
Copy link
Member

ZLLentz commented Nov 8, 2023

Ok, I'll give this a test with the example motion ioc

@ZLLentz
Copy link
Member

ZLLentz commented Nov 9, 2023

The only change on the rhel linux side is that the project hash is now different (maybe because I changed the makefile? I don't know the source of the hash), the IOC makes and runs as normal

$ git diff
diff --git a/iocBoot/ioc-tc-mot-example/Makefile b/iocBoot/ioc-tc-mot-example/Makefile
index 4831a43..2dd1836 100644
--- a/iocBoot/ioc-tc-mot-example/Makefile
+++ b/iocBoot/ioc-tc-mot-example/Makefile
@@ -1,4 +1,4 @@
-IOC_TOP = /reg/g/pcds/epics/ioc/common/ads-ioc/R0.6.1
+IOC_TOP = /cds/home/z/zlentz/github/ads-ioc
 IOC_INSTANCE_PATH := $(shell pwd)

 # Set PRODUCTION_IOC to 1 to move from a testing to a production IOC:
diff --git a/iocBoot/ioc-tc-mot-example/envPaths b/iocBoot/ioc-tc-mot-example/envPaths
index 13e1c9f..79c15ff 100644
--- a/iocBoot/ioc-tc-mot-example/envPaths
+++ b/iocBoot/ioc-tc-mot-example/envPaths
@@ -1,5 +1,5 @@
 epicsEnvSet("IOC","${IOC=ioc-tc-mot-example}")
-epicsEnvSet("TOP","/cds/group/pcds/epics/ioc/common/ads-ioc/R0.6.1")
+epicsEnvSet("TOP","/cds/home/z/zlentz/github/ads-ioc")
 epicsEnvSet("EPICS_SITE_TOP","/reg/g/pcds/epics/")
 epicsEnvSet("EPICS_MODULES","/reg/g/pcds/epics//R7.0.2-2.0/modules")
 epicsEnvSet("AUTOSAVE","/reg/g/pcds/epics//R7.0.2-2.0/modules/autosave/R5.8-2.1.0")
diff --git a/iocBoot/ioc-tc-mot-example/st.cmd b/iocBoot/ioc-tc-mot-example/st.cmd
index 69bb6c6..a195992 100755
--- a/iocBoot/ioc-tc-mot-example/st.cmd
+++ b/iocBoot/ioc-tc-mot-example/st.cmd
@@ -1,11 +1,11 @@
-#!/reg/g/pcds/epics/ioc/common/ads-ioc/R0.6.1/bin/rhel7-x86_64/adsIoc
+#!/cds/home/z/zlentz/github/ads-ioc/bin/rhel7-x86_64/adsIoc
 ################### AUTO-GENERATED DO NOT EDIT ###################
 #
 #         Project: lcls-plc-example-motion.tsproj
 #        PLC name: tc_mot_example (tc_mot_example Instance)
 # Generated using: pytmc 2.16.0
-# Project version: 23c395a
-#    Project hash: 23c395a1506272f879cd623d6062176244b0c2f3
+# Project version: c8dc5f2
+#    Project hash: c8dc5f2a33beb9eb94ca2819f8ba8ce9146113a2
 #     PLC IP/host: 172.21.148.148
 #      PLC Net ID: 172.21.148.148.1.1
 # ** DEVELOPMENT MODE IOC **
@@ -270,7 +270,7 @@ dbLoadRecords("caPutLog.db", "IOC=$(IOC)")
 dbLoadRecords("TwinCAT_TaskInfo.db", "PORT=$(ASYN_PORT),PREFIX=PLC:TST:MOT,IDX=1")
 dbLoadRecords("TwinCAT_AppInfo.db", "PORT=$(ASYN_PORT), PREFIX=PLC:TST:MOT")

-dbLoadRecords("TwinCAT_Project.db", "PREFIX=PLC:TST:MOT,PROJECT=lcls-plc-example-motion.tsproj,HASH=23c395a,VERSION=23c395a,PYTMC=2.16.0,PLC_HOST=172.21.148.148")
+dbLoadRecords("TwinCAT_Project.db", "PREFIX=PLC:TST:MOT,PROJECT=lcls-plc-example-motion.tsproj,HASH=c8dc5f2,VERSION=c8dc5f2,PYTMC=2.16.0,PLC_HOST=172.21.148.148")

 #   LCLS General: * -> 2.9.1 (SLAC)
 dbLoadRecords("TwinCAT_Dependency.db", "PREFIX=PLC:TST:MOT,DEPENDENCY=LCLS_General,VERSION=2.9.1,VENDOR=SLAC")

Copy link
Member

@ZLLentz ZLLentz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we go ahead and merge this

@ZLLentz ZLLentz marked this pull request as ready for review November 9, 2023 01:06
@ZLLentz ZLLentz merged commit 6e87d9c into pcdshub:master Nov 9, 2023
@klauer klauer deleted the mnt_tcbsd branch November 9, 2023 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants