diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-28 09:12:09 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-28 09:12:09 +0000 |
commit | 4cd975affe635e7e635a76eafd2b0f9b4b747e07 (patch) | |
tree | 03c899a1876ca8b058e8ba1fa5c43f60e8645886 /testhal/STM32/STM32F4xx/RTC | |
parent | 746736f9ca4f97a0dd60eeb4b3d0da6ef178f98c (diff) | |
download | ChibiOS-4cd975affe635e7e635a76eafd2b0f9b4b747e07.tar.gz ChibiOS-4cd975affe635e7e635a76eafd2b0f9b4b747e07.tar.bz2 ChibiOS-4cd975affe635e7e635a76eafd2b0f9b4b747e07.zip |
Improved makefiles on STM32F4xx.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7823 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/STM32F4xx/RTC')
-rw-r--r-- | testhal/STM32/STM32F4xx/RTC/Makefile | 26 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/RTC/main.c | 4 |
2 files changed, 18 insertions, 12 deletions
diff --git a/testhal/STM32/STM32F4xx/RTC/Makefile b/testhal/STM32/STM32F4xx/RTC/Makefile index 9eb7f4c8f..9c5034586 100644 --- a/testhal/STM32/STM32F4xx/RTC/Makefile +++ b/testhal/STM32/STM32F4xx/RTC/Makefile @@ -30,7 +30,7 @@ endif # Enable this if you want link time optimizations (LTO)
ifeq ($(USE_LTO),)
- USE_LTO = no
+ USE_LTO = yes
endif
# If enabled, this option allows to compile the application in THUMB mode.
@@ -81,26 +81,32 @@ PROJECT = ch # Imported source files and paths
CHIBIOS = ../../../..
+# Startup files.
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/NONSTANDARD_STM32F4_BARTHESS1/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/NONSTANDARD_STM32F4_BARTHESS1/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
+# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk
+include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
+# Other files (optional).
#include $(CHIBIOS)/test/rt/test.mk
# Define linker script file here
-LDSCRIPT= $(PORTLD)/STM32F407xG.ld
+LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-CSRC = $(PORTSRC) \
+CSRC = $(STARTUPSRC) \
$(KERNSRC) \
- $(TESTSRC) \
- $(HALSRC) \
+ $(PORTSRC) \
$(OSALSRC) \
+ $(HALSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
+ $(TESTSRC) \
$(CHIBIOS)/os/various/evtimer.c \
$(CHIBIOS)/os/various/syscalls.c \
$(CHIBIOS)/os/various/shell.c \
@@ -133,10 +139,10 @@ TCSRC = TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/hal/lib/streams $(CHIBIOS)/os/various
#
diff --git a/testhal/STM32/STM32F4xx/RTC/main.c b/testhal/STM32/STM32F4xx/RTC/main.c index fff906a19..1c2b60082 100644 --- a/testhal/STM32/STM32F4xx/RTC/main.c +++ b/testhal/STM32/STM32F4xx/RTC/main.c @@ -144,7 +144,7 @@ static time_t GetTimeUnixSec(void) { struct tm tim;
rtcGetTime(&RTCD1, ×pec);
- rtcConvertDateTimeToStructTm(×pec, &tim);
+ rtcConvertDateTimeToStructTm(×pec, &tim, NULL);
return mktime(&tim);
}
@@ -153,7 +153,7 @@ static time_t GetTimeUnixSec(void) { */
static void GetTimeTm(struct tm *timp) {
rtcGetTime(&RTCD1, ×pec);
- rtcConvertDateTimeToStructTm(×pec, timp);
+ rtcConvertDateTimeToStructTm(×pec, timp, NULL);
}
/*
|