Skip to content

Commit

Permalink
build: add debugging flags for avr
Browse files Browse the repository at this point in the history
  • Loading branch information
paradajz committed Nov 21, 2021
1 parent 578bcde commit 4162e2a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ ifeq (,$(findstring gen,$(TYPE)))
-mrelax \
-mmcu=$(MCU)

ifeq ($(DEBUG), 1)
COMMON_FLAGS += -g -gdwarf-2
LDFLAGS += -g -gdwarf-2
OPT := -Og
endif

ifeq ($(MCU), atmega16u2)
LDFLAGS += -flto
endif
Expand Down Expand Up @@ -136,7 +142,7 @@ ifeq (,$(findstring gen,$(TYPE)))
LDFLAGS += -g -gdwarf-2
OPT := -Og
endif

ifneq ($(FPU),)
COMMON_FLAGS += -mfpu=$(FPU)
LDFLAGS += -mfpu=$(FPU)
Expand Down

0 comments on commit 4162e2a

Please sign in to comment.