Fix RTC synchronization after sleep, add many more tests
There were two issues with the tests 1. Incorrect print formats causing incorrect output. 2. The RTC driver was not waiting for the shadow registers to be updated after sleeping, their reset values to be read.
This commit is contained in:
@@ -83,7 +83,7 @@ S_SOURCES := $(call find_important, $(SOURCEDIR), '*.s')
|
||||
SPP_SOURCES := Bsp/Mcu/$(DEVICE_TYPE).S
|
||||
SOURCES = $(C_SOURCES) $(S_SOURCES) $(SPP_SOURCES) $(CPP_SOURCES)
|
||||
|
||||
APPS := ./Application/main ./Test/pass ./Test/fail ./Test/timeout ./Test/clock ./Test/stop ./Test/no_start
|
||||
APPS := ./Application/main ./Test/pass ./Test/fail ./Test/timeout ./Test/clock ./Test/stop ./Test/no_start ./Test/lptim ./Test/set_time ./Test/periodic_alarms ./Test/wakeup_irq
|
||||
APP_ELFS = $(addsuffix .elf, $(APPS))
|
||||
APP_MAPS = $(addsuffix .map, $(APPS))
|
||||
APP_BINS = $(addsuffix .bin, $(APPS))
|
||||
@@ -98,7 +98,7 @@ OBJS = $(filter-out $(APP_OBJS), $(ALL_OBJS))
|
||||
|
||||
LINKER_SCRIPT ?= Bsp/Mcu/$(DEVICE_TYPE).ld
|
||||
|
||||
OUTPUT_NAME ?= watch
|
||||
OUTPUT_NAME ?= Application/main
|
||||
OUTPUT_BIN ?= $(OUTPUT_NAME).bin
|
||||
OUTPUT_ELF ?= $(OUTPUT_NAME).elf
|
||||
OUTPUT_MAP ?= $(OUTPUT_NAME).map
|
||||
@@ -121,7 +121,7 @@ CPU_FLAGS = -mthumb -mcpu=cortex-m0plus -mfloat-abi=soft
|
||||
CFLAGS = -Wall -Wextra -pedantic -Werror -Wcast-align
|
||||
CXX_FLAGS = -Wsuggest-override -Wsuggest-final-methods -Wsuggest-final-types
|
||||
# Debug/optimization
|
||||
CFLAGS += -Os -ggdb
|
||||
CFLAGS += -Os -g3
|
||||
CFLAGS += -fdata-sections -ffunction-sections
|
||||
# Architecture
|
||||
CFLAGS += $(CPU_FLAGS)
|
||||
@@ -132,6 +132,9 @@ CFLAGS += -D$(DEVICE_FAMILY_DEFINE) -D$(DEVICE_TYPE_DEFINE) -D$(DEVICE_LINE_DEFI
|
||||
# CFLAGS += -DPRINTF_DISABLE_SUPPORT_FLOAT -DPRINTF_DISABLE_SUPPORT_EXPONENTIAL -DPRINTF_DISABLE_SUPPORT_PTRDIFF_T
|
||||
# Consider this one if we are running short on flash, it saved about 1K
|
||||
# CFLAGS += -DPRINTF_DISABLE_SUPPORT_LONG_LONG
|
||||
|
||||
CFLAGS += -D__STDC_FORMAT_MACROS
|
||||
|
||||
# Includes
|
||||
CFLAGS += -I./Bsp/Mcu/
|
||||
CFLAGS += -I./ThirdParty/stm32/$(DEVICE_LINE)/Include
|
||||
@@ -229,7 +232,7 @@ flash: $(OUTPUT_BIN)
|
||||
jlink: $(OUTPUT_BIN)
|
||||
@echo "FLASH $(OUTPUT_BIN)"
|
||||
JLinkExe -device $$(echo $(DEVICE_TYPE) | tr '[:lower:]' '[:upper:]') -if SWD \
|
||||
-speed auto -autoconnect 1 -CommanderScript flash.jlink
|
||||
-speed auto -autoconnect 1 -CommanderScript cmd.jlink
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
Reference in New Issue
Block a user