Blame view

RIOT/cpu/atmega_common/Makefile.include 1.1 KB
a752c7ab   elopes   add first test an...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  # Target architecture for the build. Use avr if you are unsure.
  export TARGET_ARCH ?= avr
  
  export CFLAGS_CPU = -mmcu=$(CPU) $(CFLAGS_FPU)
  export CFLAGS_LINK  = -ffunction-sections -fdata-sections -fno-builtin -fshort-enums
  export CFLAGS_DBG  ?= -ggdb -g3
  export CFLAGS_OPT  ?= -Os
  
  export CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
  export ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG)
  export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -static -lgcc -e reset_handler -Wl,--gc-sections
  
  # export the peripheral drivers to be linked into the final binary
  export USEMODULE += periph
  export USEMODULE += periph_common
  
  # the atmel port uses uart_stdio
  export USEMODULE += uart_stdio
  
  # include module specific includes
  export INCLUDES += -I$(RIOTCPU)/atmega_common/include -isystem$(RIOTCPU)/atmega_common/avr-libc-extra
  
  ifeq ($(LTO),1)
    # avr-gcc <4.8.3 has a bug when using LTO which causes a warning to be printed always:
    # '_vector_25' appears to be a misspelled signal handler [enabled by default]
    # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59396
    export LINKFLAGS += -Wno-error
  endif