[PATCH 04/17] bsp/arm: Add linker symbol bsp_processor_count

Gedare Bloom gedare at rtems.org
Wed Mar 5 13:17:18 UTC 2014

I would like to consider some rules for defining symbols in the linker
scripts. In general I think we should aim to make the linker scripts
as simple as possible and avoid defining any symbols in them.

Ultimately, it would be nice if all the linkcmds for an arch or even
across RTEMS are shared like the ARM linkcmds.


On Tue, Mar 4, 2014 at 4:47 AM, Ralf Kirchner
<ralf.kirchner at embedded-brains.de> wrote:
> Hi Chris,
> Yes using "enable SMP" sounds like a nice idea.
> Actually beeing under time pressure I needed a solution which I could
> get up and running quickly and easily. This is the major reason for the
> linker command files solution.
> I am sure the "enable SMP" solution also would be doable but it would
> have cost me time I did not have.
> Kind Regards
>         Ralf Kirchner
> Am 03.03.2014 22:43, schrieb Chris Johns:
>> On 3/03/2014 8:25 pm, Ralf Kirchner wrote:
>>> Hi Chris,
>>> Actually there are two Altera Cyclone V BSP which are different only in
>>> their linker commands file. One of the BSPs supports SMP and the other
>>> one is a single core BSP.
>>> The single core BSP came in handy during the development of not SMP
>>> related BSP parts like the network driver.
>> I would have though this would be managed by the enable SMP option on
>> the command line to RTEMS.
>>> The SMP BSP uses linker commands file linkcmds.altcycv_devkit_smp and
>>> defines bsp_processor_count to 2 in this linker commands file before
>>> including linkcmds.altcycv_devkit.
>>> The single core BSP directly uses linker commands file
>>> linkcmds.altcycv_devkit and leaves bsp_processor_count set to 1.
>>> Because bsp_processor_count gets defined in the linker commands file I
>>> have added it to linker-symbols.h
>> How portable are the linker command files ? They are specific to the GNU
>> ld and sure we will be using it for the foreseeable future however we
>> need to be mindful clang is moving fast and we should be ready.
>> I like linker command files and I have used and abused them in the past
>> but I wonder if we need to be asking the question "Can this be
>> implemented using standard language features that are portable ?", for
>> example using a define controlled the RTEMS_SMP macro.
>> Chris
> --
> --------------------------------------------
> Embedded Brains GmbH
> Ralf Kirchner          Dornierstr. 4
> D-82178 Puchheim       Germany
> email: ralf.kirchner at embedded-brains.de
> Phone: +49-89-18 94 741-17
> Fax:   +49-89-18 94 741-08
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel

More information about the devel mailing list