1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

atmega_common: refactor avr-libc-extra into avr_libc_extra module

This commit is contained in:
Kaspar Schleiser 2018-04-27 12:17:01 +02:00
parent b603c298ef
commit 7313525035
14 changed files with 16 additions and 2 deletions

View File

@ -31,8 +31,13 @@ void led_init(void);
void board_init(void)
{
atmega_set_prescaler(CPU_ATMEGA_CLK_SCALE_INIT);
#ifdef MODULE_AVR_LIBC_EXTRA
atmega_stdio_init();
#endif
cpu_init();
led_init();
irq_enable();

View File

@ -58,7 +58,10 @@ void board_init(void)
#endif
#endif
#ifdef MODULE_AVR_LIBC_EXTRA
atmega_stdio_init();
#endif
cpu_init();
led_init();
irq_enable();

View File

@ -2,6 +2,6 @@
MODULE = atmega_common
# add a list of subdirectories, that should also be build
DIRS = periph
DIRS = periph avr_libc_extra
include $(RIOTBASE)/Makefile.base

View File

@ -18,7 +18,9 @@ export USEMODULE += periph_common
export USEMODULE += stdio_uart
# include module specific includes
export INCLUDES += -I$(RIOTCPU)/atmega_common/include -isystem$(RIOTCPU)/atmega_common/include/vendor
export INCLUDES += -I$(RIOTCPU)/atmega_common/include \
-isystem$(RIOTCPU)/atmega_common/avr_libc_extra/include \
-isystem$(RIOTCPU)/atmega_common/avr_libc_extra/include/vendor
ifeq ($(LTO),1)
# avr-gcc <4.8.3 has a bug when using LTO which causes a warning to be printed always:
@ -37,3 +39,6 @@ LINKFLAGS += $(LINKFLAGPREFIX)--defsym=__DATA_REGION_LENGTH__=$(RAM_LEN)
LDSCRIPT_COMPAT = $(if $(shell $(TARGET_ARCH)-ld --verbose | grep __TEXT_REGION_LENGTH__),,\
-T$(RIOTCPU)/$(CPU)/ldscripts_compat/avr_2.26.ld)
LINKFLAGS += $(LDSCRIPT_COMPAT)
# avr libc needs some RIOT-specific support code
USEMODULE += avr_libc_extra

View File

@ -0,0 +1 @@
include $(RIOTBASE)/Makefile.base