build of libbsd for powerpc fails with error: redefinition of 'eieio'

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jul 19 05:21:35 UTC 2019


On 18/07/2019 19:37, dufault at hda.com wrote:
> 
> 
>> On Jul 18, 2019, at 01:16 , Sebastian Huber <sebastian.huber at embedded-brains.de> wrote:
>>
>>>> I think the <bsp.h> should not include the low level io.h header file.
> 
> Is there an up-to-date definition of what should be in <bsp.h>?  The latest "RTEMS BSP and Driver Guide” says:

I don't have an up-to-date definition. The goal should be to get rid of 
it entirely.

> 
> "The file include/bsp.h contains prototypes and definitions specific to this board. Every BSP is required to provide a bsp.h. The best approach to writing a bsp.h is copying an existing one as a starting point.
> "Many bsp.h files provide prototypes of variables defined in the linker script (linkcmds).”
> 
> - The advice “The best approach… is copying an existing one…” is suspect;

Yes, copy and paste is not a good advice.

> - The above is a poster-child for that EARS document you pointed out.
> 
> Removing <libcpu/io.h> from <bsp.h> leaves definitions such as the following that depend definitions from <libcpu/io.h>.  That seem to require a header such as <bsp/io.h> that <libcpu/io.h> would include.
> 
> /* fundamental addresses for BSP (CHRPxxx and PREPxxx are from libcpu/io.h) */
> #define _IO_BASE            0xe0000000 /* Motload's PCI IO base */
> #define _ISA_MEM_BASE       CHRP_ISA_MEM_BASE
> /* address of our ram on the PCI bus   */
> #define PCI_DRAM_OFFSET     CHRP_PCI_DRAM_OFFSET

A <bsp/io.h> sounds like a good approach. Finding all users of these 
defines is a bit of work. They are used by shared code, so every BSP 
which uses this shared code needs the new header file.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


More information about the devel mailing list