From 4a4d6e19debeb52c64dc2d3f70b97450ce965d5f Mon Sep 17 00:00:00 2001 From: Rihards Skuja Date: Tue, 9 Jan 2018 20:16:51 +0200 Subject: [PATCH] Fix debug port names for PWM --- Makefile | 5 +++-- include/debug.h | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 49a48ba..5f981f0 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ TARGET = main SRC = $(wildcard $(SRC_DIR)/*.c) OBJ = $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o) LST = $(SRC:$(SRC_DIR)/%.c=$(BUILD_DIR)/%.lst) -OPT = s + OPT = s # Name of this Makefile (used for "make depend"). MAKEFILE = Makefile @@ -53,6 +53,7 @@ ifeq ($(BUILD),debug) -Wmissing-include-dirs -Wno-unused-parameter -Wuninitialized \ -Wold-style-definition -Wmissing-prototypes -Wunreachable-code \ -Wno-unused-but-set-variable -Wmaybe-uninitialized + CINCS += -I/usr/include/simavr # endif @@ -97,7 +98,7 @@ AVRDUDE_PROGRAMMER = usbasp AVRDUDE_PORT = usb AVRDUDE_WRITE_FLASH = -U flash:w:$(BUILD_DIR)/$(TARGET).hex -#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep + #AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep # Uncomment the following if you want avrdude's erase cycle counter. diff --git a/include/debug.h b/include/debug.h index 1f6e677..002c485 100644 --- a/include/debug.h +++ b/include/debug.h @@ -2,15 +2,15 @@ #define DEBUG_H #include -#include "/usr/include/simavr/avr/avr_mcu_section.h" +#include AVR_MCU(F_CPU, "atmega328p"); const struct avr_mmcu_vcd_trace_t _mytrace[] _MMCU_ = { - { AVR_MCU_VCD_SYMBOL("DDRB"), .what = (void *) &DDRB, }, - { AVR_MCU_VCD_SYMBOL("TCCR1A"), .what = (void *) &TCCR1A, }, - { AVR_MCU_VCD_SYMBOL("TCCR1B"), .what = (void *) &TCCR1B, }, - { AVR_MCU_VCD_SYMBOL("OCR1A"), .what = (void *) &OCR1A, }, - { AVR_MCU_VCD_SYMBOL("OCR1B"), .what = (void *) &OCR1B, }, + { AVR_MCU_VCD_SYMBOL("DDRD"), .what = (void *) &DDRD, }, + { AVR_MCU_VCD_SYMBOL("TCCR0A"), .what = (void *) &TCCR0A, }, + { AVR_MCU_VCD_SYMBOL("TCCR0B"), .what = (void *) &TCCR0B, }, + { AVR_MCU_VCD_SYMBOL("OCR0A"), .what = (void *) &OCR0A, }, + { AVR_MCU_VCD_SYMBOL("OCR0B"), .what = (void *) &OCR0B, }, }; #endif /* DEBUG_H */