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:
parent
b603c298ef
commit
7313525035
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
1
cpu/atmega_common/avr_libc_extra/Makefile
Normal file
1
cpu/atmega_common/avr_libc_extra/Makefile
Normal file
@ -0,0 +1 @@
|
||||
include $(RIOTBASE)/Makefile.base
|
Loading…
Reference in New Issue
Block a user