[En-Nut-Discussion] Having some trouble to compile Ethernut
Ole Reinhardt
ole.reinhardt at embedded-it.de
Tue Mar 16 10:40:29 CET 2010
Hello!
> When I try to compile Ethernut, I get following Error messages:
> ../../nut/arch/arm/dev/at91_emac.c:461:1: error: embedding a directive
> within macro arguments is not portable
>
> ../../nut/arch/arm/dev/at91_emac.c:464:1: error: embedding a directive
> within macro arguments is not portable
Which compiler do you use? Does not look like gcc?
Your compiler does not preprocessor statements included in a directive.
outr(EMAC_PIO_PUDR,
#if !defined(PHY_MODE_RMII)
/* Additionally disable RMII, if not configured. */
_BV(PHY_COL_RMII_BIT) |
#endif
_BV(PHY_RXDV_TESTMODE_BIT) |
_BV(PHY_RXD0_AD0_BIT) | _BV(PHY_RXD1_AD1_BIT) |
_BV(PHY_RXD2_AD2_BIT) | _BV(PHY_RXD3_AD3_BIT) |
_BV(PHY_CRS_AD4_BIT));
Your problem will be fixed, if you remove the #if !defined(...)
statements from within the outr statement and replace it like this:
#if !defined(PHY_MODE_RMII)
/* Additionally disable RMII, if not configured. */
#define PHY_MODE_RMII_SETTINGS _BV(PHY_COL_RMII_BIT)
#else
#define PHY_MODE_RMII_SETTINGS 0
endif
outr(EMAC_PIO_PUDR,
PHY_MODE_RMII_SETTINGS |
_BV(PHY_RXDV_TESTMODE_BIT) |
_BV(PHY_RXD0_AD0_BIT) | _BV(PHY_RXD1_AD1_BIT) |
_BV(PHY_RXD2_AD2_BIT) | _BV(PHY_RXD3_AD3_BIT) |
_BV(PHY_CRS_AD4_BIT));
Anyone else has these problems?
Shall I fix it in the trunk?
Regards,
Ole
--
Thermotemp GmbH, Embedded-IT
Embedded Hard-/ Software and Open Source Development,
Integration and Consulting
Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen -
tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97
Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280
More information about the En-Nut-Discussion
mailing list