On Tue, Aug 22, 2023 at 5:17 PM Brett Sterling <brett.sterl...@odysseysr.com>
wrote:

> Thanks for the fast response.
>
> I'm pretty sure that if POSIX is an *optional* item, I did *not* build
> with it (I'm *very* new to RTEMS, so I've been using what I was given
> with the "Hello World" Quick Start build).
>
> I'm glad to give that a try if you point me to some sort of documentation
> to learn how to enable POSIX.
>

I actually had to look for this myself. :)

https://docs.rtems.org/branches/master/user/bld/index.html#  describes the
build configuration.  Each BSP has a set of defaults you can print out
using waf bspdefaults

./waf bspdefaults --rtems-bsp=sparc/leon3

That prints all of the options available and their default value. Looking
through that, I see:

# Enable support for POSIX signals
RTEMS_POSIX_API = False

You create an ini file with just what you care about overriding. Something
like:

[sparc/leon3]
RTEMS_POSIX_API = True

Use this option to "waf configure" to select your INI file
"--rtems-config=CONFIG.INI". The idea is that you can configure RTEMS how
you want and keep that INI file under your project's configuration control.

On many of the BSPs for SoCs, you can change RAM/Flash size, clock speed,
and a surprising number of very hardware specific values which tweak the
base SoC board to match a custom board based on that SoC. The goal is to
give people the knobs and switches needed to avoid hacking on a BSP.

If something in the manual needs tweaking, just point it out.

--joel


> That being said, I just want to be clear - we're looking for the
> 'signal()' function rather than the POSIX 'sigaction()' function.
>
> Thanks!
> Brett
> ------------------------------
> *From:* Joel Sherrill <j...@rtems.org>
> *Sent:* Tuesday, August 22, 2023 4:14 PM
> *To:* Brett Sterling <brett.sterl...@odysseysr.com>
> *Cc:* users@rtems.org <users@rtems.org>
> *Subject:* Re: "signal()" in RTEMS unresolved
>
> CAUTION: This email originated from outside of the organization. Do not
> click links or open attachments unless you recognize the sender and know
> the content is safe.
>
>
>
> On Tue, Aug 22, 2023 at 4:46 PM Brett Sterling <
> brett.sterl...@odysseysr.com> wrote:
>
> Hello all,
>
> My code calls the 'signal()' function.  There are no errors during
> compile, but when it goes to the link stage, it gets an error:
>
> : in function `Encore::Framework::Component::Component(unsigned int,
> double)':
> Component.cpp:(.text+0x1338): undefined reference to `signal'
>
>
> Did you build with POSIX enabled? POSIX signals are part of the small
> amount of POSIX functionality that is covered by that switch.
>
>
> I've seen the documentation that indicates the Posix method is to use
> 'sigaction()', but we're looking to use the standard C/C++ library
> functionality.  Based on the error, I'm guessing that either
>
>    1. I'm not linking with the correct libraries OR
>    2. I need to specify some sort of switch when building the RTEMS tools
>    (in order to include the 'signal()' function in the libraries).
>
> I've searched 'the web' but haven't come up with anything that indicates
> where I'm going wrong.
>
> Any pointers here would be appreciated :-)
>
> Thanks!
> Brett
> _______________________________________________
> users mailing list
> users@rtems.org
> http://lists.rtems.org/mailman/listinfo/users
> <https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Flists.rtems.org%2Fmailman%2Flistinfo%2Fusers&data=05%7C01%7C%7C32fd9200243347529c7408dba35d2acb%7Cd761ffacf6be45b88f6f288a59577095%7C0%7C0%7C638283392785714573%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=y8FFLSdf%2Fu6CUWEAYlmU48stE%2BeK8qJA0lHvAFKStNM%3D&reserved=0>
>
>
_______________________________________________
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Reply via email to