Hello.
This patches add in the avr-libc a library per device.
I against, to build full the avr-libc library for device, this dramatically
increase compile time and the code size of avr-libc. Instead, I suggest to
build libc for architecture and add small library with device specific
functions for eeprom, wdt, boot e.t.c. modules.
Changes in avr-libc:
1. Add libdevice subdirectory and subdirectories with device specific
libraries variants:
libdevice
eeprom libs:
|\eeprom_1d
|\eeprom_20
|\eeprom_xmega
wdt libs:
|\wdt_ver_1
|\wdt_ver_2
dummy dir:
|\none
2. Add in devtools\gen-avr-lib-tree.sh:*_DEV_INFO arrays device library name
[1] and name of subdirectory [2] with eeprom library for this device. In
addition here it is possible to customize other libraries:
AVR12_DEV_INFO="\
t90s1200:crts1200.o:libs1200[1]:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS}:none[2];\
...
AVR5_DEV_INFO="\
tmega16:crtm16.o:libm16:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS}:eeprom_20;\
...
tmega164p:crtm164p.o:libm164p:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS}:eeprom_20;\
...
AVRXMEGA4_DEV_INFO="\
txmega64a3:crtx64a3.o:libx64a3:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS}:eeprom_xmega\
e.t.c.
3. Add in devtools\Device.am rules for building device libraries.
Now only the "eeprom_read_byte" and "eeprom_write_byte" functions for eeprom
library is implemented.
The patch for GCC add the -muse-device-lib switch in GCC.
Use the -muse-device-lib switch for automatic link the with device libraries.
For using the old avr-libc without device libraries, the -muse-device-lib
don't need.
Anatoliy.
_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev