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  2025  <2026>  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  2025  <2026> 
<== Date ==> <== Thread ==>

Subject: Re: IOC build to generate single DB file from two substitutions on single template file
From: Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov>
To: David Bracey <dbracey at fnal.gov>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Fri, 24 Jul 2026 11:08:44 -0700
On 7/24/26 8:52 AM, David Bracey via Tech-talk wrote:
And with all the substitutions done at build time - none at run time via dbLoadRecords, etc.

Personally, I like having one final substitution appear in st.cmd.  One .db file per logical device.  Ideally with just two arguments.  A macro to prefix all records, and one for hardware address (IP address, PCI B:D.F, etc.).  The two variables which must change with each IOC instance.  This keeps all instance specific configuration in the one st.cmd file.

A recent example I did, of moderate complexity, is the linStat driver.

https ://github.com/mdavidsaver/linStat/tree/master/statApp/Db

The output of the build process is 4 standalone .db files.  The substutions build on a mix of single record templates, and larger "logic" templates.  eg. one is:

dbLoadRecords("../../db/linStatHost.db","IOC=$(IOC)")

linStatHost.db is built from linStatHost.substitutions.  Which includes many instances of single record templates like tblGetI64.template, followed by a couple of more complex files like logicHost.template .  It also includes netStat.db which is an expansion of netStat.substitutions.  "nesting" substitution files like this needs a couple of special lines in Makefile.



References:
IOC build to generate single DB file from two substitutions on single template file David Bracey via Tech-talk
Re: IOC build to generate single DB file from two substitutions on single template file David Bracey via Tech-talk

Navigate by Date:
Prev: Re: IOC build to generate single DB file from two substitutions on single template file Johnson, Andrew N. via Tech-talk
Next: Re: Modbus Module issue Mark Rivers 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  2025  <2026> 
Navigate by Thread:
Prev: Re: IOC build to generate single DB file from two substitutions on single template file Johnson, Andrew N. via Tech-talk
Next: Window build error - can find script. [SEC=OFFICIAL] STARRITT, Andrew 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  2025  <2026> 
ANJ, 27 Jul 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·