>>>>> "Jifl" == Jonathan Larmour writes: Jifl> Bart Veer wrote: >> This fixes the AT91 SPI driver in the same way as the CortexM >> STM32 one. Jifl> I object to this change. It requires very recent tools (gcc Jifl> 4.3.0+). It's acceptable for the Cortex HAL to do this as it Jifl> is a new HAL, but not all the AT91 HALs. Jifl> Instead I am reinstating the build of spi_at91_init.cxx, but Jifl> ifdeffing it on the presence of CYGBLD_ATTRIB_C_INIT_PRI, Jifl> which is only defined if GCC is recent enough. Patch is Jifl> attached and checked in. I did think about this. We have already changed the relevant platform HALs to default to arm-eabi-gcc instead of arm-elf-gcc, so the default behaviour is already to require an up-to-date compiler that provides the necessary functionality. I expect some 3.0 testing of AT91 tools with the new tools, but none with the old tools. If anybody really does want to keep building AT91 targets with old tools then they can continue to use old sources: either for all of eCos, or just for the SPI driver. I really don't see this as a big problem. Partially reverting the change means there is a still an SPI driver in the source tree which gets linker garbage collection wrong, albeit only if built with an old compiler. I really wanted all SPI drivers to get this right, since any of the existing drivers may get used as the starting point for a new driver. There are other ways in which it could have been fixed, e.g. turning spi_at91.c into spi_at91.cxx as per the LPC driver, or something less pleasant like: #ifdef CYGBLD_ATTRIB_C_INIT_PRI ... #else static void (*spi_at91_init_constructor)(void) __attribute__((unused)) CYGBLD_ATTRIB_SECTION(".ctors.33535") = &spi_at91_bus_init; #endif which makes the fairly safe assumption that any pre-4.3 ARM toolchains use .ctors. So I would have preferred it if you had not reinstated the _init.cxx module. But if you really think it is important, I'll live with it. Bart -- Bart Veer eCos Configuration Architect eCosCentric Limited The eCos experts http://www.ecoscentric.com/ Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No 4422071. Besuchen Sie uns vom 3.-5.03.09 auf der Embedded World 2009, Stand 11-300 Visit us at Embedded World 2009, Nürnberg, Germany, 3-5 Mar, Stand 11-300