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  <20212022  2023  2024  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  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: linking in IOC makefile for RTEMS
From: "Johnson, Andrew N. via Tech-talk" <tech-talk at aps.anl.gov>
To: "D. Peter Siddons" <siddons at bnl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Fri, 16 Jul 2021 19:21:32 +0000
Hi Pete,

Just an idea, does it make any difference if you remove the tarball.h file from your _SRCS variable (you shouldn’t include .h files in _SRCS anyway, if you want to install them they go into INC instead)?

- Andrew


On Jul 16, 2021, at 2:08 PM, Siddons, David via Tech-talk <tech-talk at aps.anl.gov> wrote:

I have an RTEMS test IOC (generated using makeBaseApp) to which I've added a source file which declares a large array (actually, a compiled-in file system). The Makefile has:

......
# rather than directly into the IOC application, that
# causes problems on Windows DLL builds
myexampleSupport_SRCS += dbSubExample.c
myexampleSupport_SRCS += devmyexampleVersion.c
myexampleSupport_SRCS += myexampleHello.c
myexampleSupport_SRCS += initTrace.c
myexampleSupport_SRCS += tarball.h
myexampleSupport_SRCS += tarball.c

where the tarball files are my additions. The C file contains:

/*
 *  Declarations for C structure representing binary file epicsRtemsFSImage
 *
 *  WARNING: Automatically generated -- do not edit!
 */

#include <sys/types.h>

const unsigned char epicsRtemsFSImage[] = {
  0x74, 0x61, 0x72, 0x62, 0x61, 0x6c, 0x6c, 0x2f, 0x00, 0x00, 0x00, 0x00, 
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
  .....etc, then:

const size_t epicsRtemsFSImage_size = sizeof(epicsRtemsFSImage);


The EPICS base libraries contain a weak reference to this same symbol (from libcom/RTEMS/init.c) , and I expected this definition to overwrite the weak one, but inspection of the executable only shows the weak one, and the size variable is not referenced at all. What am I missing? It seems that the tarball file is compiled, but not linked.

Pete.

-- 
Complexity comes for free, simplicity you have to work for.


Replies:
Re: linking in IOC makefile for RTEMS Siddons, David via Tech-talk
References:
linking in IOC makefile for RTEMS Siddons, David via Tech-talk

Navigate by Date:
Prev: linking in IOC makefile for RTEMS Siddons, David via Tech-talk
Next: Re: linking in IOC makefile for RTEMS Siddons, David 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  <20212022  2023  2024 
Navigate by Thread:
Prev: linking in IOC makefile for RTEMS Siddons, David via Tech-talk
Next: Re: linking in IOC makefile for RTEMS Siddons, David 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  <20212022  2023  2024 
ANJ, 16 Jul 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·